Skip to content

CLI reference

opencorvus is the unified entry CLI; subcommands are registered in packages/opencorvus/src/index.ts.

opencorvus is the unified CLI command. Source subcommands are registered in packages/opencorvus/src/index.ts; local builds emit binaries under packages/opencorvus/dist/opencorvus-<platform>/opencorvus.

Global flags

flagpurpose
--help, -hShow help
--version, -vShow version
--print-logsPrint logs to stderr
--log-level LEVELDEBUG, INFO, WARN, or ERROR

Subcommands

opencorvus serve

Starts the headless HTTP API server.

Terminal window
opencorvus serve [flags]
flagdefaultpurpose
--hostname127.0.0.1Listen address; --mdns uses 0.0.0.0 unless configured
--port7878Listen port
--project-dircwd()Target repo
--mdnsoffEnable mDNS discovery
--mdns-domainopencorvus.localmDNS domain
--cors <origin>noneExtra allowed CORS origin; repeat for multiple origins

Set OPENCORVUS_SERVER_PASSWORD via environment variable, not a CLI flag.

opencorvus run

Runs a task from the command line.

Terminal window
opencorvus run "Add unit tests for src/foo.ts" [flags]

| flag | purpose | | ----------------------- | ----------------------------------------------------- | ------------------------------------------ | | --command CMD | Run CMD and use message arguments as command args | | --continue, -c | Continue the last session | | --session ID, -s ID | Continue a specific session | | --fork | Fork before continuing a session | | --share | Produce a share link | | --model MODEL, -m | Use provider/model for the session | | --agent NAME | Use a named agent | | --format <format> (default or json) | Select formatted output or raw JSON events | | --file PATH, -f | Attach one or more files | | --title TITLE | Set the session title | | --attach URL | Attach to a running OpenCorvus server | | --dir PATH | Run in a directory; remote path when using --attach | | --port PORT | Local server port | | --variant VALUE | Provider-specific reasoning variant | | --thinking | Show thinking blocks |

opencorvus auth

Provider credentials are managed with explicit subcommands.

Terminal window
opencorvus auth login [url]
opencorvus auth logout
opencorvus auth list

opencorvus models

Lists available models. Pass a provider ID to restrict output.

Terminal window
opencorvus models
opencorvus models openai --verbose
opencorvus models --refresh

opencorvus mcp

MCP (Model Context Protocol) servers are managed through the mcp command group.

Terminal window
opencorvus mcp list
opencorvus mcp add
opencorvus mcp auth [name]
opencorvus mcp auth list
opencorvus mcp logout [name]
opencorvus mcp debug <name>

opencorvus mcp browser is an internal browser-sidecar entrypoint.

Other common commands

CommandPurpose
opencorvus acpStart the Agent Client Protocol server
opencorvus dbOpen the SQLite shell, run a positional query, print path, or reset
opencorvus debugDebug config, files, LSP, snapshots, skills, and paths
opencorvus doctorDiagnose installation and runtime dependencies
opencorvus export [sessionID]Export session data as JSON
opencorvus generateRun configured generation
opencorvus githubGitHub Action runtime entrypoint
opencorvus importImport sessions or tasks
opencorvus prPull-request helpers
opencorvus sessionSession management
opencorvus statsStatistics
opencorvus upgradeSelf-upgrade
opencorvus uninstallUninstall

Run any command with --help for its exact options.

Exit codes

The CLI sets exit code 1 for fatal runtime errors. Successful runs exit with 0; interrupted processes use the runtime’s signal handling.

Earlier drafts planned dedicated config and task-failure exit codes. They are not implemented in the current CLI.

Shell completion

Terminal window
opencorvus completion > opencorvus-completion.sh