Files
everything-claude-code/docs/zh-CN/commands/claw.md
zdoc.app abcf38b085 docs(zh-CN): sync Chinese docs with latest upstream changes (#341)
* docs(zh-CN): sync Chinese docs with latest upstream changes

* docs(zh-CN): update link

---------

Co-authored-by: neo <neo.dowithless@gmail.com>
2026-03-07 14:48:02 -08:00

52 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 启动 NanoClaw v2 — ECC 的持久、零依赖 REPL具备模型路由、技能热加载、分支、压缩、导出和指标功能。
---
# Claw 命令
启动一个具有持久化 Markdown 历史记录和操作控制的交互式 AI 代理会话。
## 使用方法
```bash
node scripts/claw.js
```
或通过 npm
```bash
npm run claw
```
## 环境变量
| 变量 | 默认值 | 描述 |
|----------|---------|-------------|
| `CLAW_SESSION` | `default` | 会话名称(字母数字 + 连字符) |
| `CLAW_SKILLS` | *(空)* | 启动时加载的以逗号分隔的技能列表 |
| `CLAW_MODEL` | `sonnet` | 会话的默认模型 |
## REPL 命令
```text
/help Show help
/clear Clear current session history
/history Print full conversation history
/sessions List saved sessions
/model [name] Show/set model
/load <skill-name> Hot-load a skill into context
/branch <session-name> Branch current session
/search <query> Search query across sessions
/compact Compact old turns, keep recent context
/export <md|json|txt> [path] Export session
/metrics Show session metrics
exit Quit
```
## 说明
* NanoClaw 保持零依赖。
* 会话存储在 `~/.claude/claw/<session>.md`
* 压缩会保留最近的回合并写入压缩头。
* 导出支持 Markdown、JSON 回合和纯文本。