Build an app
Write a TypeScript Executor app with index.ts and package.json, create it with executor apps create, and deploy it with executor apps deploy.
An Executor app is a TypeScript package with a root index.ts and a package.json pinning the exact apps framework version. Create apps with executor apps create, activate them with executor apps deploy, and update them with executor apps source, executor apps commit, or Git. This works on Local, Self-host, and Cloud.
The command that matters most: run executor apps framework for the exact apps version, then executor apps create --name "<Name>" --files ./my-app and executor apps deploy --app <app-id> --files ./my-app.
Prerequisites and permissions: install executor (2.0.0-beta.79). Local needs no sign-in. On Cloud and Self-host, any organization member can create an app; editing and deploying an existing app requires being its creator or an admin or owner.
You’ll know it worked when… executor apps deploy returns a version JSON object and the app’s tools run from the Tools tab or MCP.
How to use it
Every app starts with two files:
package.jsonwithdependencies.appspinned to the exact version printed byexecutor apps framework(no^or~range).index.tsexportingdefineApp(requirements, definition)as the default export.
Local
The CLI targets the local background Executor by default and starts it if needed.
Check the host's apps version
executor apps frameworkCopy the returned version (for example 0.0.1-beta.148) into dependencies.apps in package.json.
Create and deploy the app
Pass your app directory to executor apps create, then deploy the returned app id:
APP_ID=$(executor apps create --name "Hello" --files ./hello | node -pe 'JSON.parse(require("fs").readFileSync(0, "utf8")).id')
executor apps deploy --app "$APP_ID" --files ./helloIf you run a manual local server instead of the background service, pass --host http://127.0.0.1:4312 and set EXECUTOR_API_KEY.
Cloud
Sign in for app commands
executor apps loginOpen the printed URL in your browser and approve the code. executor apps login defaults to https://api.executor.sh and remembers both the host and the organization you approved. For non-interactive scripts, set EXECUTOR_ACCESS_TOKEN and pass --organization <org-id> with --host https://api.executor.sh.
Pin the version, create, and deploy
executor apps framework
APP_ID=$(executor apps create --name "Hello" --files ./hello | node -pe 'JSON.parse(require("fs").readFileSync(0, "utf8")).id')
executor apps deploy --app "$APP_ID" --files ./helloSelf-host
Sign in against your self-hosted origin first, then run the same create and deploy commands:
executor apps login --host https://executor.example.com
executor apps framework
APP_ID=$(executor apps create --name "Hello" --files ./hello | node -pe 'JSON.parse(require("fs").readFileSync(0, "utf8")).id')
executor apps deploy --app "$APP_ID" --files ./hello
You can also set EXECUTOR_HOST=https://executor.example.com instead of passing --host on each command.
Deploying
executor apps create saves source files without building or running them. executor apps deploy compiles the app, runs any SQL migrations, and activates the new version only if the build succeeds. A failed build leaves the active version running and reports the failing stage, file, and line.
Updating an existing app
To edit an existing app safely from a shell:
- Download the working source into an empty directory with
executor apps source --app <app-id> --out ./hello. - Edit files locally, then either deploy directly with
executor apps deploy --app <app-id> --files ./hello, or save a commit first withexecutor apps commit --app <app-id> --files ./hello --expected <commit> --message "Update greeting"and deploy it withexecutor apps deploy --app <app-id> --commit <new-commit>. - Inspect previous commits with
executor apps history --app <app-id>.
executor apps commit saves a complete snapshot: any file omitted from --files is deleted from the working source, and the command reports removed.count and up to 100 removed paths.
For apps larger than 16 MiB (for example with large binary assets in ui/public/), push through the app’s Git remote instead. Print the remote URL with executor apps git --app <app-id> and configure executor apps credential as the Git credential helper (credential.useHttpPath=true after an empty credential.helper), then deploy the pushed commit with executor apps deploy --app <app-id> --commit <sha>.
Deploying through an agent over MCP
Agents with access to the built-in Executor app can create, read, commit, and deploy apps directly through MCP tools:
tools.executor.framework.release({})returns the exactappsversion forpackage.json.tools.executor.apps.create({ name, files })creates an app from{ path, content }pairs.tools.executor.apps.source({ app })reads the working source and current commit revision.tools.executor.apps.commit({ app, expected, message, files })saves a new commit.tools.executor.apps.deploy({ app, commit })builds and activates that commit.
Example
Save these two files in ./hello, replacing 0.0.1-beta.148 with the version executor apps framework prints for your host:
{
"name": "hello-app",
"private": true,
"dependencies": {
"apps": "0.0.1-beta.148"
}
}import { defineApp, object, query, router, string } from "apps";
const greet = query(
{
description: "Greet someone by name",
input: object({ name: string() }),
output: object({ message: string() }),
},
async (_ctx, { name }) => ({
message: `Hello, ${name}!`,
}),
);
export default defineApp({}, { tools: router({ greet }) });Create and deploy the folder:
APP_ID=$(executor apps create --name "Hello" --files ./hello | node -pe 'JSON.parse(require("fs").readFileSync(0, "utf8")).id')
executor apps deploy --app "$APP_ID" --files ./hello
Limits
- Host resolution order:
executor appscommands resolve their target in this order:--host, thenEXECUTOR_HOST, then the last host signed in withexecutor apps login, then the local background Executor. Pass--hostorEXECUTOR_HOSTexplicitly if you switch between Local and Cloud. - Exact
appsversion:package.jsonmust declaredependencies.appsas an exact version string. Omitting it or using a range fails the build. - Source size bounds: code outside
ui/public/must be UTF-8 text, at most 4,096 files and 16 MiB total, and each of your own JavaScript or TypeScript files is at most 2,000,000 bytes (JSON files and imported npm packages are outside the per-file JS/TS limit). Files underui/public/may be binary: up to 10,000 files, at most 32 MB per file, and 1 GB total. - Git push size on hosted servers: a source directory over 16 MiB is pushed with Git rather than sent inline. On hosted Executor, a single Git push larger than about 64 MiB of packed data fails; split large
ui/public/additions across smaller commits. - No secrets in source: never hardcode API keys or tokens in app files. If you later publish the app to the registry, the chosen commit’s source files are shared publicly. Use Accounts and providers for credentials.