encore README

The project's README from github.com/encoredev/encore. As one markdown file: README.md.

encore icon

Encore: Infrastructure orchestration from local to your cloud

License Discord Go SDK TS SDK

What is Encore?

Encore is the infrastructure platform for the intelligence era, where engineers and AI agents build production systems without waiting on infrastructure. Run and validate with real infrastructure locally and in preview environments, then deploy to your own AWS or GCP account.

It has two parts that work together:

You can also use just the SDK for local development and provision infrastructure yourself using Terraform or any other tool.

Example: Declaring resources

import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Topic } from "encore.dev/pubsub";
import { Bucket } from "encore.dev/storage/objects";

// Define a Postgres database
const db = new SQLDatabase("users", { migrations: "./migrations" });
// Define a Pub/Sub topic
const signups = new Topic<SignupEvent>("signups", {
  deliveryGuarantee: "at-least-once"
});
// Define an object storage bucket
const avatars = new Bucket("avatars", { versioned: true });

Each declaration becomes a node in Encore's application graph. Encore runs the migrations and stands up local equivalents on encore run, and provisions the cloud equivalents on deploy:

Resource Local AWS GCP
SQL Database Postgres RDS Cloud SQL
Pub/Sub NSQ SNS + SQS Cloud Pub/Sub
Object Storage Local FS S3 GCS
Cache Redis ElastiCache Memorystore
Cron Manually triggered Encore Cloud Encore Cloud
Secrets Encore vault Secrets Manager Secret Manager
Compute Local Fargate / EKS Cloud Run / GKE

When you push a change that adds or modifies a resource, Encore diffs the application graph against the environment, provisions whatever is missing in your AWS or GCP account, and rolls out the new code against it.

Configuration

Encore separates application semantics from environment-specific configuration. In code, you define what resources your app needs, not how each environment should configure them. That keeps services portable across clouds, regions, accounts, scale profiles, and local development.

Encore provisions every resource with sane production defaults, then helps you manage configuration separately from your application code:

Language SDKs

Language Docs
TypeScript encore.dev/docs/ts
Go encore.dev/docs/go
Python Coming soon

The Development Workflow

The same infrastructure model runs locally, in per-PR preview environments, and in production:

  1. Local: encore run starts the whole system locally: real Postgres, real Pub/Sub semantics, type-safe service-to-service calls, plus a local dashboard with distributed tracing. Infrastructure namespaces let multiple branches or agents work in parallel with isolated state. This lets you validate changes with real infrastructure semantics before pushing code.
  2. Per-PR preview environments: Open a pull request and Encore sets up an ephemeral environment and (optionally) branches databases from a seed environment. This Lets you do end-to-end validation against before merging to a shared staging environment.
  3. Production: Push to deploy. Encore diffs the application graph against the environment, provisions what is missing in your AWS or GCP account, wires up least-privilege IAM based on the application's code paths, and rolls out the new code.

With this workflow, the fail-loop moves from "push, wait, fix" to "run locally, see it work, push." This tight loop makes Encore particularly effective with AI coding agents, since every change can be validated with real infrastructure immediately after each code change. See the Development Workflow docs for more.

Adopting Encore

You don't need a rewrite, and you don't need to use Encore for every part of your system.

Start with a low-risk, frequently-changed service. See the migration guide for the full playbook.

Migrating Away

Encore is designed to make leaving easy. 99% of your code is regular Go or TypeScript, so there's not much to rewrite. See the migrate-away guide for more.

Limitations

Encore integrates at the application layer, which means a few constraints to be clear about up front:

How Encore Compares

Tool What it does How Encore differs
Pulumi / CDK / Terraform / SST Infrastructure-as-Code for provisioning cloud resources Infrastructure is generated from your application code, so the same code runs locally and deploys to AWS or GCP.
Convex / Supabase / Firebase Managed backend-as-a-service platforms Runs in your own AWS or GCP account. No vendor lock-in.
Render / Fly.io / Railway / Vercel PaaS-style deployment platforms Deploys to your own cloud account, not a managed runtime.

