Published on

Building on Encore with Claude Code

Authors
  • avatar
    Name
    Ivan Cernja
    Twitter

The part of Leap where you describe an app and it just works has always been Encore running underneath. You can build on that same engine directly now, with Claude Code writing the code, and go further than Leap manages on its own.

Not sure what Encore is? You do not need to be

If you came to Leap to describe an app and watch it get built, the technical names in this post do not need to matter to you. Encore is the engine that has run your Leap apps all along, taking care of the servers and database for you. Claude Code is a lot like the Leap chat, except it runs on your own computer and can do more. You still describe what you want in plain English and it builds it, and the one-time setup below is something you can hand to Claude Code and have it walk you through.

Coding agents have caught up, and Claude Code is now good enough that building with it on Encore keeps what made Leap easy, in a familiar workflow where you describe what you want, an agent builds it, and Encore handles the infrastructure.

Encore itself is heading the same way, toward a software factory where agents carry a feature from idea to running in the cloud and handle the infrastructure along the way. Building with Claude Code now puts you on that same foundation early, in something being built to work for anyone from a first project to a team running production at scale.

If you already want the steps, the guide for moving a project across is below, and the reasons to make the move come first.

Why Claude Code and Encore work well together

Encore is built for pairing with an agent, so every Encore app ships with a CLAUDE.md that teaches it how Encore works, plus a built-in MCP server it can use to inspect your running app, calling an endpoint it just wrote and checking the result against your database or the trace without leaving the conversation. Leap ran a similar loop internally, and now you can see it and change it yourself.

Your code sits in your own editor and your own Git repo, so you can edit it or move it elsewhere whenever you want. Encore still handles the infrastructure, creating and running whatever you declare in your code when you deploy, with no Terraform and no cloud console.

What changes when you move over

Almost everything you relied on in Leap is still here, moved from a button in a web app to a command that Claude Code runs for you when you ask.

In LeapWith Claude Code and Encore
Describe your app in the chatDescribe your app to Claude Code
One-click deployOne command, git push encore
Secrets managed in the UIencore secret set
Live preview panelencore run opens a local dashboard with the same catalog, tracing, and API explorer
Infra tabThe local dashboard, plus your Encore Cloud dashboard
Export to GitHubYour code already sits in a normal Git repo you own

The mechanics are the same as before, with a more capable agent building alongside you and you steering.

Once you've moved over to using Claude Code, you may no longer need a paid Leap subscription as you are using Claude Code for writing code. If you are using Leap's custom domain feature, you can choose to keep your subscription or move over to an Encore subscription instead.

Migrating a project from Leap

The quickest way is the Open in Claude Code button in your Leap project, next to the GitHub and Deploy buttons. It hands you the commands below already filled in with your own repo and Encore app, ready to paste into your terminal.

If you would rather have Claude Code do the whole thing, open the cloned folder in Claude Code and paste this in:

Paste into Claude Code
I exported this app from Leap and want to run it on Encore. The Encore backend is in the `backend` folder and the web app is in `frontend`. Please install the Encore CLI if it is missing, log me in with `encore auth login`, add the Encore CLAUDE.md and MCP configuration, add the Encore git remote so I can deploy, then start the backend with `encore run` and the frontend dev server. Walk me through anything that needs my input, such as the first-time SSH confirmation or entering secret values.
Stuck at any point? Ask Claude Code

If a step looks unfamiliar, or a command does something you did not expect, ask Claude Code what just happened. It has context on your project and the Encore CLI, so it can explain the step, read any error, and tell you what to do next.

The rest of this section explains each step, in case you want to follow along or do it by hand.

1. Get your code out of Leap

Open your Leap project, connect GitHub, and let Leap create a repository, which gives you a private repo with your project committed to the main branch. It comes as a small monorepo, with your Encore services and the encore.app file in a backend folder and your web app in a frontend folder, and it ships a DEVELOPMENT.md that covers the same steps you are reading here. The Encore CLI commands below run inside backend, where encore.app sits, while the Git commands run from the repo root.

Then clone it to your machine:

git clone https://github.com/your-username/your-app.git
cd your-app

2. Install the Encore CLI and log in

# macOS
brew install encoredev/tap/encore

# Linux and WSL
curl -L https://encore.dev/install.sh | bash

# Windows (PowerShell)
iwr https://encore.dev/install.ps1 | iex

Then sign in with the same Encore account you already use for Leap:

encore auth login

You also need bun installed and Docker running before the backend starts locally, since Encore uses bun for the backend's dependencies and Docker for your local database.

3. Connect it for deploys

Your export is already a registered Encore app, with its ID in backend/encore.app, so all you add is Encore's Git remote to deploy through. From the repo root:

