OPENCLAW ARTICLE

OpenClaw CLI リファレンス

ishiwari.net articles

コマンド体系は openclaw <command> [subcommand] [flags] の形式です。ノード系コマンドは名詞が複数形(models, channels, agents 等)になります。


グローバルフラグ

どのコマンドでも使用できます。

フラグ説明
--dev開発環境用の分離状態で実行
--profile <name>プロファイル別に状態を管理
--no-colorANSI カラー出力を無効化
-V, --versionバージョンを表示

セットアップ系

openclaw onboard

初期セットアップウィザードを実行します。

openclaw onboard --install-daemon
openclaw onboard --non-interactive --auth-choice ollama
openclaw onboard --reset
openclaw onboard --reset --reset-scope full

openclaw configure

設定を再実行・部分変更します。

openclaw configure
openclaw configure --section web   # Web検索プロバイダーのみ変更

openclaw doctor

Gateway・チャンネル・スキル・プラグイン・メモリの健全性チェックと自動修復を行います。

openclaw doctor                         # 健全性チェック
openclaw doctor --repair                # 推奨修復を自動適用
openclaw doctor --deep                  # システムサービスも含めてスキャン
openclaw doctor --repair --non-interactive
openclaw doctor --generate-gateway-token
フラグ説明
--repair / --fix推奨修復を自動適用
--forceカスタム設定を上書きして積極的に修復
--deepシステムサービスもスキャン
--non-interactiveプロンプトなしで実行
--generate-gateway-tokenGatewayトークンを生成・設定

openclaw dashboard

ブラウザでダッシュボードを開きます。

openclaw dashboard

Gateway 管理

openclaw gateway

Gateway の起動・管理・診断を行います。

# 起動・サービス管理
openclaw gateway                  # Gateway を起動
openclaw gateway run              # 同上
openclaw gateway install          # システムサービスとして登録
openclaw gateway start
openclaw gateway stop
openclaw gateway restart
openclaw gateway uninstall

# 状態確認・診断
openclaw gateway status           # サービス状態 + 接続確認
openclaw gateway health           # 死活確認
openclaw gateway probe            # 全項目の総合デバッグ
openclaw gateway diagnostics export   # バグレポート用 zip を生成

# その他
openclaw gateway usage-cost       # セッションの使用コスト確認
openclaw gateway stability        # 診断イベントの取得
openclaw gateway call <method>    # 低レベル RPC 呼び出し
openclaw gateway discover         # Bonjour ビーコンをスキャン

起動時フラグ:

フラグ説明
--port <port>ポート番号を指定
--bind <loopback|lan|tailnet|auto|custom>バインドアドレスを指定
--auth <token|password>認証方式を指定
--token <token>トークンを指定
--tailscale <off|serve|funnel>Tailscale 設定
--verbose詳細ログを出力
--reset設定をリセットして起動

モデル管理

openclaw models

モデルプロバイダーの設定・確認を行います。

openclaw models status                             # 現在のモデル設定・認証状態を表示
openclaw models list                               # 利用可能なモデル一覧
openclaw models list --all                         # 全モデルを表示
openclaw models list --local                       # ローカルモデルのみ
openclaw models list --provider <id>               # プロバイダーで絞り込み
openclaw models set <model-or-alias>               # デフォルトモデルを変更
openclaw models scan                               # モデルを再スキャン
openclaw models auth add                           # 認証プロファイルを追加
openclaw models auth login --provider <id>         # プロバイダーにログイン
openclaw models auth setup-token --provider <id>   # セットアップトークンを設定
openclaw models auth paste-token                   # トークンを貼り付け
openclaw models aliases list                       # エイリアス一覧
openclaw models fallbacks list                     # フォールバック設定一覧

チャンネル管理

openclaw channels

メッセージングサービス(Telegram / WhatsApp / Discord / Slack 等)の接続を管理します。

openclaw channels list                             # チャンネル一覧
openclaw channels status                           # ランタイムステータスを確認
openclaw channels status --probe                   # 接続プローブ付きで確認
openclaw channels add --channel telegram --token <bot-token>
openclaw channels remove --channel telegram --delete
openclaw channels login --channel whatsapp         # インタラクティブログイン
openclaw channels logout --channel whatsapp
openclaw channels capabilities --channel discord --target channel:123
openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels logs --channel all --lines 50

エージェント管理

openclaw agents

独立したワークスペース・認証・ルーティングを持つエージェントを管理します。

openclaw agents list                               # エージェント一覧
openclaw agents list --bindings                    # バインディング情報も表示
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents bind --agent work --bind telegram:ops
openclaw agents unbind --agent work --bind telegram:ops
openclaw agents unbind --agent work --all          # 全バインディングを削除
openclaw agents set-identity --agent main --avatar avatars/claw.png
openclaw agents set-identity --agent main --from-identity   # IDENTITY.md から読み込み
openclaw agents delete work --force

