Use Executor from a shell
Sign in to Local, Self-host, or Cloud Executor, call app tools and skills from a terminal, and bridge MCP over stdio.
The executor CLI lets you call app tools, run JavaScript programs over your apps, read app skills, and bridge any Executor MCP endpoint over stdio from a shell (Local, Self-host, and Cloud).
In CLI 2.0.0-beta.79, sign in to Cloud or Self-host with executor login for tool commands and executor mcp, and with executor apps login for executor apps commands. Omit sign-in to target the Local background Executor directly.
Prerequisites: Executor 2.0.0-beta.79 installed (Command line). For Self-host or Cloud, you need an account in the target organization and browser access to approve the sign-in code.
You’ll know it worked when executor search --namespace executor --limit 5 prints a JSON object containing "items" and "namespaces" (and for Self-host or Cloud, executor whoami prints your host and organization).
Sign in and choose a host
Local
No login is required. If you have not signed in to a remote host (or after executor logout), client commands target the local background Executor and start it automatically if it is not running, authenticating with its local API key.
To confirm it works locally:
executor search --namespace executor --limit 5
You’ll know it worked when the command prints JSON listing tools under tools.executor.*.
Cloud and Self-host
In 2.0.0-beta.79, tool commands and app management commands use separate browser device sign-ins:
-
Tool commands (
search,describe,call,execute,resume,skills) andexecutor mcp:# Cloud (defaults to https://api.executor.sh) executor login # Self-host executor login --host https://executor.example.comexecutor loginprints a URL and a short code. Open the URL in any browser where you are signed in, verify the code, choose which apps the sign-in reaches, choose how approvals are answered, and approve. -
App management commands (
executor apps list,create,deploy,publish,install, etc.):# Cloud executor apps login # Self-host executor apps login --host https://executor.example.com -
Check sign-in status and sign out:
executor whoami executor whoami --host https://executor.example.com executor logout executor logout --host https://executor.example.comexecutor whoamiprints JSON showing the host, organization, what the tools sign-in reaches, its approval mode, and whether app commands are signed in.executor logoutremoves both the tools sign-in and the app commands sign-in for that host and stops using it by default.
You’ll know it worked when executor whoami exits 0 and prints your host and organization.
Where sign-ins live and how the host is chosen
Every client command resolves its target host in this order:
--host <origin>on the command lineEXECUTOR_HOSTenvironment variable- The host you signed in to most recently (with
executor loginorexecutor apps login) - The local background Executor (started if needed)
Saved remote sign-ins are stored in your operating system’s credential store (service Executor Tools), or, on machines without one, in a user-only file under ~/.local/state/executor/auth (mode 0600 in a 0700 directory). Sign-ins renew themselves automatically.
- Set
EXECUTOR_ACCESS_TOKENto send a pasted access token instead of a saved remote sign-in. - Set
EXECUTOR_API_KEYwhen targeting a local loopback server with--host.
Call tools and skills from a shell
Each tool command calls the matching MCP tool and prints JSON to stdout. On failure, it exits with status 1 and prints the error message, code, and recovery hint to stderr; when stdout is not a terminal (piped or redirected), it also prints {"error": {...}} on stdout.
| Command | Key arguments and flags |
|---|---|
executor search [<query>] |
--host <origin>, --namespace <app-or-path>, --limit <n>, --offset <n> |
executor describe <path...> |
1 to 20 exact tool paths from search; --host <origin> |
executor call [<path>] |
--input <json> (default {}), --input-file <file|->, --files <dir>, --host <origin>. Omit <path> to pass a JSON array of {"path", "input"} calls that run concurrently. |
executor execute |
--code <js> or --file <file|->, --files <dir>, --host <origin> |
executor resume <request-id> |
--action accept|decline|cancel, --content <json> or --content-file <file|->, --files <dir>, --host <origin>. When approvals are answered in the browser, pass only <request-id>. |
executor skills |
--app <slug>, --name <skill>, --file <path>, --version <id>, --revision <rev>, --host <origin> |
Redirect large JSON results to a file (for example > result.json) so you or an agent can inspect only the slice you need. Binary outputs (images, audio, or files) are written into a fresh temporary directory — or the directory passed to --files — and their file paths are returned in the JSON output.
When a call pauses for approval or user input, call or execute prints the pending request (including approvalUrl in browser approval mode). Continue it with executor resume <request-id>; never re-run the original call or execute. Because browser approvals are tied to the MCP session that made the call, the CLI stores that non-credential session ID under ~/.local/state/executor/paused until the request is answered.
Serve your tools to an MCP client
executor mcp exposes the resolved host’s MCP endpoint over stdio for MCP clients that launch a local process, such as Claude Code:
claude mcp add executor -- executor mcp
Pass --host <origin> (or rely on EXECUTOR_HOST or your saved sign-in) to bridge a Self-host or Cloud host; without a remote sign-in or host override, executor mcp bridges the local background Executor.
executor mcp forwards every MCP message — including approvals and questions from the host — renews your saved sign-in while running, informs the agent that the executor CLI is available in its shell, and automatically opens a new MCP session and retries the request if the host restarted and dropped the previous session.
Example
These commands run against the built-in executor app on a fresh Local server with no extra accounts needed:
# 1. Start the local background server (or let the next command start it)
executor service start
# 2. Find tools in the built-in executor app
executor search --namespace executor --limit 5
# 3. Inspect a tool's full TypeScript signature
executor describe tools.executor.appManagement.list
# 4. Call the tool directly
executor call tools.executor.appManagement.list
# 5. Run a short JavaScript program that returns only the count of apps
executor execute --code 'const apps = await tools.executor.appManagement.list(); return { count: apps.length };'
# 6. List available app skills
executor skills
Step 5 prints:
{
"status": "completed",
"execution": {
"ok": true,
"value": {
"count": 1
},
"toolCalls": [
{
"name": "executor.appManagement.list",
"outcome": "success",
"durationMs": 36
}
]
},
"unavailableApps": []
}
Limits
- In
2.0.0-beta.79,executor logindoes not authenticateexecutor appscommands — runexecutor apps loginseparately for app management commands. There is noexecutor apps logoutorexecutor apps whoami; use top-levelexecutor logoutandexecutor whoami. executor whoamifails withNotSignedInwhen targeting the local background server without a named or signed-in remote host.executor describeaccepts at most 20 tool paths per call.executor skills --namerequires--app, and--filerequires--name.