Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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

Amp CLI flags
FlagDescriptionExample
--help

Shows more of what the CLI can do. amp clone --help shows every repository form and amp secrets --help lists the secrets operations.

Docs: --help
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. -ox is shorthand for --orb-execute -x; the CLI prints the new thread URL and exits while the agent keeps working.

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 --features fast and works with -x and piped input; execute mode otherwise defaults to Standard mode each time.

Docs: --fast
-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 -ox --stream-json otherwise archive the new thread.

Docs: --no-archive-after-execute
-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 amp runner dirs commands when more than one runner is running on the machine.

<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 runner dirs add are still served.

Docs: --no-serve-cwd
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 amp logout, removes all saved CLI accounts on every Amp server.

Docs: --all
-no example
--workspace

With amp config edit, edits workspace settings (.amp/settings.json) instead of user settings.

Docs: --workspace
-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 amp config model-providers check-access.

<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 amp threads share, sets who can open the thread.

private | workspace | group | unlisted

Docs: --visibility
amp threads share T-… --visibility unlisted
--no-git-setup

With amp clone, skips setting up Amp as a Git credential helper in your global Git config.

Docs: --no-git-setup
-no example
--global

With amp skill add, installs the skill only on the current machine under ~/.config/agents/skills/; warns if amp.skills.disableGlobalAgentsSkills is set.

Docs: --global
-no example
--target

With amp plugins add, workspace installs into the current project's .amp/plugins/ directory, not the hosted Workspace Plugins repository.

workspace

Docs: --target
-no example
--server-url

With amp mcp oauth login, the MCP server URL.

<url>

Docs: --server-url
-no example
--client-id

With amp mcp oauth login, the OAuth client ID created in the server's admin interface.

<id>

Docs: --client-id
-no example
--client-secret

With amp mcp oauth login, the OAuth client secret.

<secret>

Docs: --client-secret
-no example
--scopes

With amp mcp oauth login, the OAuth scopes to request.

comma-separated scopes

Docs: --scopes
-no example
--personal

Scope option for amp mcp remote: stores or selects the definition in your personal settings. Also used by amp projects create to make a personal project.

Docs: --personal
amp mcp remote --personal add Linear https://mcp.linear.app/mcp
--workspace <workspace>

Scope option for amp mcp remote: stores or selects the definition in a workspace.

<workspace>

Docs: --workspace <workspace>
amp mcp remote --workspace acme add Linear https://mcp.linear.app/mcp
--project <project>

Scope option for amp mcp remote: stores or selects the definition in a project.

<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: selects the Amp project that matches the current repository.

Docs: --current-project
amp mcp remote add Public https://mcp.example.com/mcp --auth none --current-project
--auth

Selects the authentication type for amp mcp remote add. workload-identity requires access granted by Amp staff.

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 commands; also accepted by amp skills list, amp tools show, amp orb services ensure, and amp config model-providers list.

Docs: --json
amp mcp remote tools github --personal --json
--disabled

With amp mcp remote update, disables the remote MCP definition.

Docs: --disabled
amp mcp remote --personal update Linear --disabled
--refresh

With amp mcp remote tools, refreshes the server's tool list.

Docs: --refresh
amp mcp remote --personal tools Linear --refresh
--yes

Confirms a destructive action, such as amp mcp remote remove or deactivating a subscription with amp config model-providers deactivate.

Docs: --yes
amp mcp remote --personal remove Linear --yes
--audience

With amp orb id-token, the intended service (aud claim) the token is minted for.

URL or URN

Docs: --audience
amp orb id-token --audience https://logs.example.com
--ttl-seconds

With amp orb id-token, the token lifetime.

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 amp orb id-token, controls the shape of the sub claim; broader scopes remove narrower layers. During setup only project or workspace scopes are allowed.

thread | user | project | workspace (default thread)

Docs: --subject-scope
amp orb id-token \ --audience api://AzureADTokenExchange \ --subject-scope workspace
--command

With amp orb service start, the shell command to run as the service.

<cmd>

Docs: --command
amp orb service start docker-daemon --command 'sudo dockerd'
--portal

With amp orb service start, waits for the listener, detects HTTP or HTTPS, writes .amp/portals/<name>.json, and prints the URL.

Docs: --portal
-no example
--title (orb portal/service)

Title of the portal link created by amp orb service start --portal or amp orb portal.

string

Docs: --title (orb portal/service)
-no example
--description

Setup or usage notes for a portal link created by amp orb service start --portal or amp orb portal.

string

Docs: --description
-no example
--cwd

With amp orb service start, the working directory for the service.

<path>

Docs: --cwd
-no example
--port

With amp orb service start, a fixed port for the service.

<port>

Docs: --port
-no example
--hostname

With amp orb portal, gives one portal a specific managed hostname (<name>--<namespace>.onamp.dev) or a hostname on a custom domain.

<hostname>

Docs: --hostname
-no example
--take-over

With amp orb portal --hostname, moves a custom hostname from another thread's portal to the current portal.

Docs: --take-over
amp orb portal <port> --hostname <hostname> --take-over
--amp-hosted

With amp projects create, starts the project with a blank repository hosted by Amp.

Docs: --amp-hosted
amp projects create --amp-hosted --name widgets
--name

Project name for amp projects create --amp-hosted, or a new name with amp projects update.

<name>

Docs: --name
-no example
--push

With amp projects create, run inside a local repository to create an Amp-hosted project, add its clone URL as origin, and push the current branch. Name defaults to the directory name.

Docs: --push
amp projects create --push
--remote

With amp projects create --push, uses a remote name other than origin.

<name>

Docs: --remote
-no example
--workspace (projects create)

With amp projects create, makes the workspace the project owner; --personal makes it personal.

Docs: --workspace (projects create)
-no example
--pre-setup-script-file

With amp projects update, sets the project's Pre-setup Script from a file.

<path>

Docs: --pre-setup-script-file
amp projects update <namespace/name> --pre-setup-script-file ./pre-setup.sh
--additional-repository

With amp projects update, replaces the project's additional repositories; repeat for each HTTPS URL.

<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, removes all additional repositories.

Docs: --clear-additional-repositories
amp projects update acme/widgets --clear-additional-repositories
--repository-url

With amp projects update, changes the primary URL of a mapped repository or migrates an Amp-hosted project to an external repository. Does not copy Git data.

<url>

Docs: --repository-url
-no example
--repository-mode

With amp projects update, links the URL as a GitHub repository or treats a GitHub-linked project as a plain Git URL.

github | mapped

Docs: --repository-mode
-no example
--base-branch

With amp projects update, sets the branch orbs check out and Ship targets.

<branch>

Docs: --base-branch
-no example
--clear-base-branch

With amp projects update, clears the base branch so the repository's default branch is used.

Docs: --clear-base-branch
-no example
--remote-url

With amp projects update, sets Git Remote Aliases used to match local CLI checkouts to the project. Each update replaces the whole list.

<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 amp projects update, removes all Git Remote Aliases.

Docs: --clear-remote-urls
-no example
--resource

With amp projects snapshots delete, deletes only the snapshot for one orb size.

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.

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.