スキル管理

openclaw skills

ClawHub からスキルを検索・インストール・管理します。

openclaw skills search calendar                    # スキルを検索
openclaw skills search calendar --limit 20 --json
openclaw skills install <slug>                     # スキルをインストール
openclaw skills install <slug> --version 1.2.0
openclaw skills install <slug> --force             # 既存スキルを上書き
openclaw skills update <slug>                      # スキルを更新
openclaw skills update --all                       # 全スキルを更新
openclaw skills list                               # インストール済みスキル一覧
openclaw skills info <slug>                        # スキル詳細を表示
openclaw skills check                              # スキルの状態確認

セッション管理

openclaw sessions

会話セッションの一覧表示とメンテナンスを行います。

openclaw sessions                                  # セッション一覧
openclaw sessions --agent work                     # エージェント指定
openclaw sessions --all-agents                     # 全エージェントを集約
openclaw sessions --active 60                      # 直近60分のアクティブセッション
openclaw sessions cleanup --dry-run                # 削除プレビュー
openclaw sessions cleanup --all-agents --enforce   # 全エージェントのクリーンアップ

ログ

openclaw logs

Gateway のファイルログを RPC 経由でストリーミング取得します。

openclaw logs                                      # ログを表示
openclaw logs --follow                             # リアルタイムでフォロー
openclaw logs --follow --interval 2000
openclaw logs --limit 500 --max-bytes 500000
openclaw logs --json
openclaw logs --local-time                         # ローカルタイムゾーンで表示
openclaw logs --url ws://127.0.0.1:18789 --token "$OPENCLAW_GATEWAY_TOKEN"

自動化・スケジューリング

openclaw cron

定期実行ジョブを管理します。

openclaw cron list                                 # ジョブ一覧
openclaw cron show <job-id>                        # ジョブ詳細
openclaw cron add --name "briefing" --cron "0 7 * * *" --session isolated
openclaw cron edit <job-id> --announce --channel slack --to "channel:C1234567890"
openclaw cron run <job-id>                         # 手動実行
openclaw cron runs --id <job-id>                   # 実行履歴

主なフラグ:

フラグ説明
--croncron 式でスケジュールを指定
--atワンショット実行時刻を指定
--session <main|isolated|current>セッション種別を選択
--light-context軽量ブートストラップを有効化
--tzタイムゾーンを指定
--announce通知配信を有効化

シークレット管理

openclaw secrets

APIキーや認証情報の管理・監査を行います。推奨フロー: audit → configure → apply(dry-run) → apply → audit → reload

openclaw secrets audit                             # 設定の読み取り専用スキャン
openclaw secrets audit --check --json
openclaw secrets configure                         # インタラクティブなプロバイダー設定
openclaw secrets configure --plan-out plan.json    # 設定プランをファイルに保存
openclaw secrets apply --from plan.json            # 保存プランを適用
openclaw secrets apply --from plan.json --dry-run  # 適用プレビュー
openclaw secrets reload                            # Gateway のシークレットを再読み込み

アップデート

openclaw update

OpenClaw 本体を更新します。

openclaw update                                    # 最新版に更新
openclaw update status                             # 更新可否とチャンネルを表示
openclaw update wizard                             # 対話形式でチャンネル選択
openclaw update --channel beta                     # ベータチャンネルに切り替え
openclaw update --channel stable                   # 安定版チャンネルに戻す
openclaw update --dry-run                          # 更新内容のプレビュー
チャンネル説明
stable安定版(デフォルト)
betaベータ版
dev開発版(Git チェックアウト必須)
注意: ダウングレードは設定を破損させる可能性があります。確認プロンプトが表示されます。

その他のコマンド

コマンド説明
openclaw inferモデルへの直接推論リクエスト
openclaw memoryエージェントメモリの管理
openclaw mcpMCP サーバーの管理
openclaw acpACP チャンネルバインドの管理
openclaw pluginsプラグインの管理
openclaw sandboxサンドボックス環境の管理
openclaw tuiターミナル UI の起動
openclaw browserブラウザコントロールの管理
openclaw nodes / openclaw nodeネットワークノードの管理
openclaw devicesデバイス管理
openclaw directoryディレクトリサービス
openclaw hooksエージェントフックの管理
openclaw webhooksWebhook の管理
openclaw tasksタスク管理
openclaw pairingデバイスペアリング
openclaw qrQR コードの生成・表示
openclaw voicecall音声通話機能
openclaw wikiエージェント Wiki の管理
openclaw uninstallOpenClaw のアンインストール
openclaw completionシェル補完スクリプトの生成

参考資料