跳到主要内容

CLI Reference

picoclaw is the main binary: chat with the agent, start the Gateway, and manage models, credentials, channels, skills, MCP servers, and scheduled tasks from the command line. The browser-based Web UI is served by a separate binary — see the Web UI & Launcher Guide.

picoclaw [command]

Every command accepts the global --no-color flag, which disables ANSI colors in the output. Run picoclaw <command> --help to see the authoritative flags for your build.

GroupPurpose
onboardInitialize configuration and workspace
config resetReset configuration to factory defaults
status / version / updateInspect and update the installation
usageShow token usage and cost per session
agentInteract with the agent directly
gatewayStart the Gateway service
model / model addShow, set, and add models
authOAuth login, credentials, and QR channel setup
skillsInstall and manage skills
cronManage scheduled tasks
pluginManage agent plugins
mcpManage MCP servers
migrateMigrate from OpenClaw

Onboard​

Initializes a fresh configuration file and workspace. On first install, run this before anything else. Alias: o.

FlagDescription
--encEnable credential encryption (generates an SSH key and prompts for a passphrase)
picoclaw onboard
picoclaw onboard --enc

Config reset​

Resets the configuration to factory defaults.

FlagDescription
-f, --forceSkip the confirmation prompt
picoclaw config reset --force

Status / version / update​

picoclaw status # Show configuration, model, and runtime status (alias: s)
picoclaw version # Show version information (alias: v)
picoclaw update # Check for a newer release and ask before applying it

update queries the latest GitHub release first and prints the current and latest versions. When no newer release exists, it exits without downloading. When one exists, it asks for confirmation before downloading and replacing the binary; a non-interactive stdin (for example in a script) applies the update without prompting. Development builds created by the Makefile (v0.5.4-128-g…) are compared by the tag they are based on. Do not restart or power off the device while the update is downloading or being applied.

update flags:

FlagDescription
--platformTarget platform (default: current GOOS)
--archTarget architecture (default: current GOARCH)
-u, --urlDirect URL to a release asset or release page
--checkOnly check for a newer release; never download or apply it
-y, --yesApply the update without asking for confirmation

Usage​

Reports the provider-reported token usage and cost recorded for each session under <workspace>/sessions.

picoclaw usage # Top 20 sessions by total tokens
picoclaw usage --limit 0 # All sessions
picoclaw usage -s cli:default # One session, with the per-model breakdown
picoclaw usage --json # Machine-readable output
FlagDescription
-s, --sessionSession key or alias to inspect. An alias must name one session; pass the key when several sessions share it.
-n, --limitMaximum sessions to list (default 20, 0 shows all). Also applies to --json.
--jsonEmit JSON instead of a table. Log lines go to stderr, so stdout stays parseable.

Each session keeps running totals in its metadata, updated as messages are written. Truncating, compacting, or clearing a session's history does not reduce its totals. The command only reads metadata, so it can run while the gateway is active. Pruning a session also deletes its totals. Sessions written before this version have no totals yet: the gateway counts them from their files when it starts, and picoclaw usage counts them on the fly until then.

Input tokens are split into fresh prompt tokens, cache reads, and cache writes, each shown with its percentage of all input tokens. Percentages are rounded to one decimal and may not add up to exactly 100%. Costs are the amounts providers report; a session whose provider reports no cost shows - in tables.

Agent​

Interact with the agent directly. Without -m, it starts an interactive terminal session.

FlagDescription
-m, --messageSend a single message (non-interactive mode)
--modelModel to use for this run
-s, --sessionSession key (default cli:default)
-d, --debugEnable debug logging
picoclaw agent
picoclaw agent -m "Summarize today's cron output" --model claude-sonnet-4.6
picoclaw agent -s my-project -m "What changed in the workspace?"

Gateway​

Starts the long-running service that owns channels, tools, cron, and the HTTP endpoints. Alias: g. See the Gateway HTTP API for endpoints and the Debugging guide for log details.

FlagDescription
-E, --allow-emptyContinue starting even when no default model is configured
-d, --debugEnable debug logging
-T, --no-truncateDisable string truncation in debug logs
--hostHost address for gateway binding (overrides gateway.host for this run)
picoclaw gateway
picoclaw gateway --debug
picoclaw gateway -E --host 0.0.0.0

Model​

Shows or changes the default model.

  • picoclaw model — show the current default model.
  • picoclaw model <model_name> — set the default model.
  • picoclaw model local-model — special value for a local vLLM server (default localhost:8000, no API key required).
picoclaw model # Show current default
picoclaw model gpt-5.2 # Set default model
picoclaw model local-model # Use a local vLLM server

Model add​

Adds a model entry by querying an OpenAI-compatible endpoint (GET <api-base>/models) and sets it as default. If --model is omitted, available models are listed and you pick one interactively; when provided, the entry is written without contacting the server.

