Amp CLI reference - CLI flags
Amp command-line flags
Amp documents 84 CLI flags, including --help, --executor and --runner-dir. You pass these to amp on the command line. Each row gives the docs' description, accepted values and an example where one is documented.
Last verified 19 official pagesFull Amp reference
| Flag | Description | Example |
|---|---|---|
--help | Shows more of what the CLI can do. | amp --help |
-x, --execute | Starts the CLI in execute mode: sends the given message to the agent, waits until the agent ends its turn, prints its final message, and exits. Execute mode is also turned on automatically when stdout is redirected. prompt string (optional when input is piped) Docs: -x, --execute | amp -x "what files in this folder are markdown files? Print only the filenames." |
-ox, --orb-execute | Runs an execute-mode prompt in an orb on Amp's servers instead of on your machine. prompt string Docs: -ox, --orb-execute | amp -ox "Investigate why the latest CI run on main failed" |
--executor | Chooses where a new thread runs: locally, in an orb, or on one of your runners. Opens the interactive TUI with that executor selected, and also works with -x. local | orb | runner:<id> (default: local) Docs: --executor | amp --executor runner:grandmas-garage-server |
--runner-dir | Chooses a directory served by the target runner for a runner thread instead of the runner's starting directory. <absolute-path> Docs: --runner-dir | amp --executor runner:grandmas-garage-server --runner-dir /home/me/code/my-app |
--fast | Enables Fast mode for one invocation. It is an alias for | -no example |
--features | Sets thread features for a new thread, such as fast mode, or the model and effort for Claude Code mode threads started with -x or -ox. comma-separated features, e.g. fast, model:<id>, effort:<level> Docs: --features | amp -ox "Review this repository" --mode external-agent:claude-code \
--features model:mythos,effort:high |
--mode | Picks the agent mode for a new execute-mode thread. Ignored when continuing an existing thread, which keeps its mode. mode key, e.g. low, medium, high, ultra, external-agent:claude-code Docs: --mode | amp -x "Review this repository" --mode external-agent:claude-code \
--features model:claude-opus-5-5 |
--title | Sets the thread title for a new execute-mode thread. string Docs: --title | -no example |
--project | Chooses the project an orb starts from, for example outside a checkout or when the directory matches more than one project. Without it the CLI matches the current directory's Git remotes. Amp project (namespace/name), GitHub owner/repo, or repository URL Docs: --project | amp -ox "Update the README" --project my-org/my-repo |
--orb-size | Runs the orb on a different size than the project default. Ignored when continuing an existing thread. a1.tiny | a1.small | a1.medium | a1.large | a1.xxlarge | a1.3xlarge (project default a1.medium) Docs: --orb-size | amp -ox "Run the full browser test matrix" --orb-size a1.large |
--attach | Uploads a local file and adds its attachment URL to the message. Repeat the flag to attach multiple files; works with -ox and runner execute threads. <path> (repeatable) Docs: --attach | amp -ox "Compare these files" --attach ./report.pdf --attach "/tmp/notes with spaces.txt" |
--mcp-config | Specifies MCP servers as JSON without changing your settings file. Servers passed this way take highest precedence and do not require workspace approval. JSON object of MCP server definitions Docs: --mcp-config | amp --mcp-config '{"everything": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-everything"]}}' -x "What tools are available to you?" |
--plugin-ready-timeout | Makes execute mode wait for plugins to become ready before running the turn so agent.start and agent.end events are not skipped. The turn starts as soon as plugins are ready. optional seconds; bare flag waits up to 10; maximum 300; 0 disables the wait Docs: --plugin-ready-timeout | amp -x "summarize this repo" --plugin-ready-timeout 30 |
--timings | Prints a timing report for execute mode to stderr when the command exits, covering startup, authentication, thread connection, execution, and cleanup. The response stays on stdout. Docs: --timings | amp -x "summarize this repo" --timings |
--stream-json | Outputs each message as a JSON object on its own line instead of plain text. Requires --execute; with -ox it stays attached and streams the orb thread's events until the turn ends. Docs: --stream-json | amp --execute "what is 3 + 5?" --stream-json |
--stream-json-thinking | Includes assistant thinking and redacted_thinking blocks in streaming JSON output. This extends the schema and is not compatible with Claude Code. Docs: --stream-json-thinking | -no example |
--stream-json-input | Reads user messages as JSON lines from stdin until it closes, allowing several messages in one conversation. Requires --stream-json and is not supported with -ox. Docs: --stream-json-input | echo '{"type":"user","message":{"role":"user","content":[{"type":"text","text":"what is 2+2?"}]}}' | amp --execute --stream-json --stream-json-input |
--no-archive-after-execute | Keeps a new thread unarchived after an execute-mode turn finishes; execute mode and | -no example |
--settings-file | Points Amp at a different user settings file. <path> Docs: --settings-file | -no example |
--no-tui | Starts a runner-only Amp instance that waits for and runs remotely created threads in the current directory without opening the TUI. Docs: --no-tui | amp --no-tui --runner-id grandmas-garage-server |
--runner-id | Gives a runner a stable ID. Also selects the runner for <id>; must be a valid hostname, case-insensitive Docs: --runner-id | amp --no-tui --runner-id grandmas-garage-server |
--remote-control-terminal | Allows access to the CLI's or runner's terminal from ampcode.com. Takes precedence over AMP_REMOTE_CONTROL_TERMINAL. Docs: --remote-control-terminal | amp --no-tui --runner-id grandmas-garage-server --remote-control-terminal |
--no-remote-control-terminal | Explicitly disables terminal access from the web. Takes precedence over AMP_REMOTE_CONTROL_TERMINAL. Docs: --no-remote-control-terminal | -no example |
--desktop | Gives threads served by a runner a Desktop tab. On macOS threads see and control the Mac's display; on Linux the runner starts its own virtual desktop. Docs: --desktop | amp --no-tui --desktop |
--dir | Makes a runner serve one more directory. Repeat for each directory; any existing directory works. <path> (repeatable) Docs: --dir | amp --no-tui --runner-id mac-mini --dir ~/code/amp --dir ~/code/sandcastle |
--discover-dirs | Makes a runner serve every Git checkout up to two levels beneath the current directory, or beneath a given path. Repeat with paths to scan several directories. optional =<path> (repeatable); stops at 200 checkouts Docs: --discover-dirs | amp --no-tui --runner-id mac-mini --discover-dirs=~/work --discover-dirs=~/code --discover-dirs |
--discover-depth | Scans deeper than two levels when discovering checkouts. On its own it implies --discover-dirs for the current directory. <levels> 1 to 10 (default 2) Docs: --discover-depth | amp --no-tui --runner-id mac-mini --discover-depth 3 |
--discover-exclude | Skips directories that match a .gitignore-style pattern during discovery. Repeatable; on its own it implies --discover-dirs for the current directory. <pattern> (repeatable) Docs: --discover-exclude | amp --no-tui --runner-id mac-mini --discover-exclude dotfiles --discover-exclude 'work/legacy' |
--no-serve-cwd | Disables automatic serving of the directory where the runner was started. Directories from --dir, --discover-dirs, and | amp --no-tui --runner-id mac-mini --no-serve-cwd --discover-dirs=~/code |
--amp-env | Lets a runner inject the Secrets & Env Vars configured on ampcode.com into the shell commands, MCP servers, and plugins of the threads it serves. Off by default; same as amp.runner.env.enabled. Docs: --amp-env | amp --no-tui --amp-env |
--share | Shares a runner with the members of your workspace for as long as it runs. Fails if a workspace admin has disabled sharing runners. Docs: --share | amp --no-tui --runner-id macos-builder --share |
--all | With | -no example |
--workspace | With | -no example |
--model-mapping | Sets which models a connection serves using comma- or newline-separated patterns in provider/model form; a leading - excludes and the last matching line wins. pattern list, e.g. "*/*,-openai/gpt-5.4" Docs: --model-mapping | amp config model-providers edit-router <connection-id> --model-mapping "*/*,-openai/gpt-5.4" |
--clear-model-mapping | Returns a connection's model mapping to the connection type's default. Docs: --clear-model-mapping | -no example |
--provider-model | Names the model for <provider/model> Docs: --provider-model | -no example |
--headers | Adds additional HTTP headers to a Custom URL model routing connection when a provider needs them. Docs: --headers | -no example |
--visibility | With private | workspace | group | unlisted Docs: --visibility | amp threads share T-… --visibility unlisted |
--no-git-setup | With | -no example |
--global | With | -no example |
--target | With workspace Docs: --target | -no example |
--server-url | With <url> Docs: --server-url | -no example |
--client-id | With <id> Docs: --client-id | -no example |
--client-secret | With <secret> Docs: --client-secret | -no example |
--scopes | With comma-separated scopes Docs: --scopes | -no example |
--personal | Scope option for | amp mcp remote --personal add Linear https://mcp.linear.app/mcp |
--workspace <workspace> | Scope option for <workspace> Docs: --workspace <workspace> | amp mcp remote --workspace acme add Linear https://mcp.linear.app/mcp |
--project <project> | Scope option for <project> Docs: --project <project> | amp mcp remote --project acme/app add Linear https://mcp.linear.app/mcp |
--current-project | Scope option for | amp mcp remote add Public https://mcp.example.com/mcp --auth none --current-project |
--auth | Selects the authentication type for none | bearer | oauth | workload-identity Docs: --auth | amp mcp remote add OAuth https://mcp.example.com/mcp --auth oauth --personal |
--bearer-token-file | Passes a bearer token for a remote MCP definition from a file; use - to read from standard input. Secret values are not accepted as command arguments. <path> | - Docs: --bearer-token-file | amp mcp remote add Private https://mcp.example.com/mcp --auth bearer --bearer-token-file /path/to/token --workspace acme |
--oauth-client-id | OAuth client ID for a remote MCP definition with --auth oauth. <id> Docs: --oauth-client-id | amp mcp remote add OAuth https://mcp.example.com/mcp --auth oauth --oauth-client-id <id> --oauth-client-secret-file /path/to/secret --workspace acme |
--oauth-client-secret-file | Passes an OAuth client secret for a remote MCP definition from a file; use - to read from standard input. <path> | - Docs: --oauth-client-secret-file | -no example |
--json | Structured output for | amp mcp remote tools github --personal --json |
--disabled | With | amp mcp remote --personal update Linear --disabled |
--refresh | With | amp mcp remote --personal tools Linear --refresh |
--yes | Confirms a destructive action, such as | amp mcp remote --personal remove Linear --yes |
--audience | With URL or URN Docs: --audience | amp orb id-token --audience https://logs.example.com |
--ttl-seconds | With 60 to 3600 seconds (default 10 minutes) Docs: --ttl-seconds | amp orb id-token \
--audience https://logs.example.com \
--ttl-seconds 3600 |
--subject-scope | With thread | user | project | workspace (default thread) Docs: --subject-scope | amp orb id-token \
--audience api://AzureADTokenExchange \
--subject-scope workspace |
--command | With <cmd> Docs: --command | amp orb service start docker-daemon --command 'sudo dockerd' |
--portal | With | -no example |
--title (orb portal/service) | Title of the portal link created by string Docs: --title (orb portal/service) | -no example |
--description | Setup or usage notes for a portal link created by string Docs: --description | -no example |
--cwd | With <path> Docs: --cwd | -no example |
--port | With <port> Docs: --port | -no example |
--hostname | With <hostname> Docs: --hostname | -no example |
--take-over | With | amp orb portal <port> --hostname <hostname> --take-over |
--amp-hosted | With | amp projects create --amp-hosted --name widgets |
--name | Project name for <name> Docs: --name | -no example |
--push | With | amp projects create --push |
--remote | With <name> Docs: --remote | -no example |
--workspace (projects create) | With | -no example |
--pre-setup-script-file | With <path> Docs: --pre-setup-script-file | amp projects update <namespace/name> --pre-setup-script-file ./pre-setup.sh |
--additional-repository | With <https-url> (repeatable, up to 20) Docs: --additional-repository | amp projects update acme/widgets \
--additional-repository https://github.com/acme/api \
--additional-repository https://github.com/acme/docs |
--clear-additional-repositories | With | amp projects update acme/widgets --clear-additional-repositories |
--repository-url | With <url> Docs: --repository-url | -no example |
--repository-mode | With github | mapped Docs: --repository-mode | -no example |
--base-branch | With <branch> Docs: --base-branch | -no example |
--clear-base-branch | With | -no example |
--remote-url | With <url> (repeatable) Docs: --remote-url | amp projects update acme/widgets \
--remote-url https://gitlab.com/acme/widgets \
--remote-url git@github.com:acme/widgets.git |
--clear-remote-urls | With | -no example |
--resource | With orb size, e.g. a1.small Docs: --resource | amp projects snapshots delete <project> --resource a1.small |
The rest of the Amp reference
FAQ
How many CLI flags does Amp have?
The official Amp docs list 84 CLI flags, including --help, --executor and --runner-dir. All of them are in the table above, in the docs' order.
What does --help do in Amp?
Shows more of what the CLI can do. amp clone --help shows every repository form and amp secrets --help lists the secrets operations. Example: amp --help
Where are Amp CLI flags documented?
On 19 official docs pages at ampcode.com, last read on October 17, 2026. Every row in the table links the exact section it came from.
Sources
Last verified . Names and examples are copied verbatim from the 19 official pages below, and every row above links the exact section it came from.
- ampcode.com/docs/cli4 items
- ampcode.com/docs/cli/execute-mode5 items
- ampcode.com/docs/cli/spawning-orbs6 items
- ampcode.com/docs/the-dial1 item
- ampcode.com/docs/orbs/sizes-and-costs1 item
- ampcode.com/docs/cli/streaming-json3 items
- ampcode.com/docs/cli/settings2 items
- ampcode.com/docs/cli/runners10 items
- ampcode.com/docs/cli/remote-control2 items
- ampcode.com/docs/customize/model-routing4 items
- ampcode.com/docs/threads1 item
- ampcode.com/docs/cli/clone1 item
- ampcode.com/docs/customize/skills1 item
- ampcode.com/docs/customize/global-plugins-and-skills1 item
- ampcode.com/docs/customize/mcp16 items
- ampcode.com/docs/orbs/handling-secrets3 items
- ampcode.com/docs/orbs/portals8 items
- ampcode.com/docs/projects13 items
- ampcode.com/docs/orbs/customizing2 items
Newsletter
Know when your tools change
One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.