CLI コマンド

CLI リファレンス

このページでは現在の CLI の動作について説明します。コマンドが変更された場合は、このドキュメントを更新してください。

コマンドページ

グローバルフラグ

  • --dev: 状態を ~/.openclaw-dev 下に分離し、デフォルトポートをシフトします。
  • --profile <name>: 状態を ~/.openclaw-<name> 下に分離します。
  • --no-color: ANSI カラーを無効にします。
  • --update: openclaw update のショートハンド (ソースインストールのみ)。
  • -V, --version, -v: バージョンを表示して終了します。

出力スタイル

  • ANSI カラーとプログレスインジケーターは TTY セッションでのみレンダリングされます。
  • OSC-8 ハイパーリンクは、対応するターミナルではクリック可能なリンクとしてレンダリングされます。それ以外の場合はプレーンな URL にフォールバックします。
  • --json (およびサポートされている場合の --plain) は、クリーンな出力のためにスタイリングを無効にします。
  • --no-color は ANSI スタイリングを無効にします。NO_COLOR=1 も尊重されます。
  • 長時間実行されるコマンドはプログレスインジケーターを表示します (サポートされている場合は OSC 9;4)。

カラーパレット

OpenClaw は CLI 出力にロブスターパレットを使用します。

  • accent (#FF5A2D): 見出し、ラベル、主要なハイライト。
  • accentBright (#FF7A3D): コマンド名、強調。
  • accentDim (#D14A22): 二次的なハイライトテキスト。
  • info (#FF8A5B): 情報的な値。
  • success (#2FBF71): 成功状態。
  • warn (#FFB020): 警告、フォールバック、注意。
  • error (#E23D2D): エラー、失敗。
  • muted (#8B7F77): 強調を弱める、メタデータ。

パレットの信頼できる情報源: src/terminal/palette.ts (別名「ロブスターシーム」)。

コマンドツリー

openclaw [--dev] [--profile <name>] <command>
  setup
  onboard
  configure
  config
    get
    set
    unset
  completion
  doctor
  dashboard
  security
    audit
  secrets
    reload
    migrate
  reset
  uninstall
  update
  channels
    list
    status
    logs
    add
    remove
    login
    logout
  directory
  skills
    list
    info
    check
  plugins
    list
    info
    install
    enable
    disable
    doctor
  memory
    status
    index
    search
  message
  agent
  agents
    list
    add
    delete
  acp
  status
  health
  sessions
  gateway
    call
    health
    status
    probe
    discover
    install
    uninstall
    start
    stop
    restart
    run
  daemon
    status
    install
    uninstall
    start
    stop
    restart
  logs
  system
    event
    heartbeat last|enable|disable
    presence
  models
    list
    status
    set
    set-image
    aliases list|add|remove
    fallbacks list|add|remove|clear
    image-fallbacks list|add|remove|clear
    scan
    auth add|setup-token|paste-token
    auth order get|set|clear
  sandbox
    list
    recreate
    explain
  cron
    status
    list
    add
    edit
    rm
    enable
    disable
    runs
    run
  nodes
  devices
  node
    run
    status
    install
    uninstall
    start
    stop
    restart
  approvals
    get
    set
    allowlist add|remove
  browser
    status
    start
    stop
    reset-profile
    tabs
    open
    focus
    close
    profiles
    create-profile
    delete-profile
    screenshot
    snapshot
    navigate
    resize
    click
    type
    press
    hover
    drag
    select
    upload
    fill
    dialog
    wait
    evaluate
    console
    pdf
  hooks
    list
    info
    check
    enable
    disable
    install
    update
  webhooks
    gmail setup|run
  pairing
    list
    approve
  qr
  clawbot
    qr
  docs
  dns
    setup
  tui

注: プラグインは追加のトップレベルコマンドを追加できます (例: openclaw voicecall)。

セキュリティ

  • openclaw security audit — 一般的なセキュリティの落とし穴について、設定とローカル状態を監査します。
  • openclaw security audit --deep — ベストエフォートでのライブゲートウェイプローブ。
  • openclaw security audit --fix — 安全なデフォルトを強化し、状態/設定の chmod を行います。

シークレット

  • openclaw secrets reload — 参照を再解決し、ランタイムスナップショットをアトミックに交換します。
  • openclaw secrets audit — 平文の残留物、未解決の参照、優先順位のずれをスキャンします。
  • openclaw secrets configure — プロバイダーセットアップ + SecretRef マッピング + プレフライト/適用のためのインタラクティブヘルパー。
  • openclaw secrets apply --from <plan.json> — 以前に生成されたプランを適用します (--dry-run をサポート)。

プラグイン

拡張機能とその設定を管理します:

  • openclaw plugins list — プラグインを発見します (機械出力には --json を使用)。
  • openclaw plugins info <id> — プラグインの詳細を表示します。
  • openclaw plugins install <path|.tgz|npm-spec> — プラグインをインストールします (またはプラグインパスを plugins.load.paths に追加します)。
  • openclaw plugins enable <id> / disable <id>plugins.entries.<id>.enabled を切り替えます。
  • openclaw plugins doctor — プラグイン読み込みエラーを報告します。

ほとんどのプラグイン変更にはゲートウェイの再起動が必要です。/plugin を参照してください。

メモリ

MEMORY.md + memory/*.md に対するベクター検索:

  • openclaw memory status — インデックス統計を表示します。
  • openclaw memory index — メモリファイルを再インデックスします。
  • openclaw memory search "<query>" (または --query "<query>") — メモリに対するセマンティック検索。

チャットスラッシュコマンド

チャットメッセージは /... コマンドをサポートします (テキストおよびネイティブ)。/tools/slash-commands を参照してください。ハイライト:

  • /status クイック診断用。
  • /config 永続化された設定変更用。
  • /debug ランタイムのみの設定オーバーライド用 (メモリ内、ディスクには保存されません; commands.debug: true が必要)。

セットアップ + オンボーディング

setup

設定とワークスペースを初期化します。オプション:

  • --workspace <dir>: エージェントワークスペースパス (デフォルト ~/.openclaw/workspace)。
  • --wizard: オンボーディングウィザードを実行します。
  • --non-interactive: プロンプトなしでウィザードを実行します。
  • --mode <local|remote>: ウィザードモード。
  • --remote-url <url>: リモートゲートウェイ URL。
  • --remote-token <token>: リモートゲートウェイトークン。

ウィザードフラグが存在する場合 (--non-interactive, --mode, --remote-url, --remote-token)、ウィザードは自動的に実行されます。

onboard

ゲートウェイ、ワークスペース、スキルをセットアップするインタラクティブウィザード。オプション:

  • --workspace <dir>
  • --reset (ウィザード前に設定 + 認証情報 + セッションをリセット)
  • --reset-scope <config|config+creds+sessions|full> (デフォルト config+creds+sessions; ワークスペースも削除するには full を使用)
  • --non-interactive
  • --mode <local|remote>
  • --flow <quickstart|advanced|manual> (manual は advanced のエイリアス)
  • --auth-choice <setup-token|token|chutes|openai-codex|openai-api-key|openrouter-api-key|ai-gateway-api-key|moonshot-api-key|moonshot-api-key-cn|kimi-code-api-key|synthetic-api-key|venice-api-key|gemini-api-key|zai-api-key|mistral-api-key|apiKey|minimax-api|minimax-api-lightning|opencode-zen|custom-api-key|skip>
  • --token-provider <id> (非対話型; --auth-choice token と共に使用)
  • --token <token> (非対話型; --auth-choice token と共に使用)
  • --token-profile-id <id> (非対話型; デフォルト: <provider>:manual)
  • --token-expires-in <duration> (非対話型; 例: 365d, 12h)
  • --secret-input-mode <plaintext|ref> (デフォルト plaintext; 平文キーの代わりにプロバイダーデフォルトの環境参照を保存するには ref を使用)
  • --anthropic-api-key <key>
  • --openai-api-key <key>
  • --mistral-api-key <key>
  • --openrouter-api-key <key>
  • --ai-gateway-api-key <key>
  • --moonshot-api-key <key>
  • --kimi-code-api-key <key>
  • --gemini-api-key <key>
  • --zai-api-key <key>
  • --minimax-api-key <key>
  • --opencode-zen-api-key <key>
  • --custom-base-url <url> (非対話型; --auth-choice custom-api-key と共に使用)
  • --custom-model-id <id> (非対話型; --auth-choice custom-api-key と共に使用)
  • --custom-api-key <key> (非対話型; オプション; --auth-choice custom-api-key と共に使用; 省略時は CUSTOM_API_KEY にフォールバック)
  • --custom-provider-id <id> (非対話型; オプションのカスタムプロバイダー ID)
  • --custom-compatibility <openai|anthropic> (非対話型; オプション; デフォルト openai)
  • --gateway-port <port>
  • --gateway-bind <loopback|lan|tailnet|auto|custom>
  • --gateway-auth <token|password>
  • --gateway-token <token>
  • --gateway-token-ref-env <name> (非対話型; gateway.auth.token を環境 SecretRef として保存; その環境変数が設定されている必要があります; --gateway-token と組み合わせることはできません)
  • --gateway-password <password>
  • --remote-url <url>
  • --remote-token <token>
  • --tailscale <off|serve|funnel>
  • --tailscale-reset-on-exit
  • --install-daemon
  • --no-install-daemon (エイリアス: --skip-daemon)
  • --daemon-runtime <node|bun>
  • --skip-channels
  • --skip-skills
  • --skip-health
  • --skip-ui
  • --node-manager <npm|pnpm|bun> (pnpm 推奨; bun はゲートウェイランタイムには推奨されません)
  • --json

configure

インタラクティブな設定ウィザード (モデル、チャネル、スキル、ゲートウェイ)。

config

非対話型の設定ヘルパー (get/set/unset/file/validate)。サブコマンドなしで openclaw config を実行するとウィザードが起動します。サブコマンド:

  • config get <path>: 設定値を表示します (ドット/ブラケットパス)。
  • config set <path> <value>: 値を設定します (JSON5 または生の文字列)。
  • config unset <path>: 値を削除します。
  • config file: アクティブな設定ファイルのパスを表示します。
  • config validate: ゲートウェイを起動せずに現在の設定をスキーマに対して検証します。
  • config validate --json: 機械可読な JSON 出力を生成します。

doctor

ヘルスチェック + クイックフィックス (設定 + ゲートウェイ + レガシーサービス)。オプション:

  • --no-workspace-suggestions: ワークスペースメモリのヒントを無効にします。
  • --yes: プロンプトなしでデフォルトを受け入れます (ヘッドレス)。
  • --non-interactive: プロンプトをスキップします。安全なマイグレーションのみを適用します。
  • --deep: システムサービスをスキャンして追加のゲートウェイインストールを検出します。

チャネルヘルパー

channels

チャットチャネルアカウントを管理します (WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost (プラグイン)/Signal/iMessage/MS Teams)。サブコマンド:

  • channels list: 設定されたチャネルと認証プロファイルを表示します。
  • channels status: ゲートウェイの到達可能性とチャネルの健全性をチェックします (--probe は追加チェックを実行します; ゲートウェイの健全性プローブには openclaw health または openclaw status --deep を使用してください)。
  • ヒント: channels status は、一般的な設定ミスを検出できる場合、警告と推奨される修正を表示します (その後 openclaw doctor を案内します)。
  • channels logs: ゲートウェイログファイルから最近のチャネルログを表示します。
  • channels add: フラグが渡されない場合はウィザードスタイルのセットアップを実行します。フラグがある場合は非対話型モードに切り替わります。
    • 単一アカウントのトップレベル設定を使用しているチャネルに非デフォルトアカウントを追加する場合、OpenClaw は新しいアカウントを書き込む前に、アカウントスコープの値を channels.<channel>.accounts.default に移動します。
    • 非対話型の channels add はバインディングを自動的に作成/アップグレードしません。チャネル専用のバインディングはデフォルトアカウントに引き続きマッチします。
  • channels remove: デフォルトでは無効化します。プロンプトなしで設定エントリを削除するには --delete を渡します。
  • channels login: インタラクティブなチャネルログイン (WhatsApp Web のみ)。
  • channels logout: チャネルセッションからログアウトします (サポートされている場合)。

共通オプション:

  • --channel <name>: whatsapp|telegram|discord|googlechat|slack|mattermost|signal|imessage|msteams
  • --account <id>: チャネルアカウント ID (デフォルト default)
  • --name <label>: アカウントの表示名

channels login オプション:

  • --channel <channel> (デフォルト whatsapp; whatsapp/web をサポート)
  • --account <id>
  • --verbose

channels logout オプション:

  • --channel <channel> (デフォルト whatsapp)
  • --account <id>

channels list オプション:

  • --no-usage: モデルプロバイダーの使用量/クォータのスナップショットをスキップします (OAuth/API バックエンドのみ)。
  • --json: JSON を出力します (--no-usage が設定されていない限り使用量を含みます)。

channels logs オプション:

  • --channel <name|all> (デフォルト all)
  • --lines <n> (デフォルト 200)
  • --json

詳細: /concepts/oauth 例:

openclaw channels add --channel telegram --account alerts --name "Alerts Bot" --token $TELEGRAM_BOT_TOKEN
openclaw channels add --channel discord --account work --name "Work Bot" --token $DISCORD_BOT_TOKEN
openclaw channels remove --channel discord --account work --delete
openclaw channels status --probe
openclaw status --deep

skills

利用可能なスキルと準備状況情報をリストおよび検査します。サブコマンド:

  • skills list: スキルをリストします (サブコマンドなしのデフォルト)。
  • skills info <name>: 1つのスキルの詳細を表示します。
  • skills check: 準備完了と不足要件の概要。

オプション:

  • --eligible: 準備完了のスキルのみを表示します。
  • --json: JSON を出力します (スタイリングなし)。
  • -v, --verbose: 不足要件の詳細を含めます。

ヒント: スキルの検索、インストール、同期には npx clawhub を使用してください。

pairing

チャネル間での DM ペアリングリクエストを承認します。サブコマンド:

  • pairing list [channel] [--channel <channel>] [--account <id>] [--json]
  • pairing approve <channel> <code> [--account <id>] [--notify]
  • pairing approve --channel <channel> [--account <id>] <code> [--notify]

devices

ゲートウェイデバイスペアリングエントリとロールごとのデバイストークンを管理します。サブコマンド:

  • devices list [--json]
  • devices approve [requestId] [--latest]
  • devices reject <requestId>
  • devices remove <deviceId>
  • devices clear --yes [--pending]
  • devices rotate --device <id> --role <role> [--scope <scope...>]
  • devices revoke --device <id> --role <role>

webhooks gmail

Gmail Pub/Sub フックのセットアップ + ランナー。/automation/gmail-pubsub を参照してください。サブコマンド:

  • webhooks gmail setup (--account <email> が必要; --project, --topic, --subscription, --label, --hook-url, --hook-token, --push-token, --bind, --port, --path, --include-body, --max-bytes, --renew-minutes, --tailscale, --tailscale-path, --tailscale-target, --push-endpoint, --json をサポート)
  • webhooks gmail run (同じフラグのランタイムオーバーライド)

dns setup

広域ディスカバリー DNS ヘルパー (CoreDNS + Tailscale)。/gateway/discovery を参照してください。オプション:

  • --apply: CoreDNS 設定をインストール/更新します (sudo が必要; macOS のみ)。

メッセージング + エージェント

message

統一された送信メッセージング + チャネルアクション。参照: /cli/message サブコマンド:

  • message send|poll|react|reactions|read|edit|delete|pin|unpin|pins|permissions|search|timeout|kick|ban
  • message thread <create|list|reply>
  • message emoji <list|upload>
  • message sticker <send|upload>
  • message role <info|add|remove>
  • message channel <info|list>
  • message member info
  • message voice status
  • message event <list|create>

例:

  • openclaw message send --target +15555550123 --message "Hi"
  • openclaw message poll --channel discord --target channel:123 --poll-question "Snack?" --poll-option Pizza --poll-option Sushi

agent

ゲートウェイ経由で (または --local 埋め込みで) 1 エージェントターンを実行します。必須:

  • --message <text>

オプション:

  • --to <dest> (セッションキーとオプションの配信用)
  • --session-id <id>
  • --thinking <off|minimal|low|medium|high|xhigh> (GPT-5.2 + Codex モデルのみ)
  • --verbose <on|full|off>
  • --channel <whatsapp|telegram|discord|slack|mattermost|signal|imessage|msteams>
  • --local
  • --deliver
  • --json
  • --timeout <seconds>

agents

分離されたエージェントを管理します (ワークスペース + 認証 + ルーティング)。

agents list

設定されたエージェントをリストします。オプション:

  • --json
  • --bindings

agents add [name]

新しい分離エージェントを追加します。フラグ (または --non-interactive) が渡されない限り、ガイド付きウィザードを実行します。非対話型モードでは --workspace が必要です。オプション:

  • --workspace <dir>
  • --model <id>
  • --agent-dir <dir>
  • --bind <channel[:accountId]> (繰り返し可能)
  • --non-interactive
  • --json

バインディング仕様は channel[:accountId] を使用します。accountId が省略された場合、OpenClaw はチャネルのデフォルト/プラグインフックを介してアカウントスコープを解決する場合があります。それ以外の場合は、明示的なアカウントスコープを持たないチャネルバインディングです。

agents bindings

ルーティングバインディングをリストします。オプション:

  • --agent <id>
  • --json

agents bind

エージェントのルーティングバインディングを追加します。オプション:

  • --agent <id>
  • --bind <channel[:accountId]> (繰り返し可能)
  • --json

agents unbind

エージェントのルーティングバインディングを削除します。オプション:

  • --agent <id>
  • --bind <channel[:accountId]> (繰り返し可能)
  • --all
  • --json

agents delete <id>

エージェントを削除し、そのワークスペースと状態を整理します。オプション:

  • --force
  • --json

acp

IDE をゲートウェイに接続する ACP ブリッジを実行します。完全なオプションと例については acp を参照してください。

status

リンクされたセッションの健全性と最近の受信者を表示します。オプション:

  • --json
  • --all (完全な診断; 読み取り専用、貼り付け可能)
  • --deep (チャネルをプローブ)
  • --usage (モデルプロバイダーの使用量/クォータを表示)
  • --timeout <ms>
  • --verbose
  • --debug (--verbose のエイリアス)

注記:

  • 概要には、利用可能な場合はゲートウェイ + ノードホストサービスのステータスが含まれます。

使用量追跡

OpenClaw は、OAuth/API 認証情報が利用可能な場合、プロバイダーの使用量/クォータを表示できます。表示:

  • /status (利用可能な場合は短いプロバイダー使用量行を追加)
  • openclaw status --usage (完全なプロバイダー内訳を表示)
  • macOS メニューバー (コンテキスト下の使用量セクション)

注記:

  • データはプロバイダーの使用量エンドポイントから直接取得されます (推定値ではありません)。
  • プロバイダー: Anthropic、GitHub Copilot、OpenAI Codex OAuth、およびそれらのプロバイダープラグインが有効な場合は Gemini CLI/Antigravity。
  • 一致する認証情報が存在しない場合、使用量は非表示になります。
  • 詳細: 使用量追跡 を参照してください。

health

実行中のゲートウェイから健全性を取得します。オプション:

  • --json
  • --timeout <ms>
  • --verbose

sessions

保存された会話セッションをリストします。オプション:

  • --json
  • --verbose
  • --store <path>
  • --active <minutes>

リセット / アンインストール

reset

ローカル設定/状態をリセットします (CLI はインストールされたまま)。オプション:

  • --scope <config|config+creds+sessions|full>
  • --yes
  • --non-interactive
  • --dry-run

注記:

  • --non-interactive には --scope--yes が必要です。

uninstall

ゲートウェイサービス + ローカルデータをアンインストールします (CLI は残ります)。オプション:

  • --service
  • --state
  • --workspace
  • --app
  • --all
  • --yes
  • --non-interactive
  • --dry-run

注記:

  • --non-interactive には --yes と明示的なスコープ (または --all) が必要です。

ゲートウェイ

gateway

WebSocket ゲートウェイを実行します。オプション:

  • --port <port>
  • --bind <loopback|tailnet|lan|auto|custom>
  • --token <token>
  • --auth <token|password>
  • --password <password>
  • --tailscale <off|serve|funnel>
  • --tailscale-reset-on-exit
  • --allow-unconfigured
  • --dev
  • --reset (開発設定 + 認証情報 + セッション + ワークスペースをリセット)
  • --force (ポート上の既存のリスナーを強制終了)
  • --verbose
  • --claude-cli-logs
  • --ws-log <auto|full|compact>
  • --compact (--ws-log compact のエイリアス)
  • --raw-stream
  • --raw-stream-path <path>

gateway service

ゲートウェイサービスを管理します (launchd/systemd/schtasks)。サブコマンド:

  • gateway status (デフォルトでゲートウェイ RPC をプローブします)
  • gateway install (サービスインストール)
  • gateway uninstall
  • gateway start
  • gateway stop
  • gateway restart

注記:

  • gateway status は、デフォルトでサービスの解決されたポート/設定を使用してゲートウェイ RPC をプローブします (--url/--token/--password でオーバーライ