CLI Commands
All commands are invoked as openacp <command> [subcommand] [options]. Every command accepts -h / --help for inline help.
JSON Output
Many commands accept a --json flag for machine-readable output. When --json is passed:
Output is a single line of valid JSON on stdout
Exit code
0for success, non-zero for errorsAll progress indicators and ANSI codes are suppressed
Success envelope (exit 0):
{ "success": true, "data": { ... } }Error envelope (exit non-zero):
{ "success": false, "error": { "code": "ERROR_CODE", "message": "Human-readable description" } }Commands that support --json are noted in their options tables below.
adopt
Transfers an existing external agent session into OpenACP so it appears as a messaging thread. Requires a running daemon.
Usage
Options
--cwd <path>
Working directory for the session (default: current directory)
--channel <name>
Target channel adapter, e.g. telegram, discord (default: first registered)
--json
Output result as JSON
Examples
JSON output (data shape):
attach
Connects to a running daemon and displays live status with log tailing. Useful for monitoring a daemon instance without opening a separate terminal.
Usage
Shows the daemon's current status (uptime, sessions, adapters, tunnel) and tails the log file. Press Ctrl+C to detach.
agents
Browse and manage AI coding agents from the ACP Registry.
Usage
agents (no subcommand)
Lists all installed agents and agents available to install from the registry.
Example
JSON output (data shape):
agents install
Installs an agent from the ACP Registry. Automatically installs the handoff integration if the agent supports it.
--force
Reinstall even if already installed
--json
Output result as JSON
JSON output (data shape):
agents uninstall
Removes an installed agent and its handoff integration (if any).
--json
Output result as JSON
JSON output (data shape):
agents info
Shows version, distribution type, command, setup steps, and installation status for an agent.
--json
Output result as JSON
JSON output (data shape):
agents run
Runs the agent's CLI directly (useful for first-run login and configuration). ACP-specific flags are automatically stripped before passing arguments.
Use -- to separate OpenACP flags from agent-specific arguments.
agents refresh
Force-refreshes the agent catalog from the ACP Registry, bypassing the normal staleness check.
api
Interacts with a running OpenACP daemon over the local REST API. Requires a running daemon (openacp start).
All api subcommands support --json for machine-readable output.
Usage
api cancel
Cancels a session.
api cleanup
Deletes finished topics from channel adapters.
--status accepts a comma-separated list (e.g. finished,error). Defaults to finished topics.
api config
Shows or updates runtime config. Prefer openacp config for general use — it works whether the daemon is running or not.
api bypass
Enables or disables bypass permissions for a session. When enabled, the agent runs destructive commands without confirmation prompts.
api delete-topic
Deletes a topic for a given session ID.
--force deletes even if the session is currently active.
api health
Shows system health: status, uptime, version, memory, session counts, adapters, and tunnel status.
api new
Creates a new session.
Both agent and workspace are optional. Uses defaultAgent and workspace.baseDir from config if omitted.
api notify
Sends a notification message to all registered channel adapters.
All remaining arguments are joined into the message.
api restart
Sends a restart signal to the running daemon.
api send
Sends a prompt to a session. The prompt is enqueued; responses arrive asynchronously via the channel adapter.
All arguments after <session-id> are joined as the prompt.
api session
Shows detailed information about one session.
api status
Lists all active sessions with ID, agent, status, and name.
api topics
Lists topics across all channel adapters.
--status accepts a comma-separated filter (e.g. active,finished).
api tunnel
Shows tunnel status (provider, URL).
api version
Shows the version of the currently running daemon.
dev
Runs OpenACP with a local plugin loaded in development mode. Compiles TypeScript automatically, starts tsc --watch for hot-reload, and boots the server with the plugin.
Usage
Options
--no-watch
Disable file watching (no hot-reload)
--verbose
Enable verbose logging
Examples
See Dev Mode for the full guide.
config
Views and edits configuration. Works with both a running and a stopped daemon.
Usage
openacp config (no args) opens an interactive terminal editor. When the daemon is running, changes are applied live via the API; otherwise the config file is edited directly.
openacp config set applies a single value by dot-notation path. Values are JSON-parsed if possible, otherwise treated as strings. Supports --json for scripted use.
JSON output for config set (data shape):
doctor
Runs system diagnostics. Checks config validity, agent availability, dependencies, and connectivity. Fixable issues can be auto-repaired interactively.
Usage
--dry-run
Report issues only; do not apply any fixes
--json
Output result as JSON (implies --dry-run; always exits 0 — check summary.failed for health)
JSON output (data shape):
install
Installs a plugin from npm into ~/.openacp/plugins/. Supports built-in plugins, community npm packages, and pinning a specific version with @version syntax.
Usage
--json
Output result as JSON
JSON output (data shape):
This is an alias for openacp plugin add. See plugin install for details.
integrate
Manages agent integrations that enable features like session handoff from an agent to OpenACP.
Usage
logs
Tails the daemon log file (last 50 lines, then follows new output). Equivalent to tail -f. Press Ctrl+C to stop.
Usage
Log directory is configured via logging.logDir (default: ~/.openacp/logs/).
onboard
Runs the first-run setup wizard if no config exists. If config already exists, runs the reconfiguration wizard, which allows modifying or disabling individual channels, agents, workspace settings, run mode, and integrations. Individual sections (e.g. a specific channel) can be modified, disabled, or deleted without affecting the rest of the config.
Usage
plugin create
Scaffolds a new OpenACP plugin project with all boilerplate: TypeScript config, test setup, lifecycle hooks, and package.json.
Usage
Runs an interactive wizard that prompts for:
Plugin name (npm package name, e.g.
@myorg/my-plugin)Description
Author
License
Creates a directory with src/index.ts, src/__tests__/index.test.ts, package.json, tsconfig.json, CLAUDE.md (AI agent context), PLUGIN_GUIDE.md (developer guide), and config files.
Example
See Getting Started: Your First Plugin for a full walkthrough.
plugin install
Installs a plugin package. Works with both built-in plugins and community plugins published to npm. Supports @version syntax to pin a specific version. After npm install, checks the plugin's engines.openacp field and warns if the installed CLI version is older than the minimum required.
Usage
--json
Output result as JSON
Examples
JSON output (data shape):
Community plugins are installed via npm install into ~/.openacp/plugins/node_modules/. The plugin's install() hook is called if defined.
plugin configure
Runs the configuration flow for an installed plugin. Calls the plugin's configure() hook, which typically presents interactive prompts to update settings.
Usage
Example
plugin enable / disable
Enables or disables an installed plugin without removing it. Disabled plugins are skipped during server startup.
Usage
--json
Output result as JSON
Examples
JSON output (data shape):
remote
Generates access links for connecting app clients to a running OpenACP instance. Displays local URL, tunnel URL (if enabled), app deep link, and a QR code.
Usage
--json
Output result as JSON (no QR code printed)
The generated link includes a single-use access code valid for 30 minutes. The app exchanges this code for a JWT token on first use.
Example output
JSON output (data shape):
See App Connectivity for the full guide.
plugins
Lists all plugins installed in ~/.openacp/plugins/.
Usage
--json
Output result as JSON
JSON output (data shape):
reset
Deletes all OpenACP data (~/.openacp) and allows starting fresh. This is destructive — config, plugins, and agent data are removed. The daemon must be stopped first.
Usage
Prompts for confirmation before proceeding.
restart
Restarts the daemon. By default uses the same run mode as configured; use --foreground or --daemon to override.
Usage
--foreground
Restart in foreground mode (not compatible with --json)
--daemon
Restart as background daemon
--json
Output result as JSON (always uses daemon mode)
JSON output (data shape):
start
Starts OpenACP. Requires an existing config (run openacp first to set up).
Usage
Options
--foreground
Force foreground mode regardless of config
--daemon
Force daemon mode regardless of config
--local
Use local .openacp/ instance in the current directory
--global
Use the global ~/.openacp/ instance
--dir <path>
Use a specific instance directory
--name <id>
Give the instance a name
--from <source>
Clone settings from an existing instance
--json
Output result as JSON
JSON output (data shape):
status
Shows whether the OpenACP daemon is running and its PID.
Usage
--all
Show status of all registered instances, not just the current one
--id <id>
Show status of a specific instance
--json
Output result as JSON
JSON output (data shape — all instances):
JSON output (data shape — single instance with --id):
stop
Sends a stop signal to the running daemon.
Usage
--json
Output result as JSON
JSON output (data shape):
tunnel
Manages tunnels to local ports. Requires a running daemon.
Usage
tunnel add
Creates a tunnel to a local port.
--json
Output result as JSON
JSON output (data shape):
tunnel list
Lists all active tunnels with their ports, labels, and public URLs.
--json
Output result as JSON
JSON output (data shape):
tunnel stop
Stops the tunnel for a specific local port.
--json
Output result as JSON
JSON output (data shape):
tunnel stop-all
Stops all user tunnels.
--json
Output result as JSON
JSON output (data shape):
uninstall
Removes an adapter plugin.
Usage
--json
Output result as JSON
JSON output (data shape):
update
Checks npm for the latest version of @openacp/cli and installs it if an update is available.
Usage
(no command / --foreground)
Running openacp with no arguments starts the server. On first run, the setup wizard launches. After setup, behavior depends on runMode in config:
foreground— runs in the current terminal.daemon— spawns a background process and exits.
If a daemon is already running, openacp shows a rich status display with an interactive menu instead of an error:
r — restart the daemon
f — restart in foreground mode
s — show full status
l — tail logs
q — quit
The startup display also shows which instance is active (global vs. local) and prints hints when a local instance is available but the global is being used.
openacp --foreground forces foreground mode regardless of config.
version
Prints the installed version. Also available as --version / -v.
Usage
--json
Output result as JSON
JSON output (data shape):
--help / -h
Prints the top-level help message listing all commands.
Last updated
Was this helpful?