Quick Start

encore app create     # scaffold a project
cd myapp
encore run            # run locally with provisioned infra + dev dashboard

Install Encore:

Full walkthrough in the Quickstart guide.

AI Integration

Encore is built for AI-assisted development. When you run encore app create, you can pick your AI tool (Cursor, Claude Code, etc.) and Encore generates the right rules files for it, plus configures an MCP server that lets agents introspect your app: services, APIs, databases, traces. Combined with the fast local-to-preview-env iteration loop above, agents can validate their own changes end-to-end against real infrastructure instead of guessing.

See the AI integration docs for more details.

Local Dev Dashboard

The Encore CLI ships a local dashboard for inspecting services, APIs, traces, databases, Pub/Sub messages, and architecture diagrams in real time. Run encore run and it is there at localhost:9400.

https://github.com/user-attachments/assets/461b902f-8fd3-46f1-a73c-0ebbfa789ce3

Deployment Platform

Encore's optional managed platform connects to your AWS or GCP account and provisions the resources your code declares in your own VPC. Other features:

See pricing for details.

You can also skip the platform entirely. Run encore build docker to produce a standalone image and supply your own infra config (provisioned via Terraform, Pulumi, or any other tool). See the self-hosting guide.

Who's Using Encore

200+ Teams are already shipping production apps with Encore, including: Groupon, Echo.xyz (a Coinbase company), Bookshop.org, Gradient Labs, Ashby, Later.com, Pallet, Pave Bank, and Playwire. Use cases span AI, fintech, logistics, commerce, web3, and more. See case studies to learn more.

Resources

License

Encore is licensed under the Mozilla Public License 2.0.

The framework, parser, compiler, runtime, CLI, and everything needed to develop, build, and self-host an Encore application is Open Source. Encore's optional managed deployment platform is a commercial service.

See CONTRIBUTING.md for additional details.

encore (encoredev/encore)

Searching Database…

12.5K ·GitHub
这是什么?Encore 是一个开源的后端平台:你直接在代码里声明数据库、Pub/Sub、缓存等资源,用真实的基础设施在本地跑起整个系统,然后部署到你自己的 AWS 或 GCP 账号里。
它是库、框架,还是托管服务?它由两部分组成,配合使用:一个是开源的基础设施 SDK(TypeScript 和 Go 的库),决定了你写服务的方式;另一个是可选的托管平台,帮你编排云基础设施。
怎么把它跑起来?先安装 CLI —— macOS 上运行 'brew install encoredev/tap/encore',Linux 和 Windows 各有一条 curl 和 PowerShell 一行命令 —— 然后 'encore run' 就会在本地启动你的整个系统,连仪表盘也一起带上。
事先需要知道的主要限制有哪些?自动开通资源目前只支持 AWS 和 GCP(Azure 已列入路线图),语言暂时只有 TypeScript 和 Go,而且它面向的是常见资源——剩下那 1% 领域专属的部分,你可以照常接入任何服务。
本地仪表盘能看到什么?运行 'encore run' 后,会在 localhost:9400 提供一个仪表盘,系统在本地运行的同时,你可以实时查看服务、API、调用链路、数据库、Pub/Sub 消息和架构图。
能在现有系统里用上它,而不用重写吗?可以 —— 用 Encore 构建新服务,让它们和现有系统并存,通过 API 集成,或者直接部署到你现有的 Kubernetes 集群里。离开也很容易,因为 99% 的代码仍然是普通的 Go 或 TypeScript。
有哪些公司在生产环境用它?有 200 多个团队在生产环境使用 Encore,包括 Groupon、Echo.xyz(Coinbase 旗下公司)、Bookshop.org、Ashby 和 Later.com,涵盖 AI、金融科技、物流、电商和 web3 领域。
What are similar projects?serverless, gofr, terraformer, pulumi, sealos, chalice, infracost, kops
Creator
encoredev
Size
17.8 MB
Stars
12.5K
Age
5y
Commits · 90 Days