Terminal
Local shell copilot. Plan clearly, run carefully.
Core Philosophy
- 1. Translate intent into executable shell steps.
- Prefer preview and inspection before mutation.
- Require explicit confirmation for destructive operations.
- Summarize results in human language after execution.
- Offer privacy-aware history controls for sensitive workflows.
Runtime Requirements
- - Python 3 must be available as INLINECODE0
- Standard shell utilities should be available in the local environment
- No external packages required
Safety Model
- - Local-only execution
- No external credential requests
- No hidden network activity
- Destructive operations require explicit confirmation
- Prefer read-only inspection first
- Blocked and previewed commands are recorded in local history
- Risk detection covers destructive, privilege-escalation, remote-fetch, and code-execution patterns
Privacy Controls
- - History is stored locally only
- History file permissions are restricted to the local user when possible
- Use
--preview to inspect before execution - Use
--no-store-output to avoid storing stdout/stderr in history for sensitive commands - Use
--redact-display to mask sensitive-looking values in displayed output - Sensitive-looking tokens are redacted before history is written
Storage
All local data is stored only under:
No cloud sync. No third-party APIs. No telemetry.
Workflows
- - Plan command: Turn user intent into a safe shell command suggestion
- Preview risk: Explain command effects before execution
- Execute: Run a local command and capture stdout/stderr
- Summarize: Explain what happened in plain language
- History: Save executed, previewed, and blocked command runs locally
Scripts
| Script | Purpose |
|---|
| INLINECODE5 | Initialize local terminal history storage |
| INLINECODE6 |
Generate a shell command from user intent |
|
run_command.py | Execute or preview a local command with safety checks and privacy controls |
|
summarize_result.py | Summarize command output in plain language |
|
show_history.py | Show recent command history |
终端
本地 Shell 助手。清晰规划,谨慎执行。
核心理念
- 1. 将意图转化为可执行的 Shell 步骤。
- 在变更前优先预览和检查。
- 破坏性操作需明确确认。
- 执行后用自然语言总结结果。
- 为敏感工作流提供隐私感知的历史记录控制。
运行时要求
- - Python 3 必须以 python3 形式可用
- 本地环境应具备标准 Shell 工具
- 无需外部包
安全模型
- - 仅本地执行
- 无外部凭据请求
- 无隐藏网络活动
- 破坏性操作需明确确认
- 优先进行只读检查
- 被阻止和预览的命令记录在本地历史中
- 风险检测涵盖破坏性、权限提升、远程获取和代码执行模式
隐私控制
- - 历史记录仅存储在本地
- 历史文件权限尽可能限制为本地用户
- 使用 --preview 在执行前预览
- 使用 --no-store-output 避免将敏感命令的 stdout/stderr 存入历史
- 使用 --redact-display 在显示输出中遮盖敏感值
- 写入历史前会遮盖敏感令牌
存储
所有本地数据仅存储在:
- - ~/.openclaw/workspace/memory/terminal/history.json
无云同步。无第三方 API。无遥测。
工作流
- - 规划命令:将用户意图转化为安全的 Shell 命令建议
- 预览风险:在执行前解释命令效果
- 执行:运行本地命令并捕获 stdout/stderr
- 总结:用通俗语言解释执行结果
- 历史:在本地保存已执行、已预览和已阻止的命令运行记录
脚本
| 脚本 | 用途 |
|---|
| initstorage.py | 初始化本地终端历史存储 |
| plancommand.py |
根据用户意图生成 Shell 命令 |
| run_command.py | 通过安全检查与隐私控制执行或预览本地命令 |
| summarize_result.py | 用通俗语言总结命令输出 |
| show_history.py | 显示近期命令历史 |