FlagDescription
-b, --api-baseAPI base URL (required), e.g. https://api.openai.com/v1
-k, --api-keyAPI key (required)
-m, --modelModel id; skips the interactive picker and the network call
-n, --nameLocal alias written to model_list and used as the default model name (default custom-prefer)
--typeEndpoint type; only openai-compatible is supported today
picoclaw model add --api-base https://api.openai.com/v1 --api-key sk-...
picoclaw model add -b http://localhost:8000/v1 -k dummy -m my-model -n local

Auth​

Manages credentials and channel QR flows. Providers and model_list setup are covered in Providers & Model Configuration.

SubcommandPurpose
auth loginLogin via OAuth or paste a token
auth logoutRemove stored credentials (-p, --provider for one provider; empty = all)
auth statusShow current auth status
auth modelsShow available models for the authenticated providers
auth wecomScan a WeCom QR code and configure channels.wecom (--timeout, default 5m)
auth weixinConnect a WeChat personal account via QR code

auth login flags:

FlagDescription
-p, --providerProvider to login with (openai, anthropic, google-antigravity, antigravity)
--device-codeUse the device code flow (for headless environments)
--no-browserDo not auto-open a browser during OAuth login
--setup-tokenUse the setup-token flow for Anthropic (from claude setup-token)

auth weixin flags:

FlagDefaultDescription
--timeout300Login timeout in seconds
--proxy(none)HTTP proxy URL (e.g. http://localhost:7890)
--base-urlhttps://ilinkai.weixin.qq.com/iLink API base URL
picoclaw auth login --provider anthropic
picoclaw auth login --provider openai --device-code
picoclaw auth wecom
picoclaw auth weixin --timeout 300
picoclaw auth weixin --proxy http://localhost:7890

Skills​

Manages installed skills, builtin skills, and registry installs. See the Skills Authoring Guide for the SKILL.md format and Skills tools for registry settings.

SubcommandPurpose
skills listList installed skills
skills show <name>Show skill details
skills search [query]Search available skills
skills install <owner>/<repo>/<path>Install a skill from GitHub, or --registry <name> <slug> from a configured registry
skills install-builtinInstall all builtin skills to the workspace
skills list-builtinList available builtin skills
skills remove <name>Remove an installed skill (aliases: rm, uninstall)
picoclaw skills list
picoclaw skills install sipeed/picoclaw-skills/weather
picoclaw skills install --registry clawhub github

Cron​

Manages scheduled tasks that deliver agent-generated messages to a channel. Alias: c. Job behavior, delivery modes, and storage are documented in Scheduled Tasks and Cron Jobs.

SubcommandPurpose
cron addAdd a new scheduled job
cron listList all scheduled jobs
cron enable <id> / cron disable <id>Enable or disable a job
cron remove <id>Remove a job by ID

cron add flags:

FlagDescription
-n, --nameJob name
-m, --messageMessage for the agent
-c, --cronCron expression (e.g. '0 9 * * *')
-e, --everyRun every N seconds
--channelChannel for delivery
--toRecipient for delivery
picoclaw cron add --name "Morning brief" --message "Summarize my calendar" --cron "0 9 * * *" --channel telegram --to 123456789
picoclaw cron list
picoclaw cron disable 1

Plugin​

Manages agent plugin entries in config.json. Full reference: Plugin CLI.

SubcommandPurpose
plugin listList installed plugins
plugin show <name>Show plugin details
plugin add <name> <path-or-url>Add or update a plugin
plugin remove <name>Remove a plugin (alias: rm)
plugin enable <name> / plugin disable <name>Enable or disable a plugin
plugin editOpen the plugin config in $EDITOR
plugin initScaffold a new plugin package
plugin validate <path>Validate a plugin package
plugin test <name>Test a plugin

MCP​

Manages MCP server entries in config.json. The dedicated workflow with examples lives in MCP Server CLI.

SubcommandPurpose
mcp add <name> <command-or-url> [args...]Add or update an MCP server
mcp listList configured servers (--status pings enabled servers)
mcp show <name>Show details and tools for a server
mcp test <name>Test connectivity
mcp editOpen the PicoClaw config in $EDITOR
mcp remove <name>Remove a server from config
mcp login <name> / mcp logout <name>Manage browser OAuth credentials for a server

mcp add highlights: -t, --transport (stdio, http/streamable-http, sse; default stdio), -e, --env KEY=value (repeatable), --env-file, -H, --header, --inherit-env, --deferred/--no-deferred, -f, --force.

picoclaw mcp add filesystem npx -y @modelcontextprotocol/server-filesystem ~/notes
picoclaw mcp add remote https://example.com/mcp --transport http
picoclaw mcp list --status

Migrate​

Migrates configuration and workspace files from OpenClaw into PicoClaw.

FlagDescription
--fromSource to migrate from (default openclaw)
--source-homeOverride source home directory (default: ~/.openclaw)
--target-homeOverride target home directory (default: ~/.picoclaw)
--dry-runShow what would be migrated without making changes
--config-only / --workspace-onlyMigrate only config or only workspace files
--refreshRe-sync workspace files from OpenClaw (repeatable)
--forceSkip confirmation prompts
picoclaw migrate --dry-run
picoclaw migrate --from openclaw