OpenACP/docs/guide/usage.md
dylan 1ea4b0e5f3 merge: sync upstream/develop into develop
Resolve README.md conflicts by adopting upstream's new content
(screenshots, supported agents table, setup wizard details, agent
management CLI) while preserving local additions (daemon mode,
CLI runtime, config editor features).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 38ccedede76e
2026-03-23 09:34:42 +07:00

4.2 KiB

Usage

CLI Commands

openacp                              # Start (first run: setup wizard)
openacp start                        # Start as background daemon
openacp stop                         # Stop daemon
openacp status                       # Show daemon status
openacp logs                         # Tail daemon logs
openacp config                       # Interactive config editor
openacp update                       # Update to latest version
openacp reset                        # Delete all data and start fresh
openacp --foreground                 # Force foreground mode

Daemon Mode

OpenACP can run as a background daemon:

openacp start                        # Start daemon
openacp stop                         # Stop daemon
openacp status                       # Check if running
openacp logs                         # Tail logs

On macOS, auto-start is supported via LaunchAgent. Enable it in openacp config → Run Mode → Enable auto-start.

CLI Runtime Commands

Control sessions from the terminal without Telegram. Requires a running daemon.

openacp runtime new claude ~/code/my-project   # Create session with agent + workspace
openacp runtime new                            # Create session with defaults
openacp runtime status                         # List active sessions
openacp runtime cancel <session-id>            # Cancel a session
openacp runtime agents                         # List available agents

Sessions created via CLI also appear as Telegram topics, so you can continue the conversation there.

Config Editor

Interactive editor for all settings:

openacp config

Sections: Telegram, Agent, Workspace, Security, Logging, Run Mode, API, Tunnel.

Telegram Commands

Command Description
/new [agent] [workspace] Create a new session (new topic)
/newchat New session, same agent & workspace
/cancel Cancel current session
/status Show session or system status
/agents List available agents
/help Show help
/menu Show menu keyboard

Examples

/new claude my-app          → Claude in ~/openacp-workspace/my-app/
/new codex api-server       → Codex in ~/openacp-workspace/api-server/
/new claude ~/code/project  → Absolute path
/new                        → Default agent and workspace

Session Flow

  1. /new claude my-project — creates a new forum topic + spawns agent
  2. Send your coding request
  3. Agent responds with streaming text, tool calls, code
  4. Permission needed → inline buttons (Allow / Always Allow / Reject)
  5. File written → "View file" link opens Monaco Editor in browser
  6. /cancel to stop, /new for another session

Workspaces

Input Resolves to
(none) ~/openacp-workspace/
my-app ~/openacp-workspace/my-app/
~/code/project ~/code/project/
/absolute/path /absolute/path/

Base directory is configurable via workspace.baseDir in config.

Session Persistence & Resume

Sessions survive OpenACP restarts:

  1. Session data is persisted to ~/.openacp/sessions.json
  2. After a restart, existing Telegram topics remain
  3. Send a message in an old topic → lazy resume kicks in:
    • Agent subprocess respawns with the same session ID
    • Agent reconnects to its internal state
    • Your message is forwarded to the resumed agent
  4. Sessions older than sessionStore.ttlDays (default: 30) are cleaned up

Resume works for sessions with status active or finished. Cancelled/error sessions are not resumable.

Skill Commands

AI agents can publish available skills (like /compact, /review, /debug). When they do:

  • An inline keyboard with skill buttons is pinned in the session topic
  • Click a skill button to invoke it
  • Skills update dynamically as the agent's capabilities change

Multiple Sessions

Run sessions in parallel — each /new creates a separate topic with its own agent subprocess. Limited by security.maxConcurrentSessions (default: 5).

Assistant

The Assistant topic is an always-on AI helper:

  • Knows your available agents and commands
  • Helps create sessions interactively
  • Provides guidance on OpenACP usage
  • Shows a menu keyboard on startup