Windows安装openclaw遇到powershell不见了


# 第一步:临时解除脚本限制(仅对当前窗口有效)Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force# 第二步:重新安装 Chocolatey[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
PS C:\Users\Administrator> [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)Getting latest version of the Chocolatey package for download.Not using proxy.Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/2.7.1.Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.7.1 to C:\Users\ADMINI~1\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zipNot using proxy.Extracting C:\Users\ADMINI~1\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\ADMINI~1\AppData\Local\Temp\chocolatey\chocoInstallInstalling Chocolatey on the local machineCreating ChocolateyInstall as an environment variable (targeting 'Machine')Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'WARNING: It's very likely you will need to close and reopen your shellbefore you can use choco.Restricting write permissions to AdministratorsWe are setting up the Chocolatey package repository.The packages themselves go to 'C:\ProgramData\chocolatey\lib'(i.e. C:\ProgramData\chocolatey\lib\yourPackageName).A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.Creating Chocolatey CLI folders if they do not already exist.chocolatey.nupkg file not installed in lib.Attempting to locate it from bootstrapper.PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...Not setting tab completion: Profile variable ($profile) resulted in an empty string.Chocolatey CLI (choco.exe) is now ready.You can call choco from anywhere, command line or PowerShell by typing choco.Run choco /? for a list of functions.You may need to shut down and restart PowerShell and/or consolesfirst prior to using choco.Ensuring Chocolatey commands are on the pathEnsuring chocolatey.nupkg is in the lib folderPS C:\Users\Administrator> iwr -useb https://openclaw.ai/install.ps1 | iexOpenClaw Installer[OK] Windows detected[OK] Node.js v24.15.0 found[*] Git not found; bootstrapping user-local portable Git...Downloading v2.54.0.windows.1...[OK] User-local Git ready: git version 2.54.0.windows.1[*] Installing OpenClaw (openclaw@latest)...[OK] OpenClaw installedOpenClaw installed successfully (OpenClaw 2026.5.7 (eeef486))!Cozy. I've already read your calendar. We need to talk.Starting setup...
PS C:\Users\Administrator> openclaw crestodian --message "status"Crestodian online. Little claws, typed tools.Config: missing (configless rescue mode)Path: C:\Users\Administrator\.openclaw\openclaw.jsonDefault agent: mainDefault model: not configuredAgents:- main | defaultCodex: not foundClaude Code: not foundAPI keys: OpenAI not found, Anthropic not foundPlanner: deterministic only until a model is configuredDocs: C:\Users\Administrator\AppData\Roaming\npm\node_modules\openclaw\docsSource: https://github.com/openclaw/openclawGateway: not reachable (ws://127.0.0.1:18789, local loopback)Gateway note: fetch failedNext: run "setup" to create a starter config[crestodian] queued: status.check[crestodian] running: status.checkOpenClaw statusOverview+----------------------+-----------------------------------------------------------------------------------------------+| Item | Value |+----------------------+-----------------------------------------------------------------------------------------------+| OS | windows 10.0.26200 (x64) 路 node 24.15.0 || Dashboard | http://127.0.0.1:18789/ || Tailscale exposure | off || Channel | stable (default) || Update | pkg || Gateway | local 路 ws://127.0.0.1:18789 (local loopback) 路 unreachable || Gateway service | Scheduled Task not installed || Node service | Scheduled Task not installed || Agents | 0 路 no bootstrap files 路 sessions 0 || Memory | enabled (plugin memory-core) 路 not checked || Plugin compatibility | none || Probes | skipped (use --deep) || Events | none || Tasks | none || Heartbeat | disabled || Sessions | 0 active 路 default unknown 路 unknown |+----------------------+-----------------------------------------------------------------------------------------------+Security auditSkipped in fast status. Full report: openclaw security auditDeep probe: openclaw status --deepChannels+----------+---------+--------+----------------------------------------------------------------------------------------+| Channel | Enabled | State | Detail |+----------+---------+--------+----------------------------------------------------------------------------------------++----------+---------+--------+----------------------------------------------------------------------------------------+Sessions+------------------------------------------------------+------+---------+--------------+--------------+----------------+| Key | Kind | Age | Model | Runtime | Tokens |+------------------------------------------------------+------+---------+--------------+--------------+----------------+| no sessions yet | | | | | |+------------------------------------------------------+------+---------+--------------+--------------+----------------+FAQ: https://docs.openclaw.ai/faqTroubleshooting: https://docs.openclaw.ai/troubleshootingNext steps:Need to share? openclaw status --allNeed to debug live? openclaw logs --followFix reachability first: openclaw gateway probe[crestodian] done: status.check
以下是 OpenClaw 的常用命令速查表,按使用频率和功能分类,方便你快速查阅。
🚀 核心启动与配置
|
|
|
|
|---|---|---|
openclaw |
|
openclaw |
openclaw setup |
|
openclaw setup |
openclaw setup --wizard |
|
openclaw setup --wizard |
openclaw configure |
|
openclaw configure |
openclaw configure --interactive |
|
openclaw configure --interactive |
openclaw doctor |
|
openclaw doctor |
openclaw doctor --fix |
|
openclaw doctor --fix |
📊 状态查看
|
|
|
|
|---|---|---|
openclaw status |
|
openclaw status |
openclaw status --all |
|
openclaw status --all |
openclaw status --deep |
|
openclaw status --deep |
openclaw logs |
|
openclaw logs |
openclaw logs --follow |
tail -f) |
openclaw logs --follow |
openclaw logs --lines 100 |
|
openclaw logs --lines 100 |
🌐 网关管理(Gateway)
网关是 OpenClaw 的核心通信组件,必须正常运行。
|
|
|
|
|---|---|---|
openclaw gateway status |
|
openclaw gateway status |
openclaw gateway probe |
|
openclaw gateway probe |
openclaw gateway restart |
|
openclaw gateway restart |
openclaw gateway start |
|
openclaw gateway start |
openclaw gateway stop |
|
openclaw gateway stop |
💬 与 Crestodian(核心代理)交互
crestodian 是 OpenClaw 的底层执行引擎。
|
|
|
|
|---|---|---|
openclaw crestodian --message "xxx" |
|
openclaw crestodian --message "帮我写个Hello World" |
openclaw crestodian --message "status" |
|
openclaw crestodian --message "status" |
🔌 渠道管理(Channels)
支持 Discord、Telegram、Slack 等消息渠道。
|
|
|
|
|---|---|---|
openclaw channels status |
|
openclaw channels status |
openclaw channels status --probe |
|
openclaw channels status --probe |
openclaw channels list |
|
openclaw channels list |
openclaw channels add |
|
openclaw channels add |
📦 插件管理
|
|
|
|
|---|---|---|
openclaw plugins list |
|
openclaw plugins list |
openclaw plugins install <包名> |
|
openclaw plugins install @openclaw/weather |
openclaw plugins remove <包名> |
|
openclaw plugins remove @openclaw/weather |
📁 配置与文件管理
|
|
|
|
|---|---|---|
openclaw config get <key> |
|
openclaw config get gateway.mode |
openclaw config set <key> <value> |
|
openclaw config set gateway.mode local |
|
|
|
C:\Users\你的用户名\.openclaw\openclaw.json |
|
|
|
C:\Users\你的用户名\.openclaw\workspace |
|
|
|
C:\Users\你的用户名\.openclaw\agents\main\sessions |
🧪 调试与故障排除
|
|
|
|
|---|---|---|
openclaw --version |
|
openclaw --version |
openclaw --help |
|
openclaw --help |
openclaw <子命令> --help |
|
openclaw gateway --help |
🎯 你现在该执行什么?
根据之前的安装进度,你已经完成了 openclaw setup,下一步应该:
# 1. 运行完整配置向导(推荐)openclaw setup --wizard# 或者 2. 直接运行交互式配置openclaw configure --interactive
配置过程中需要提供:
- AI 模型密钥
(OpenAI 或 Anthropic) - 通信渠道
(可选,可以先跳过)
配置完成后,运行以下命令验证一切正常:
openclaw status # 应该不再显示 "missing"openclaw gateway probe # 应该显示 "Reachable: yes"openclaw doctor # 应该显示 "no blocking errors"
💡 提示:如果某个命令执行出错,可以把错误信息直接贴给我,我帮你分析具体原因。
夜雨聆风