git remote add encore encore://your-app-id

Your your-app-id is the id in backend/encore.app, which also shows as the app slug in your Encore Cloud dashboard. If you would rather the CLI set this up, run encore app link your-app-id from the backend folder, which adds the same remote.

4. Give Claude Code its Encore context

Apps created fresh with Encore get the CLAUDE.md and MCP configuration on their own. Since your project came from Leap, you add them once, either by asking Claude Code to do it or by running:

# The Encore instructions, so Claude Code writes idiomatic Encore code
curl -L https://raw.githubusercontent.com/encoredev/encore/refs/heads/main/ts_llm_instructions.txt -o CLAUDE.md

# The Encore MCP server, so Claude Code can inspect your running app
claude mcp add encore-local -- encore mcp run --app=your-app-id

Your app-id is the id in backend/encore.app, which also shows in your Encore Cloud dashboard. To let Claude Code read the traces and deploy state from your live environment, add the cloud MCP server too:

claude mcp add --transport http encore-cloud https://api.encore.cloud/mcp

Open the project in Claude Code afterwards, and it will understand Encore and be able to call your APIs, query your database, and read traces as it works.

Using a different agent?

The same process works with Codex, Cursor, and others. Encore can generate the equivalent rules for Cursor, VS Code, and Zed, and any agent that reads an AGENTS.md file follows these steps once it has the Encore instructions and can run the CLI.

5. Run it locally

Start the backend from the backend folder:

cd backend
encore run

This opens Encore's development dashboard, by default at http://localhost:9400, with the same catalog, tracing, API explorer, and live service diagram you had in Leap, and it sets up your local database and the rest of the infrastructure on its own.

Unlike Leap's built-in preview, your app's interface does not start with the backend, so run it yourself from the frontend folder in a second terminal:

cd frontend
npm install
npx vite dev

Your app opens at http://localhost:5173, and its generated API client already points at the local backend on port 4000, so the two connect with nothing to wire up. When you change a backend endpoint, regenerate that client from the backend folder with encore gen client --target leap.

6. Set your secrets

Your secret names come across with your code, but their values stay in Encore rather than the repository, so set them again from the backend folder:

encore secret set --type prod,dev,local YourSecretName

It prompts you for each value, so repeat it for every secret your app uses, and if you are not sure which ones it expects, ask Claude Code to list them.

7. Deploy

git add -A
git commit -m "Ready to deploy"
git push encore

This does the same job as Leap's one-click deploy, since pushing to the encore remote starts Encore Cloud's pipeline, which builds and tests your code, provisions whatever your code declares, deploys it, and creates a staging environment with a URL like https://staging-your-app.encr.app.

The first time you push

Because the deploy goes over SSH, you will see a prompt asking you to confirm the identity of git.encore.dev. Type yes to continue. It only asks the once.

Deploying is free to start, because Encore Cloud includes hosting for development and smaller projects within fair use limits, and we will not charge you for usage unless you have agreed to it beforehand. For production scale, or to run inside your own AWS or GCP account, you can connect that from the dashboard.

8. Build your next change

From the project folder, start Claude Code:

claude

Then describe what you want in plain language, the way you would have in the Leap chat. For example:

Paste into Claude Code
Add a waitlist we can use to collect emails from people interested in our app.

Claude Code writes the Encore code and, through the MCP server, runs the endpoint and checks the result for you. The local dashboard at http://localhost:9400 updates as it works, and git push encore ships the change when you are happy with it.

9. Optional: run it anywhere

To host somewhere other than Encore Cloud, build a portable Docker image from the backend folder and run it wherever you like:

encore build docker your-app:latest

Working well with Claude Code and Encore

You can talk to Claude Code the way you talked to Leap, describing the result you want in plain language, something like "add a users table and an endpoint to create a user, then call it and show me the trace," and it writes the code and checks its own work against your running app instead of guessing. The encore check command compiles and boots your app and can run a request against it, and it is worth letting Claude Code use it, along with the MCP tools, whenever it wants to confirm something works. When behaviour surprises you, the tracing in the local dashboard shows what happened on each request, and you can ask Claude Code to read a trace and explain it.

Keep API keys and other secrets in Encore with encore secret set, referenced from your code rather than pasted into files, and commit often now that everything is in Git, so every version is there to review or roll back.

If you get stuck

If you used to open a support ticket and wait, try Claude Code first. Through the MCP server it can see your app's services and read its database and traces, so you can describe what broke and ask it to dig in, and it often fixes the problem faster than a support thread would. For anything else, the Encore documentation at encore.dev/docs covers every command and primitive, the CLAUDE.md in your project doubles as a readable reference, and the Encore community is there if you would rather ask a person.