Skip to content

CLI Reference

acpctl is the command-line interface for the Ambient Code Platform. You can use it to create and manage sessions, switch between projects, and automate workflows from your terminal.

Download the latest binary from your organization’s ACP deployment or build it from source:

Terminal window
cd components/ambient-cli
go build -o acpctl ./cmd/acpctl

Move the binary to a directory in your PATH:

Terminal window
sudo mv acpctl /usr/local/bin/

Verify the installation:

Terminal window
acpctl version

Authenticate with the ACP API server by providing an access token. The token is saved to your local configuration file.

Terminal window
acpctl login --token <your-token>

You can also specify the API server URL and a default project in the same command:

Terminal window
acpctl login --token <your-token> --url https://acp.example.com --project my-project

If the server uses a self-signed certificate, add the --insecure-skip-tls-verify flag:

Terminal window
acpctl login --token <your-token> --url https://acp.example.com --insecure-skip-tls-verify

You can pass the server URL as a positional argument instead of using --url:

Terminal window
acpctl login https://acp.example.com --token <your-token>
FlagDescription
--tokenAccess token (required)
--urlAPI server URL (default: http://localhost:8000)
--projectDefault project name
--insecure-skip-tls-verifySkip TLS certificate verification

Remove saved credentials from the configuration file:

Terminal window
acpctl logout

Display the current user, token expiration, API URL, and active project:

Terminal window
acpctl whoami

Example output for a JWT token:

User: jane.doe
Email: jane@example.com
Expires: 2026-04-01T12:00:00Z
API URL: https://acp.example.com
Project: my-project

acpctl stores configuration in a JSON file. The default location depends on your operating system: ~/.config/ambient/config.json on Linux, ~/Library/Application Support/ambient/config.json on macOS. Override the location with the AMBIENT_CONFIG environment variable.

Terminal window
acpctl config get <key>

Valid keys: api_url, project, pager, access_token (redacted in output).

Terminal window
acpctl config get api_url
# https://acp.example.com
Terminal window
acpctl config set <key> <value>

Valid keys: api_url, project, pager.

Terminal window
acpctl config set api_url https://acp.example.com
acpctl config set project my-project
KeyDescriptionDefault
api_urlACP API server URLhttp://localhost:8000
projectActive project name(none)
pagerPager program for output(none)
access_tokenAuthentication token (set via login)(none)
request_timeoutRequest timeout in seconds30
polling_intervalWatch polling interval in seconds2
insecure_tls_verifySkip TLS verificationfalse

Most commands operate within a project context. Set the active project before creating or managing sessions.

Terminal window
acpctl project set my-project

Or use the shorthand:

Terminal window
acpctl project my-project

The CLI validates that the project exists on the server before saving it to your configuration.

Terminal window
acpctl project current

Or use the shorthand (no arguments):

Terminal window
acpctl project
Terminal window
acpctl project list
Terminal window
acpctl create project --name my-project

Optionally set a display name and description:

Terminal window
acpctl create project --name my-project --display-name "My Project" --description "Team workspace"
FlagDescription
--nameProject name (required). Must be lowercase alphanumeric with hyphens, 63 characters max.
--display-nameHuman-readable display name
--descriptionProject description
-o, --outputOutput format: json
Terminal window
acpctl get projects

Get a specific project:

Terminal window
acpctl get project my-project
Terminal window
acpctl describe project my-project

Output is JSON with the full project resource.

Terminal window
acpctl delete project my-project

Add -y to skip the confirmation prompt:

Terminal window
acpctl delete project my-project -y

A project context must be set before you create a session.

Terminal window
acpctl create session --name fix-login-bug --prompt "Fix the null pointer in the login handler" --repo-url https://github.com/org/repo
FlagDescription
--nameSession name (required)
--promptTask prompt for the agent
--repo-urlRepository URL to clone
--modelLLM model to use
--max-tokensMaximum output tokens
--temperatureLLM temperature (0.0-1.0)
--timeoutSession timeout in seconds
-o, --outputOutput format: json
Terminal window
acpctl get sessions

Get a specific session:

Terminal window
acpctl get session <session-id>

Output in JSON format:

Terminal window
acpctl get sessions -o json

Use wide output for additional columns:

Terminal window
acpctl get sessions -o wide
FlagDescription
-o, --outputOutput format: json or wide
--limitMaximum number of items to return (default: 100)
-w, --watchWatch for real-time session changes
--watch-timeoutTimeout for watch mode (default: 30m, e.g. 1h, 10m)

Monitor session changes in real time:

Terminal window
acpctl get sessions -w

The watch uses gRPC streaming when available. If the server does not support streaming, the CLI falls back to polling. Press Ctrl+C to stop watching.

Terminal window
acpctl describe session <session-id>

Output is JSON with the full session resource.

Start a session that is in a stopped or pending state:

Terminal window
acpctl start <session-id>

Stop a running session:

Terminal window
acpctl stop <session-id>
Terminal window
acpctl delete session <session-id>

Add -y to skip the confirmation prompt:

Terminal window
acpctl delete session <session-id> -y

You can also manage project settings and users through the get and describe commands.

Terminal window
acpctl get project-settings
acpctl describe project-settings <id>
acpctl delete project-settings <id>

Resource aliases: projectsettings, ps.

Terminal window
acpctl get users
acpctl describe user <username>

Resource aliases: user, usr.

FlagDescription
--insecure-skip-tls-verifySkip TLS certificate verification for all commands
--versionPrint the version and exit

Environment variables override values in the configuration file.

VariableDescriptionOverrides config key
AMBIENT_CONFIGPath to the configuration file(file location)
AMBIENT_API_URLAPI server URLapi_url
AMBIENT_TOKENAccess tokenaccess_token
AMBIENT_PROJECTActive project nameproject
AMBIENT_REQUEST_TIMEOUTRequest timeout in secondsrequest_timeout
AMBIENT_POLLING_INTERVALWatch polling interval in secondspolling_interval

Generate completion scripts for your shell:

Terminal window
# Bash
acpctl completion bash > /etc/bash_completion.d/acpctl
# Zsh
acpctl completion zsh > "${fpath[1]}/_acpctl"
# Fish
acpctl completion fish > ~/.config/fish/completions/acpctl.fish
# PowerShell
acpctl completion powershell > acpctl.ps1

Restart your shell or source the completion file to enable tab completion.