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 index.ts and package.json declaring dependencies.apps. Create apps with executor apps create, activate them with executor apps deploy, and update them with executor apps source, executor apps commit, or Git on Local, Self-host, and Cloud.
The command that matters most: run executor apps framework, save hello/package.json and hello/index.ts, then run executor apps create --name "Hello" --files ./hello and executor apps deploy --app "$APP_ID" --files ./hello.
Prerequisites and permissions: Bash, Node.js, and npm i -g executor@2.0.0-beta.79. The walkthrough uses the Local background service. On Cloud and Self-host, use the organization you approved for app management. Editing and deploying an existing app require an editable app and edit permission.
You’ll know it worked when… deploy returns app and version, and executor execute --code 'return await tools.hello.greet({ name: "Ada" })' returns Hello, Ada!.
How to use it
App commands choose their target in this order: --host, then EXECUTOR_HOST, then the last host remembered by either sign-in command (executor apps login or executor login), then the Local background server.
Every app starts with two files:
package.jsondeclaringdependencies.appspinned to the exact version returned byexecutor apps frameworkso rebuilds stay on that release.index.tsexportingdefineApp(requirements, definition)as the default export.
Local
The commands below use Bash and Node.js and assume no saved hosted sign-in or EXECUTOR_HOST override. If you run a manual Local server instead of the background service, pass its loopback origin (--host http://127.0.0.1:4312), supply its API key with EXECUTOR_API_KEY, and clear any EXECUTOR_ACCESS_TOKEN override.
Check the host's apps version
In a new empty directory, run:
executor apps frameworkNote the returned version (for example 0.0.1-beta.148).
Create the two starter files
Save these two files in ./hello, replacing 0.0.1-beta.148 with the version printed above if your host reports a different release:
{
"name": "hello-app",
"private": true,
"dependencies": {
"apps": "0.0.1-beta.148"
}
}