Index of every page on this site: llms.txt
All skills
encoredev avatar

/link-app

@e86a3ab official
by Encoreencoredev/skills30 stars
6
Run it yourself

Link a local Encore.ts or Encore.go app to Encore Cloud, so it can deploy, set secrets, and use the Encore Cloud MCP server. Covers checking whether an app is linked, registering local code as a new Encore Cloud app with `encore app init`, linking to an existing one with `encore app link`, and adding a missing `encore` git remote.

  • 1 file
  • 5.4 KB
  • Updated 4 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/encoredev/skills/link-app

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈86 tokens for metadata: the name and description. ≈1.1k when used: this file.

Description uses 14.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈1131 characters, or 14.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Linking an App to Encore Cloud

A linked app has its Encore Cloud app ID in encore.app, and deploys from the encore git remote or from a GitHub repository linked in the Cloud Dashboard. The same steps work for Encore.ts and Encore.go.

Instructions

Do the steps in order, from the app's root directory.

1. Log in

encore auth whoami must print logged in as <email>. If it doesn't, see encore-login. An auth key login (logged in as app <app-id>) can only link to that key's app (step 3), not register a new app (step 4).

2. Check whether the app is linked

grep '"id"' encore.app
git remote get-url encore
  • "id" has a value, and the remote prints encore://<app-id>: linked. Nothing to do.
  • "id" has a value, but there's no encore remote: go to step 5. Skip this if the app deploys from GitHub (the app's Settings > GitHub in the Cloud Dashboard). If you can't tell, ask the user.
  • "id" is empty, or there's no encore.app file: not linked. If the user already has an app on Encore Cloud for this code, go to step 3. Otherwise go to step 4. If you can't tell, ask.

3. Link to an existing Encore Cloud app

Use this when the app already exists on Encore Cloud, for example one the user created in the Cloud Dashboard. Its ID is in the dashboard URL, app.encore.dev/<app-id>.

encore app link <app-id>
  • Successfully linked app!: it wrote the ID to encore.app. It also adds the encore remote, but only when the repository has no remotes at all. Check with git remote get-url encore, and go to step 5 if it's missing.
  • Error: that app does not exist, or you don't have access to it.: check the ID. If it's right, the user needs to be invited to the app, or, with an auth key, the key belongs to a different app.
  • the app is already linked.: encore.app has a different app's ID. Only add --force if the user confirms the code should move to the other app.
  • no app id given.: pass the ID as the argument.

Then go to step 6.

4. Register the code as a new Encore Cloud app

Use this for an app created logged out or with --platform=false, Encore code that has no encore.app file, or a copy of someone else's app that the user wants to deploy separately.

  1. encore app init refuses to run while encore.app exists (an encore.app file already exists). If there is one, move it out of the repository, and note any settings other than id and lang, such as global_cors or build:

    mv encore.app /tmp/encore.app.bak
  2. Register it. Always pass --lang, or the app is treated as Go. The name follows the same rules as encore app create: lowercase letters, digits, and single dashes.

    encore app init my-app --lang ts   # --lang go for Encore.go
    • Successfully initialized application on Encore Cloud! with - App ID: <app-id>: done. It wrote a new encore.app and added the encore remote, creating a git repository first if there wasn't one.
    • The app is not currently linked to the encore.dev platform.: nobody was logged in, so it only wrote a local encore.app. Log in (step 1), move the new encore.app away again, and rerun.
    • specify an app name: pass the name as the first argument.
    • --org=<id-or-slug>: add it to create the app in an org instead of the user's personal account.
  3. Copy any other settings from /tmp/encore.app.bak into the new encore.app.

5. Add a missing encore remote

git remote add encore encore://<app-id>

6. Check and commit

grep '"id"' encore.app            # "id": "<app-id>"
git remote get-url encore         # encore://<app-id>

The app is linked. Its Cloud Dashboard is https://app.encore.dev/<app-id>. Commit the changed encore.app with the next commit. Linking doesn't deploy anything: to deploy, commit and push (see encore-deploy).

Guidelines

  • Don't run encore app create to link existing code. It creates a new app in a new directory.
  • Don't use encore app link --force without the user's OK. It points the code at a different app.
  • To get an app that's on Encore Cloud but not on this machine, clone it instead: encore app clone <app-id> (see encore-create-app).
  • Docs: https://encore.dev/docs/platform/deploy/deploying

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at e86a3ab. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Activeupdated 4 weeks ago
Other metadata
when_to_use
User wants to link, connect, or register an app with Encore Cloud, the app was created logged out or with `--platform=false`, `encore.app` has an empty `"id"`, there's no `encore` git remote, or a command fails because the app isn't linked. Also use when `encore app link` fails with "the app is already linked", "no app id given", or "that app does not exist, or you don't have access to it", or `encore app init` fails with "an encore.app file already exists". SKIP for logging in (`encore-login`) and for deploying an app that's already linked (`encore-deploy`). Trigger phrases: "link my app", "connect my app to Encore Cloud", "register the app", "encore app link", "encore app init", "app isn't linked", "no encore remote", "'encore' does not appear to be a git repository".

README badge

README badge for encoredev/skills/link-app