CLI Reference
Complete command reference for the ClawButler CLI (`ap`), including runtime-host discovery, service tokens, and operator workflows.
Installation & Setup#
The ClawButler CLI (command: ap) is a Python tool installed via pip or `uv tool`:
# Install with pip
pip install clawbutler-cli
# Or with uv tool (recommended)
uv tool install clawbutler-cli
# Or run from repo
cd apps/cli && uv run ap --helpAfter installation, verify with:
$ ap --versionclawbutler-cli 0.1.0Authentication#
Before using any command, authenticate with your ClawButler instance:
Log in with email/password or API token. Creates a stored profile.
$ ap auth loginRefresh an expired access token using the stored refresh token.
$ ap auth refreshClear stored session tokens for one or all profiles.
$ ap auth logoutShow the current authenticated user's details.
$ ap auth whoamiThe CLI supports multiple profiles for switching between instances:
Show all stored profiles
$ ap profile listSwitch active profile
$ ap profile use <name>Delete a stored profile
$ ap profile remove <name>Command Tree#
Current top-level commands, grouped to roughly match the Web navigation.
Operate Commands
ap dashboardRead dashboard summaries and top-level operational healthap agentManage agents, related config, files, models, and skillsap approvalList, approve, reject, batch-process approvals and manage rulesap kill-switchEmergency stop and recovery (`trigger` / `recover`)ap activityInspect activity events, summaries, and long-running tasksap sessionList, inspect, watch, and analyze agent sessionsap chatManage chat sessions, messages, sends, and aborts
Insights Commands
ap auditSearch, inspect, and trace audit eventsap costView cost summaries, trends, and breakdowns by agent/model/taskap budgetManage budgets, resets, and enforcementap cronList, create, update, delete, and inspect cron job runsap configView config versions, diff, drift check, and rollback
Productivity Commands
ap memorySearch, inspect, and edit agent memory entriesap toolInspect tool monitors and refresh tool stateap reportGenerate reports and manage report subscriptionsap templateBrowse, validate, preview, and deploy templatesap runbookManage runbooks, versions, runs, approvals, and verificationap analyticsInspect root-cause, reliability, and value analytics
System Commands
ap connectorManage connectors, artifacts, sync, security checks, and diagnosticsap runtime-hostList paired runtime hosts, discover instances, batch-add connectors, sync attach-mode sessions, and inspect managed projectionsap service-tokenManage org-bound service tokens for MCP and automationap orgManage organizations, members, and rolesap notificationView and manage notification preferencesap health-checkRun system health checks and diagnosticsap infrastructureInspect infrastructure statusap supply-chainInspect supply chain findings and scans
Utility Commands
ap authLogin, logout, refresh tokens, and check identityap profileManage stored connection profilesap exportExport migration data and portable bundlesap importValidate and execute migration data importap routingInspect model routing suggestions and optimization actionsap capabilitiesShow capability profile and limits
Common Options#
These flags are available on most commands:
- ---json — Output as JSON instead of formatted tables
- ---page — Page number (default: 1)
- ---page-size — Items per page (default: 20, max: 100)
- ---date-from — Start date filter (YYYY-MM-DD)
- ---date-to — End date filter (YYYY-MM-DD)
- ---profile — Use a specific stored profile
- ---confirm — Required for destructive operations (delete, logout)
Example Workflows#
Daily Monitoring
Quickly check the operator state with canonical dashboard, agent, and approval commands:
$ ap dashboard summary
ap agent list --health-status error
ap approval list --status pendingCost Investigation
Drill into cost changes with summary, by-agent, and trend commands:
$ ap cost summary --date-from 2026-04-01
ap cost by-agent --date-from 2026-04-01
ap cost trend --granularity week --date-from 2026-04-01Emergency Response
Inspect one agent, trigger the kill switch if needed, then inspect audit history:
$ ap agent show <agent-id>
ap kill-switch trigger <agent-id> --reason "Unexpected outbound calls"
ap audit search --agent-id <agent-id> --date-from 2026-04-15Runtime Host intake
Complete the paired-host discovery and session-sync loop from terminal only:
$ ap runtime-host list
ap runtime-host discover <runtime-host-id>
ap runtime-host batch-add <runtime-host-id> --instance-key <instance-key>
ap runtime-host sync-sessions <runtime-host-id> --instance-key <instance-key>