OpenClawをまだインストールしていませんか?ワンラインインストールコマンドはこちら
curl -fsSL https://openclaw.ai/install.sh | bashiwr -useb https://openclaw.ai/install.ps1 | iexcurl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd- OpenClawのCLIは一貫した
openclaw <名詞> [サブコマンド]命名構造に従っており、名詞は常に複数形(models、channels、skills、hooks、agents)で、すべての操作をターミナルから実行可能 openclaw doctorは日常メンテナンスで最も重要なコマンド。Gateway、Channels、Skills、Plugins、Memoryのステータスを自動検出し、--fixで自動修復、--deepでシステムサービスのスキャンが可能- Gatewayはデフォルトで
ws://127.0.0.1:18789で起動し、openclaw gateway(フォアグラウンド)またはopenclaw gateway install(サービス登録)で管理。すべてのChannelsとSkillsはこのWebSocketエンドポイントを通じて通信 - モデル管理はOAuth / Auth Profiles機構を採用。
openclaw models auth loginでOAuth認証を行い、QwenやGitHub Copilotなどの無料モデルに対応、トークンの自動更新も可能 - 設定ファイルはJSON形式(
~/.openclaw/openclaw.json)で、openclaw config get/set/unsetのドットパス構文か、openclaw configureで対話型セットアップウィザードを起動して操作
OpenClawが2026年初頭に正式にオープンソース化されて以来、最も注目されるAIエージェントフレームワークの一つへと急速に成長しました。[3]Webインターフェースやデスクトップアプリケーションに依存する類似ツールとは異なり、OpenClawはコマンドラインインターフェース(CLI)をプライマリエントリーポイントとしてゼロから設計されており、既存のDevOpsツールチェーン、Shellスクリプト、自動化スケジューリングとの統合に最適です。
しかし、多くのOpenClaw初心者が同じ課題に直面します。公式ドキュメントは包括的であるものの、コマンド数が膨大(40以上のトップレベルコマンド)で、バージョン間でフラグが微妙に異なることがあります。[1]本記事はOpenClaw 2026.2.25での実テストに基づき、インストールから診断、モデル管理からAgentsまで、よく使うコマンドを体系的にまとめた検証済みの完全リファレンスです。
I. CLIの概要
1.1 OpenClaw CLIの設計思想
OpenClawのCLIはNode.js上に構築(Goではない)されており、openclaw <名詞> [サブコマンド] [フラグ]の形式で設計されています。[4]重要な命名規則として、トップレベルの名詞は常に複数形です。models、channels、skills、hooks、agents、plugins、sessions。一部のコアコマンドは単数形(gateway、doctor、config)を使用します。
1.2 グローバルヘルプとバージョン情報
任意のサブコマンドの後に--helpまたは-hを付けると、ヘルプテキストが表示されます。
# 利用可能なすべてのトップレベルコマンドと簡単な説明を表示
openclaw --help
# 特定のサブコマンドのヘルプを表示
openclaw gateway --help
openclaw models --help
openclaw channels add --help
openclaw --helpを実行すると、以下のような出力構造が得られます(2026.2.25):
Usage: openclaw [options] [command]
Options:
--dev Dev profile: isolate state under ~/.openclaw-dev
-h, --help Display help for command
--log-level <level> Global log level override (silent|fatal|error|warn|info|debug|trace)
--no-color Disable ANSI colors
--profile <name> Use a named profile (isolates state/config)
-V, --version output the version number
Core Commands:
gateway * Run, inspect, and query the WebSocket Gateway
models * Discover, scan, and configure models
channels * Manage connected chat channels (Telegram, Discord, etc.)
skills * List and inspect available skills
hooks * Manage internal agent hooks
plugins * Manage OpenClaw plugins and extensions
agents * Manage isolated agents (workspaces, auth, routing)
doctor Health checks + quick fixes
config * Non-interactive config helpers (get/set/unset)
configure Interactive setup wizard
Utility Commands:
update * Update OpenClaw and inspect update channel status
logs Tail gateway file logs via RPC
sessions * List stored conversation sessions
browser * Manage OpenClaw's dedicated browser (Chrome/Chromium)
cron * Manage cron jobs via the Gateway scheduler
security * Security tools and local config audits
memory * Search, inspect, and reindex memory files
tui Open a terminal UI connected to the Gateway
dashboard Open the Control UI with your current token
onboard Interactive onboarding wizard
status Show channel health and recent session recipients
uninstall Uninstall the gateway service + local data (CLI remains)
reset Reset local config/state (keeps the CLI installed)
Docs: https://docs.openclaw.ai/cli
バージョン情報の確認:
# バージョン番号を表示
openclaw --version
# 出力: 2026.2.25
注意:openclaw versionというコマンドは存在しません。バージョン情報は--versionまたは-Vフラグで取得します。
1.3 グローバルフラグリファレンス
以下のフラグはメインCLIに適用できます:
--log-level <level> ログレベル(silent|fatal|error|warn|info|debug|trace)
--no-color ANSIカラー出力を無効化(パイプ出力やCI環境に適切)
--dev 開発プロファイルを使用、状態を~/.openclaw-devに分離
--profile <name> 名前付きプロファイルを使用、状態を~/.openclaw-<name>に分離
-V, --version バージョン番号を出力
-h, --help ヘルプを表示
II. インストールと環境管理
2.1 初回インストール
OpenClawは3つのインストール方法を提供しており、いずれも最終的にnpm install -g openclaw@latestでグローバルインストールを実行します。[2]
# macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash
# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex
# Windows CMD(ExecutionPolicy制限を回避)
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
インストール後、Doctorを実行して環境が正常であることを確認します:
openclaw doctor
DoctorはGatewayのステータス、Skills、Plugins、Channels、メモリ検索などを確認し、問題があれば報告します。
2.2 アップデート
# 最新安定版にアップデート
openclaw update
# アップデートチャンネルを切り替え(stable/beta/dev)
openclaw update --channel beta
# 特定のバージョンまたはdist-tagに一回限りアップデート
openclaw update --tag 2026.2.20
# アップデート内容をプレビュー(ドライラン)
openclaw update --dry-run
# アップデート後にGatewayサービスを自動再起動しない
openclaw update --no-restart
# 非対話モード(CI環境向け)
openclaw update --yes --json
# 現在のアップデートチャンネルとバージョンステータスを表示
openclaw update status
# 対話型アップデートウィザード
openclaw update wizard
2.3 アンインストールとリセット
# Gatewayサービス+ローカルデータをアンインストール(CLIは残る)
openclaw uninstall
# アンインストールしてすべての設定、状態、ワークスペースを削除
openclaw uninstall --all --yes
# アンインストール操作をプレビュー
openclaw uninstall --dry-run
# サービス/状態/ワークスペースのみ削除
openclaw uninstall --service
openclaw uninstall --state
openclaw uninstall --workspace
# ローカル設定をリセット(CLIは保持)
openclaw reset
openclaw reset --scope config # 設定のみリセット
openclaw reset --scope full --yes # 完全リセット(非対話)
2.4 グローバル設定管理
設定ファイルは~/.openclaw/openclaw.json(JSON形式、YAMLではない)に格納されています:
# 特定の設定値を取得(ドットパス構文)
openclaw config get gateway.port
# 出力: 18789
openclaw config get gateway.mode
# 出力: local
# 特定の値を設定
openclaw config set gateway.port 18790
openclaw config set gateway.bind loopback
# 設定値を削除
openclaw config unset gateway.tailscale
# 対話型セットアップウィザードを起動
openclaw configure
# 特定セクションのセットアップウィザード
openclaw configure --section model
openclaw configure --section web
III. Gateway管理コマンド
3.1 Gatewayの概念
GatewayはOpenClawのコアとなるWebSocketサーバーで、ws://127.0.0.1:18789でChannelsからのメッセージを受信し、Agentセッションを管理し、Skillsの実行を調整する役割を担っています。[7]すべてのChannels、Dashboard、ブラウザ制御はGatewayを通じて通信します。
3.2 起動と実行
# フォアグラウンドモード(Ctrl+Cで停止)
openclaw gateway
# 以下と同等
openclaw gateway run
# ポートとバインドモードを指定
openclaw gateway --port 18790
openclaw gateway --bind lan # loopback|lan|tailnet|auto|custom
# 強制起動(ポートを占有しているプロセスを終了)
openclaw gateway --force
# Gateway認証モード
openclaw gateway --auth token --token "your-secret-token"
openclaw gateway --auth password --password "your-password"
# Tailscale公開モード
openclaw gateway --tailscale serve # off|serve|funnel
# 詳細ログモード
openclaw gateway --verbose
openclaw gateway --compact # コンパクトなWebSocketログ
# 開発モード(状態分離)
openclaw gateway --dev
3.3 Gatewayサービス管理(永続化)
# システムサービスとしてインストール(launchd/systemd/schtasks)
openclaw gateway install
# インストール済みサービスを起動
openclaw gateway start
# サービスを停止
openclaw gateway stop
# サービスを再起動
openclaw gateway restart
# サービスをアンインストール
openclaw gateway uninstall
# サービスステータスの表示+Gatewayプローブ
openclaw gateway status
Windowsの注意点:openclaw gateway installは内部でschtasksを使用するため、システム管理者権限が必要です。管理者権限のない環境ではフォアグラウンドモードopenclaw gatewayを使用してください。
3.4 Gatewayステータスクエリ
# フルステータスを表示(サービス+プローブ)
openclaw gateway status
# 実際の出力例(2026.2.25):
# Service: Scheduled Task (missing)
# Config (cli): ~\.openclaw\openclaw.json
# Gateway: bind=loopback (127.0.0.1), port=18789
# Probe target: ws://127.0.0.1:18789
# Dashboard: http://127.0.0.1:18789/
# Listening: 127.0.0.1:18789
# Gatewayヘルスステータスを取得
openclaw gateway health
# 出力: Gateway Health OK (1693ms)
# Telegram: ok (@your_bot) (1693ms)
# Gatewayの到達可能性をプローブ
openclaw gateway probe
# ローカルおよび広域ネットワークでGatewayを検出
openclaw gateway discover
# Gateway RPCメソッドを直接呼び出し
openclaw gateway call health
# 使用コストサマリーを表示
openclaw gateway usage-cost
3.5 ログ確認
# Gatewayログを表示(RPC経由)
openclaw logs
# リアルタイムでログをフォロー
openclaw logs --follow
# 行数を制限
openclaw logs --limit 100
# JSON形式で出力
openclaw logs --json
# ローカルタイムで表示
openclaw logs --local-time
# プレーンテキスト出力(ANSIスタイリングなし)
openclaw logs --plain
IV. モデル設定コマンド
4.1 モデルの一覧表示と確認
# 設定済みモデルを一覧表示
openclaw models list
# 実際の出力例:
# Model Input Ctx Local Auth Tags
# qwen-portal/coder-model text 125k no yes default,configured
# qwen-portal/vision-model text+image 125k no yes configured
# モデルステータスサマリーを表示
openclaw models status
# 実際の出力例:
# Config : ~\.openclaw\openclaw.json
# Default : qwen-portal/coder-model
# Aliases (1) : qwen -> qwen-portal/coder-model
# Configured models (2): qwen-portal/coder-model, qwen-portal/vision-model
# JSON出力
openclaw models --status-json
# プレーンテキスト出力
openclaw models --status-plain
4.2 デフォルトモデルの設定
# デフォルトモデルを設定(モデルIDまたはエイリアスを使用)
openclaw models set qwen-portal/coder-model
openclaw models set qwen
# 画像モデルを設定
openclaw models set-image qwen-portal/vision-model
4.3 モデル認証管理
# 対話型認証追加(トークン設定またはトークン貼り付け)
openclaw models auth add
# OAuthの認証フローを実行
openclaw models auth login
# GitHub Copilotへのログイン(Device Code Flow)
openclaw models auth login-github-copilot
# トークンを手動で貼り付け
openclaw models auth paste-token
# プロバイダーCLI経由でトークンを設定
openclaw models auth setup-token
# 認証順序を管理
openclaw models auth order
4.4 モデルエイリアスとフォールバック
# モデルエイリアスを管理
openclaw models aliases
# モデルフォールバックリストを管理
openclaw models fallbacks
# 画像モデルフォールバックリストを管理
openclaw models image-fallbacks
# OpenRouterの無料モデルをスキャン
openclaw models scan
V. Channel管理コマンド
5.1 サポートされるChannels
OpenClaw 2026.2.25は20以上の通信チャンネルをサポートしています:Telegram、WhatsApp、Discord、Slack、Signal、iMessage、IRC、Google Chat、LINE、Zalo、Matrix、Nostr、Microsoft Teams、Mattermost、Nextcloud Talk、BlueBubbles、Synology Chat、Tlon、Feishuなど。
5.2 Channelの追加
# Telegram Botを追加(非対話)
openclaw channels add --channel telegram --token "123456:ABC..."
# Discord Botを追加
openclaw channels add --channel discord --token "MTIz..."
# Slack Appを追加
openclaw channels add --channel slack --bot-token "xoxb-..." --app-token "xapp-..."
# WhatsAppを追加(対話型QRログインが必要)
openclaw channels login --channel whatsapp
# Matrixを追加
openclaw channels add --channel matrix --homeserver "https://matrix.org" --user-id "@user:matrix.org" --access-token "..."
# Signalを追加
openclaw channels add --channel signal --signal-number "+886..."
# 複数アカウントを追加(アカウントIDを指定)
openclaw channels add --channel telegram --account work --token "..."
5.3 Channelの一覧表示と管理
# 設定済みのすべてのChannelを一覧表示
openclaw channels list
# 実際の出力例:
# Chat channels:
# - Telegram default: configured, token=config, enabled
#
# Auth providers (OAuth + API keys):
# - qwen-portal:default (oauth)
# Channelステータスを表示(Gatewayプローブ付き)
openclaw channels status
openclaw channels status --probe # アクティブプローブ
# Channelログを表示
openclaw channels logs
# プロバイダーの機能(サポートされる機能)を表示
openclaw channels capabilities
# Channelを削除
openclaw channels remove --channel telegram
# Channelセッションからログアウト
openclaw channels logout --channel whatsapp
# Channel/ユーザー名をIDに解決
openclaw channels resolve
5.4 DMペアリング
# 保留中のペアリングリクエストを表示
openclaw pairing
# Telegramペアリングを承認
openclaw pairing approve telegram WR8XRQQA
# ペアリング管理
openclaw pairing --help
VI. Skills管理コマンド
6.1 Skillsの概念
SkillsはOpenClawの機能拡張メカニズムであり、各Skillはエージェントが実行できる特定の機能を定義します。Skillsにはバンドル(組み込み)のものとプラグインインストールされるものがあります。[5]
6.2 Skillsの一覧表示と確認
# 利用可能なすべてのSkillsを一覧表示
openclaw skills list
# 実際の出力例(一部):
# Skills (13/52 ready)
# ┌───────────┬──────────────────┬─────────────────────────────────┬────────────────┐
# │ Status │ Skill │ Description │ Source │
# ├───────────┼──────────────────┼─────────────────────────────────┼────────────────┤
# │ ✓ ready │ 🧩 coding-agent │ ... │ openclaw-bundled│
# │ ✗ missing │ 🔐 1password │ ... │ openclaw-bundled│
# Skillsの準備状況を確認
openclaw skills check
# 実際の出力例:
# Skills Status Check
# Total: 52
# ✓ Eligible: 13
# ✗ Missing requirements: 39
#
# Ready to use:
# 🧩 coding-agent
# ♊️ gemini
# 📦 gh-issues
# 🐙 github
# ...
#
# Missing requirements:
# 🔐 1password (bins: op)
# 📝 apple-notes (bins: memo; os: darwin)
# ...
# 特定のSkillの詳細情報を表示
openclaw skills info coding-agent
VII. Hooksコマンド
7.1 Hooksの概念
HooksはOpenClawのイベント駆動型自動化メカニズムであり、特定のイベントがトリガーされたときに事前定義されたアクションを自動実行します。[6]例えば、session-memoryは/newや/resetが発行されたときに自動的にセッションコンテキストを保存します。
7.2 Hooksの一覧表示と管理
# すべてのHooksを一覧表示
openclaw hooks list
# 実際の出力例:
# Hooks (4/4 ready)
# ┌──────────┬──────────────────────┬──────────────────────────────────────────┬─────────────┐
# │ Status │ Hook │ Description │ Source │
# ├──────────┼──────────────────────┼──────────────────────────────────────────┼─────────────┤
# │ ✓ ready │ 🚀 boot-md │ Run BOOT.md on gateway startup │ openclaw-bundled│
# │ ✓ ready │ 📎 bootstrap-extra-files│ Inject additional workspace bootstrap files│ openclaw-bundled│
# │ ✓ ready │ 📝 command-logger │ Log all command events to audit file │ openclaw-bundled│
# │ ✓ ready │ 💾 session-memory │ Save session context on /new or /reset │ openclaw-bundled│
# 特定のHookの詳細を表示
openclaw hooks info session-memory
# Hooksの適格性ステータスを確認
openclaw hooks check
# Hookを有効化
openclaw hooks enable session-memory
# Hookを無効化
openclaw hooks disable command-logger
# Hookパックをインストール(パス、アーカイブ、またはnpmパッケージ)
openclaw hooks install ./my-hook-pack
openclaw hooks install some-npm-hook-package
# インストール済みHooksを更新(npmインストールのみ)
openclaw hooks update
VIII. Plugins管理コマンド
8.1 Pluginsの一覧表示と管理
# 検出されたすべてのPluginsを一覧表示
openclaw plugins list
# Pluginの詳細を表示
openclaw plugins info some-plugin
# Pluginをインストール(パス、アーカイブ、またはnpmパッケージ)
openclaw plugins install ./my-plugin
openclaw plugins install some-npm-plugin
# Pluginを有効化/無効化
openclaw plugins enable some-plugin
openclaw plugins disable some-plugin
# Pluginをアンインストール
openclaw plugins uninstall some-plugin
# インストール済みPluginsを更新(npmインストールのみ)
openclaw plugins update
# Pluginの読み込み問題を診断
openclaw plugins doctor
IX. Agents管理コマンド
9.1 Agentsの概念
AgentsはOpenClawの分離された実行単位であり、各Agentは独自のワークスペース、Auth設定、ルーティングルールを持ちます。デフォルトでmain Agentが存在します。
9.2 Agentsの管理
# 設定済みのAgentsを一覧表示
openclaw agents list
# 分離されたAgentを追加
openclaw agents add work
# Agentのアイデンティティを設定(名前/トピック/絵文字/アバター)
openclaw agents set-identity work --name "Work Bot"
# Agentを削除してワークスペースをクリーンアップ
openclaw agents delete work
X. 診断とトラブルシューティングコマンド
10.1 openclaw doctor
openclaw doctorは最も重要な診断ツールであり、Gateway、Channels、Skills、Plugins、メモリ検索のステータスを確認します:
# 環境診断を実行
openclaw doctor
# 自動修復を試行
openclaw doctor --fix
# ディープスキャン(システムサービスを含む)
openclaw doctor --deep
# Gatewayトークンを生成・設定
openclaw doctor --generate-gateway-token
# 非対話モード(安全な修正のみ)
openclaw doctor --non-interactive
# 確認プロンプトをスキップ
openclaw doctor --yes
10.2 セキュリティ監査
# ローカルセキュリティ監査
openclaw security audit
# ディープ監査(Gatewayプローブを含む)
openclaw security audit --deep
# セキュリティ問題を自動修正
openclaw security audit --fix
# JSON出力
openclaw security audit --json
10.3 その他の便利なコマンド
# チャンネルヘルスステータスと最近のセッションを表示
openclaw status
# ダッシュボードを開く(ブラウザ)
openclaw dashboard
# ターミナルTUIを開く
openclaw tui
# メモリインデックスステータスを表示
openclaw memory status
# メモリファイルを再インデックス
openclaw memory index --force
# メモリを検索
openclaw memory search --query "deployment notes"
# Cronスケジュールを管理
openclaw cron list
openclaw cron add
openclaw cron status
# セッションを表示
openclaw sessions
openclaw sessions --active 120 # 直近2時間以内にアクティブ
openclaw sessions --all-agents # 全Agents横断で集計
openclaw sessions --json # JSON出力
# ブラウザ制御
openclaw browser status
openclaw browser tabs
openclaw browser open https://example.com
openclaw browser screenshot
openclaw browser snapshot
XI. よくある問題とトラブルシューティング
11.1 よくあるコマンド名の間違い
問題:openclaw version、openclaw model、openclaw channelなどのコマンドを実行するとunknown commandが表示される。
# 誤り:
openclaw version # ✗ unknown command
openclaw model list # ✗ unknown command (Did you mean models?)
openclaw channel list # ✗ unknown command (Did you mean channels?)
openclaw skill list # ✗ unknown command (Did you mean skills?)
openclaw hook list # ✗ unknown command (Did you mean hooks?)
# 正しい:
openclaw --version # ✓ サブコマンドではなくフラグを使用
openclaw models list # ✓ 複数形
openclaw channels list # ✓ 複数形
openclaw skills list # ✓ 複数形
openclaw hooks list # ✓ 複数形
11.2 Gatewayが起動しない
問題:openclaw gatewayでbind: address already in useと表示される。
# 方法1:強制起動(占有プロセスを終了)
openclaw gateway --force
# 方法2:ポートを変更
openclaw gateway --port 18790
openclaw config set gateway.port 18790
# 方法3:占有プロセスを確認
netstat -ano | findstr :18789 # Windows
lsof -i :18789 # macOS/Linux
問題:Windowsでopenclaw gateway installが失敗する(Access denied)。
# Gatewayサービスのインストールには管理者権限が必要(schtasks)
# 方法1:PowerShellを管理者として実行
# 方法2:フォアグラウンドモードを使用
openclaw gateway
11.3 設定ファイルの場所
# OpenClaw設定ファイル(JSON形式)
~/.openclaw/openclaw.json
# Windowsのフルパス
C:\Users\<USERNAME>\.openclaw\openclaw.json
# Agentワークスペース
~/.openclaw/agents/main/
# Auth Profiles
~/.openclaw/agents/main/agent/auth-profiles.json
# Gatewayログ
/tmp/openclaw/openclaw-YYYY-MM-DD.log # macOS/Linux
\tmp\openclaw\openclaw-YYYY-MM-DD.log # Windows
11.4 テクニカルサポートの取得
# 完全な診断を実行
openclaw doctor --deep
# バージョン情報を確認
openclaw --version
# Gatewayステータスを表示
openclaw gateway status
# 完全なヘルスステータスを表示
openclaw gateway health
# 公式ドキュメントを検索
openclaw docs
まとめ
OpenClaw 2026.2.25のCLIは、Gateway管理、モデル設定、Channel連携、Skills/Hooks/Plugins管理、セキュリティ監査、Cronスケジューリング、ブラウザ制御など、40以上のトップレベルコマンドを提供しています。[8]コアコマンドのopenclaw doctor、openclaw gateway、openclaw models status、openclaw channels listをマスターすれば、日常の運用ニーズには十分対応できます。
本記事のすべてのコマンドは、Windows 11環境のOpenClaw 2026.2.25で検証済みです。バージョンの進化に伴い、一部のコマンドフラグや出力形式が変更される場合があります。最新の使用方法は--helpフラグで確認し、openclaw doctorを定期的に実行して環境の健全性を確保することをお勧めします。[1]



