mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
docs: align CLI docs and help surface
This commit is contained in:
21
docs/cli/clawbot.md
Normal file
21
docs/cli/clawbot.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
summary: "CLI reference for `openclaw clawbot` (legacy alias namespace)"
|
||||||
|
read_when:
|
||||||
|
- You maintain older scripts using `openclaw clawbot ...`
|
||||||
|
- You need migration guidance to current commands
|
||||||
|
title: "clawbot"
|
||||||
|
---
|
||||||
|
|
||||||
|
# `openclaw clawbot`
|
||||||
|
|
||||||
|
Legacy alias namespace kept for backwards compatibility.
|
||||||
|
|
||||||
|
Current supported alias:
|
||||||
|
|
||||||
|
- `openclaw clawbot qr` (same behavior as [`openclaw qr`](/cli/qr))
|
||||||
|
|
||||||
|
## Migration
|
||||||
|
|
||||||
|
Prefer modern top-level commands directly:
|
||||||
|
|
||||||
|
- `openclaw clawbot qr` -> `openclaw qr`
|
||||||
35
docs/cli/completion.md
Normal file
35
docs/cli/completion.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
summary: "CLI reference for `openclaw completion` (generate/install shell completion scripts)"
|
||||||
|
read_when:
|
||||||
|
- You want shell completions for zsh/bash/fish/PowerShell
|
||||||
|
- You need to cache completion scripts under OpenClaw state
|
||||||
|
title: "completion"
|
||||||
|
---
|
||||||
|
|
||||||
|
# `openclaw completion`
|
||||||
|
|
||||||
|
Generate shell completion scripts and optionally install them into your shell profile.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
openclaw completion
|
||||||
|
openclaw completion --shell zsh
|
||||||
|
openclaw completion --install
|
||||||
|
openclaw completion --shell fish --install
|
||||||
|
openclaw completion --write-state
|
||||||
|
openclaw completion --shell bash --write-state
|
||||||
|
```
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
- `-s, --shell <shell>`: shell target (`zsh`, `bash`, `powershell`, `fish`; default: `zsh`)
|
||||||
|
- `-i, --install`: install completion by adding a source line to your shell profile
|
||||||
|
- `--write-state`: write completion script(s) to `$OPENCLAW_STATE_DIR/completions` without printing to stdout
|
||||||
|
- `-y, --yes`: skip install confirmation prompts
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- `--install` writes a small "OpenClaw Completion" block into your shell profile and points it at the cached script.
|
||||||
|
- Without `--install` or `--write-state`, the command prints the script to stdout.
|
||||||
|
- Completion generation eagerly loads command trees so nested subcommands are included.
|
||||||
43
docs/cli/daemon.md
Normal file
43
docs/cli/daemon.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
summary: "CLI reference for `openclaw daemon` (legacy alias for gateway service management)"
|
||||||
|
read_when:
|
||||||
|
- You still use `openclaw daemon ...` in scripts
|
||||||
|
- You need service lifecycle commands (install/start/stop/restart/status)
|
||||||
|
title: "daemon"
|
||||||
|
---
|
||||||
|
|
||||||
|
# `openclaw daemon`
|
||||||
|
|
||||||
|
Legacy alias for Gateway service management commands.
|
||||||
|
|
||||||
|
`openclaw daemon ...` maps to the same service control surface as `openclaw gateway ...` service commands.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
openclaw daemon status
|
||||||
|
openclaw daemon install
|
||||||
|
openclaw daemon start
|
||||||
|
openclaw daemon stop
|
||||||
|
openclaw daemon restart
|
||||||
|
openclaw daemon uninstall
|
||||||
|
```
|
||||||
|
|
||||||
|
## Subcommands
|
||||||
|
|
||||||
|
- `status`: show service install state and probe Gateway health
|
||||||
|
- `install`: install service (`launchd`/`systemd`/`schtasks`)
|
||||||
|
- `uninstall`: remove service
|
||||||
|
- `start`: start service
|
||||||
|
- `stop`: stop service
|
||||||
|
- `restart`: restart service
|
||||||
|
|
||||||
|
## Common options
|
||||||
|
|
||||||
|
- `status`: `--url`, `--token`, `--password`, `--timeout`, `--no-probe`, `--deep`, `--json`
|
||||||
|
- `install`: `--port`, `--runtime <node|bun>`, `--token`, `--force`, `--json`
|
||||||
|
- lifecycle (`uninstall|start|stop|restart`): `--json`
|
||||||
|
|
||||||
|
## Prefer
|
||||||
|
|
||||||
|
Use [`openclaw gateway`](/cli/gateway) for current docs and examples.
|
||||||
@@ -16,6 +16,7 @@ This page describes the current CLI behavior. If commands change, update this do
|
|||||||
- [`onboard`](/cli/onboard)
|
- [`onboard`](/cli/onboard)
|
||||||
- [`configure`](/cli/configure)
|
- [`configure`](/cli/configure)
|
||||||
- [`config`](/cli/config)
|
- [`config`](/cli/config)
|
||||||
|
- [`completion`](/cli/completion)
|
||||||
- [`doctor`](/cli/doctor)
|
- [`doctor`](/cli/doctor)
|
||||||
- [`dashboard`](/cli/dashboard)
|
- [`dashboard`](/cli/dashboard)
|
||||||
- [`reset`](/cli/reset)
|
- [`reset`](/cli/reset)
|
||||||
@@ -33,6 +34,7 @@ This page describes the current CLI behavior. If commands change, update this do
|
|||||||
- [`system`](/cli/system)
|
- [`system`](/cli/system)
|
||||||
- [`models`](/cli/models)
|
- [`models`](/cli/models)
|
||||||
- [`memory`](/cli/memory)
|
- [`memory`](/cli/memory)
|
||||||
|
- [`directory`](/cli/directory)
|
||||||
- [`nodes`](/cli/nodes)
|
- [`nodes`](/cli/nodes)
|
||||||
- [`devices`](/cli/devices)
|
- [`devices`](/cli/devices)
|
||||||
- [`node`](/cli/node)
|
- [`node`](/cli/node)
|
||||||
@@ -46,10 +48,13 @@ This page describes the current CLI behavior. If commands change, update this do
|
|||||||
- [`hooks`](/cli/hooks)
|
- [`hooks`](/cli/hooks)
|
||||||
- [`webhooks`](/cli/webhooks)
|
- [`webhooks`](/cli/webhooks)
|
||||||
- [`pairing`](/cli/pairing)
|
- [`pairing`](/cli/pairing)
|
||||||
|
- [`qr`](/cli/qr)
|
||||||
- [`plugins`](/cli/plugins) (plugin commands)
|
- [`plugins`](/cli/plugins) (plugin commands)
|
||||||
- [`channels`](/cli/channels)
|
- [`channels`](/cli/channels)
|
||||||
- [`security`](/cli/security)
|
- [`security`](/cli/security)
|
||||||
- [`skills`](/cli/skills)
|
- [`skills`](/cli/skills)
|
||||||
|
- [`daemon`](/cli/daemon) (legacy alias for gateway service commands)
|
||||||
|
- [`clawbot`](/cli/clawbot) (legacy alias namespace)
|
||||||
- [`voicecall`](/cli/voicecall) (plugin; if installed)
|
- [`voicecall`](/cli/voicecall) (plugin; if installed)
|
||||||
|
|
||||||
## Global flags
|
## Global flags
|
||||||
@@ -94,7 +99,9 @@ openclaw [--dev] [--profile <name>] <command>
|
|||||||
get
|
get
|
||||||
set
|
set
|
||||||
unset
|
unset
|
||||||
|
completion
|
||||||
doctor
|
doctor
|
||||||
|
dashboard
|
||||||
security
|
security
|
||||||
audit
|
audit
|
||||||
reset
|
reset
|
||||||
@@ -108,6 +115,7 @@ openclaw [--dev] [--profile <name>] <command>
|
|||||||
remove
|
remove
|
||||||
login
|
login
|
||||||
logout
|
logout
|
||||||
|
directory
|
||||||
skills
|
skills
|
||||||
list
|
list
|
||||||
info
|
info
|
||||||
@@ -145,6 +153,13 @@ openclaw [--dev] [--profile <name>] <command>
|
|||||||
stop
|
stop
|
||||||
restart
|
restart
|
||||||
run
|
run
|
||||||
|
daemon
|
||||||
|
status
|
||||||
|
install
|
||||||
|
uninstall
|
||||||
|
start
|
||||||
|
stop
|
||||||
|
restart
|
||||||
logs
|
logs
|
||||||
system
|
system
|
||||||
event
|
event
|
||||||
@@ -231,6 +246,9 @@ openclaw [--dev] [--profile <name>] <command>
|
|||||||
pairing
|
pairing
|
||||||
list
|
list
|
||||||
approve
|
approve
|
||||||
|
qr
|
||||||
|
clawbot
|
||||||
|
qr
|
||||||
docs
|
docs
|
||||||
dns
|
dns
|
||||||
setup
|
setup
|
||||||
|
|||||||
39
docs/cli/qr.md
Normal file
39
docs/cli/qr.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
summary: "CLI reference for `openclaw qr` (generate iOS pairing QR + setup code)"
|
||||||
|
read_when:
|
||||||
|
- You want to pair the iOS app with a gateway quickly
|
||||||
|
- You need setup-code output for remote/manual sharing
|
||||||
|
title: "qr"
|
||||||
|
---
|
||||||
|
|
||||||
|
# `openclaw qr`
|
||||||
|
|
||||||
|
Generate an iOS pairing QR and setup code from your current Gateway configuration.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
openclaw qr
|
||||||
|
openclaw qr --setup-code-only
|
||||||
|
openclaw qr --json
|
||||||
|
openclaw qr --remote
|
||||||
|
openclaw qr --url wss://gateway.example/ws --token '<token>'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
- `--remote`: use `gateway.remote.url` plus remote token/password from config
|
||||||
|
- `--url <url>`: override gateway URL used in payload
|
||||||
|
- `--public-url <url>`: override public URL used in payload
|
||||||
|
- `--token <token>`: override gateway token for payload
|
||||||
|
- `--password <password>`: override gateway password for payload
|
||||||
|
- `--setup-code-only`: print only setup code
|
||||||
|
- `--no-ascii`: skip ASCII QR rendering
|
||||||
|
- `--json`: emit JSON (`setupCode`, `gatewayUrl`, `auth`, `urlSource`)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- `--token` and `--password` are mutually exclusive.
|
||||||
|
- After scanning, approve device pairing with:
|
||||||
|
- `openclaw devices list`
|
||||||
|
- `openclaw devices approve <requestId>`
|
||||||
@@ -271,6 +271,10 @@
|
|||||||
"source": "/start/clawd/",
|
"source": "/start/clawd/",
|
||||||
"destination": "/start/openclaw"
|
"destination": "/start/openclaw"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"source": "/start/pairing",
|
||||||
|
"destination": "/channels/pairing"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"source": "/clawhub",
|
"source": "/clawhub",
|
||||||
"destination": "/tools/clawhub"
|
"destination": "/tools/clawhub"
|
||||||
@@ -1182,14 +1186,20 @@
|
|||||||
"group": "CLI commands",
|
"group": "CLI commands",
|
||||||
"pages": [
|
"pages": [
|
||||||
"cli/index",
|
"cli/index",
|
||||||
|
"cli/acp",
|
||||||
"cli/agent",
|
"cli/agent",
|
||||||
"cli/agents",
|
"cli/agents",
|
||||||
"cli/approvals",
|
"cli/approvals",
|
||||||
"cli/browser",
|
"cli/browser",
|
||||||
"cli/channels",
|
"cli/channels",
|
||||||
|
"cli/clawbot",
|
||||||
|
"cli/completion",
|
||||||
|
"cli/config",
|
||||||
"cli/configure",
|
"cli/configure",
|
||||||
"cli/cron",
|
"cli/cron",
|
||||||
|
"cli/daemon",
|
||||||
"cli/dashboard",
|
"cli/dashboard",
|
||||||
|
"cli/devices",
|
||||||
"cli/directory",
|
"cli/directory",
|
||||||
"cli/dns",
|
"cli/dns",
|
||||||
"cli/docs",
|
"cli/docs",
|
||||||
@@ -1201,10 +1211,12 @@
|
|||||||
"cli/memory",
|
"cli/memory",
|
||||||
"cli/message",
|
"cli/message",
|
||||||
"cli/models",
|
"cli/models",
|
||||||
|
"cli/node",
|
||||||
"cli/nodes",
|
"cli/nodes",
|
||||||
"cli/onboard",
|
"cli/onboard",
|
||||||
"cli/pairing",
|
"cli/pairing",
|
||||||
"cli/plugins",
|
"cli/plugins",
|
||||||
|
"cli/qr",
|
||||||
"cli/reset",
|
"cli/reset",
|
||||||
"cli/sandbox",
|
"cli/sandbox",
|
||||||
"cli/security",
|
"cli/security",
|
||||||
@@ -1216,7 +1228,8 @@
|
|||||||
"cli/tui",
|
"cli/tui",
|
||||||
"cli/uninstall",
|
"cli/uninstall",
|
||||||
"cli/update",
|
"cli/update",
|
||||||
"cli/voicecall"
|
"cli/voicecall",
|
||||||
|
"cli/webhooks"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
import type { Command } from "commander";
|
import type { Command } from "commander";
|
||||||
|
import { formatDocsLink } from "../terminal/links.js";
|
||||||
|
import { theme } from "../terminal/theme.js";
|
||||||
import { registerQrCli } from "./qr-cli.js";
|
import { registerQrCli } from "./qr-cli.js";
|
||||||
|
|
||||||
export function registerClawbotCli(program: Command) {
|
export function registerClawbotCli(program: Command) {
|
||||||
const clawbot = program.command("clawbot").description("Legacy clawbot command aliases");
|
const clawbot = program
|
||||||
|
.command("clawbot")
|
||||||
|
.description("Legacy clawbot command aliases")
|
||||||
|
.addHelpText(
|
||||||
|
"after",
|
||||||
|
() =>
|
||||||
|
`\n${theme.muted("Docs:")} ${formatDocsLink("/cli/clawbot", "docs.openclaw.ai/cli/clawbot")}\n`,
|
||||||
|
);
|
||||||
registerQrCli(clawbot);
|
registerQrCli(clawbot);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import path from "node:path";
|
|||||||
import { Command, Option } from "commander";
|
import { Command, Option } from "commander";
|
||||||
import { resolveStateDir } from "../config/paths.js";
|
import { resolveStateDir } from "../config/paths.js";
|
||||||
import { routeLogsToStderr } from "../logging/console.js";
|
import { routeLogsToStderr } from "../logging/console.js";
|
||||||
|
import { formatDocsLink } from "../terminal/links.js";
|
||||||
|
import { theme } from "../terminal/theme.js";
|
||||||
import { pathExists } from "../utils.js";
|
import { pathExists } from "../utils.js";
|
||||||
import {
|
import {
|
||||||
buildFishOptionCompletionLine,
|
buildFishOptionCompletionLine,
|
||||||
@@ -230,6 +232,11 @@ export function registerCompletionCli(program: Command) {
|
|||||||
program
|
program
|
||||||
.command("completion")
|
.command("completion")
|
||||||
.description("Generate shell completion script")
|
.description("Generate shell completion script")
|
||||||
|
.addHelpText(
|
||||||
|
"after",
|
||||||
|
() =>
|
||||||
|
`\n${theme.muted("Docs:")} ${formatDocsLink("/cli/completion", "docs.openclaw.ai/cli/completion")}\n`,
|
||||||
|
)
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option("-s, --shell <shell>", "Shell to generate completion for (default: zsh)").choices(
|
new Option("-s, --shell <shell>", "Shell to generate completion for (default: zsh)").choices(
|
||||||
COMPLETION_SHELLS,
|
COMPLETION_SHELLS,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { loadConfig } from "../config/config.js";
|
|||||||
import { resolvePairingSetupFromConfig, encodePairingSetupCode } from "../pairing/setup-code.js";
|
import { resolvePairingSetupFromConfig, encodePairingSetupCode } from "../pairing/setup-code.js";
|
||||||
import { runCommandWithTimeout } from "../process/exec.js";
|
import { runCommandWithTimeout } from "../process/exec.js";
|
||||||
import { defaultRuntime } from "../runtime.js";
|
import { defaultRuntime } from "../runtime.js";
|
||||||
|
import { formatDocsLink } from "../terminal/links.js";
|
||||||
import { theme } from "../terminal/theme.js";
|
import { theme } from "../terminal/theme.js";
|
||||||
|
|
||||||
type QrCliOptions = {
|
type QrCliOptions = {
|
||||||
@@ -38,6 +39,10 @@ export function registerQrCli(program: Command) {
|
|||||||
program
|
program
|
||||||
.command("qr")
|
.command("qr")
|
||||||
.description("Generate an iOS pairing QR code and setup code")
|
.description("Generate an iOS pairing QR code and setup code")
|
||||||
|
.addHelpText(
|
||||||
|
"after",
|
||||||
|
() => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/qr", "docs.openclaw.ai/cli/qr")}\n`,
|
||||||
|
)
|
||||||
.option(
|
.option(
|
||||||
"--remote",
|
"--remote",
|
||||||
"Use gateway.remote.url and gateway.remote token/password (ignores device-pair publicUrl)",
|
"Use gateway.remote.url and gateway.remote token/password (ignores device-pair publicUrl)",
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ async function noteChannelPrimer(
|
|||||||
"Multi-user DMs: run: " +
|
"Multi-user DMs: run: " +
|
||||||
formatCliCommand('openclaw config set session.dmScope "per-channel-peer"') +
|
formatCliCommand('openclaw config set session.dmScope "per-channel-peer"') +
|
||||||
' (or "per-account-channel-peer" for multi-account channels) to isolate sessions.',
|
' (or "per-account-channel-peer" for multi-account channels) to isolate sessions.',
|
||||||
`Docs: ${formatDocsLink("/start/pairing", "start/pairing")}`,
|
`Docs: ${formatDocsLink("/channels/pairing", "channels/pairing")}`,
|
||||||
"",
|
"",
|
||||||
...channelLines,
|
...channelLines,
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
@@ -253,7 +253,7 @@ async function maybeConfigureDmPolicies(params: {
|
|||||||
"Multi-user DMs: run: " +
|
"Multi-user DMs: run: " +
|
||||||
formatCliCommand('openclaw config set session.dmScope "per-channel-peer"') +
|
formatCliCommand('openclaw config set session.dmScope "per-channel-peer"') +
|
||||||
' (or "per-account-channel-peer" for multi-account channels) to isolate sessions.',
|
' (or "per-account-channel-peer" for multi-account channels) to isolate sessions.',
|
||||||
`Docs: ${formatDocsLink("/start/pairing", "start/pairing")}`,
|
`Docs: ${formatDocsLink("/channels/pairing", "channels/pairing")}`,
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
`${policy.label} DM access`,
|
`${policy.label} DM access`,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user