本页内容

命令与键位参考

文档首页 · English

这一页集中列出用户可见命令、键位、路径、共享配置区块、审批结果和恢复事实。Provider 选择与凭据留在 provider 文档中,避免参考页再次复制。

TUI 键位

动作键位
打开帮助F1
打开 slash command selector/
提交 prompt 或已选 slash commandEnter
切换右侧 info rail 精简/详情F2
滚动 transcriptPageUp/PageDown, Ctrl-U/D, Ctrl-Home/End
切换默认 permission modeShift-Tab
插入 composer 换行Ctrl-J;terminal keyboard enhancement 已启用且能上报 modifier 时也支持 Shift-Enter / Alt-Enter
按行或字符移动 composer 光标Ctrl-A/ECtrl-B/FLeft/Right
按词移动 composer 光标Alt-B/FCtrl-Left/Right
删除 composer 文本Backspace/DeleteCtrl-HCtrl-WCtrl/Alt-BackspaceCtrl/Alt-Delete
kill/yank composer 行尾Ctrl-K/Y
恢复最近一次被 Esc 清空的 draftCtrl-Z
请求协作式取消当前 runCtrl-C
离开 overlay 或清除 activity focusEsc
聚焦最新 activityCtrl-G
在 activities 间移动Alt-J / Alt-K
聚焦 task verificationAlt-V;随后用 Enter 执行精确 action,I 查看证据
打开最新 checkpoint 恢复Ctrl-R 打开并加载反向 diff 弹窗;Enter 恢复受控文件,F 在不改文件的情况下 fork 会话,Esc 关闭
打开已保存 session 的 actions选中 /resume 候选后按 Ctrl-O,或右键单击该候选
切换可见 agent transcriptcomposer agent 面板(DownUp/DownEnter)、Alt-AShift-Alt-A
展开或折叠 thinking / activityCtrl-T
对 changed source files 运行 code diagnosticsAlt-D
取消聚焦的运行中 terminal taskAlt-X
/config 中选择或启动 MCP serverEnter 循环切换当前查看的 server;Down 进入 footer actions;选择 activate 后按 Enter 启动或刷新

当 composer 聚焦时,Up/Down 会优先处理 prompt history 或 multiline input 内的光标移动。如果存在 child agent,输入光标位于 composer 最后一行时按 Down 会聚焦 composer agent 面板。Ctrl-Z 只恢复被 Esc 清空的单个 draft,不是通用 undo 栈。

Slash Commands

Command作用
/config打开 TUI config panel
/doctor在 transcript 中运行本地 setup diagnostics
/feedback预览并保存私密支持报告;导出后用 Enter 检查 JSON、O 定位文件、B 打开 Bug 表单、C 复制报告路径、U 复制表单链接
/new使用当前 provider 和 model 开始新 session
/resume选择并恢复历史 session;Ctrl-O 或右键打开 lifecycle actions
/agent <main|child-id>在 parent session 和 child agent transcript 之间切换主聊天区
/agent rename <child-id|current> <name>为 child agent transcript 持久化一个短展示名
/agent cancel <child-id|current>取消仍有 live runtime handle 的运行中后台 child agent
/queue高级 follow-up 控制
/queue next|interrupt|edit|delete [item]保留 follow-up 到下一轮、interrupt 并立即运行、编辑或取消
/plan / /plan <prompt>运行一次只读 planning prompt;接受 plan card 后创建并运行 durable task
/task <task>创建 durable plan,并分步骤执行任务
/task continue不带额外 guidance 继续最新 planned task
/model <flash|pro|id>切换下一轮 run 的 model,并开始新 session
/effort <low|medium|high|max>切换下一轮 run 的 reasoning effort
/compact审查 V2 折叠计划;本地 exact admission ready 时确认一次手动应用
/quit退出 TUI

Aliases:/m 对应 /model/e 对应 /effort/q/exit 对应 /quit

Workspace trust 由启动时的 workspace trust gate 处理,不是 slash command。trust decision 会记录进 session audit log;它允许仓库本地 verification 候选检查被提升为 task readiness 可用的检查,也允许精确匹配 workspace 且 trust_required = true 的 LSP 启动。它不会单独授予 shell、plugin、MCP 或文件写入权限,LSP 写工具仍需 diff 审批。

/model/effort/resume/agent/queue 会展示候选项。使用 Up/Down 选择,Tab 接受,Enter 执行。/agent rename 会在输入新名字前展示 child agent 候选项。

CLI Commands

Command用途
sigil在当前 workspace 打开 TUI
sigil doctor [--output text|json]运行本地诊断;JSON 会在 stdout 输出唯一一份带版本的脱敏报告
sigil run "<task>" [--output text|json|jsonl]运行非交互任务;machine mode 保持 stdout 可直接解析
sigil resume [session-id]打开 TUI 并恢复 latest 或指定 session;TUI 退出时会打印可复制的恢复命令
sigil serve启动只允许 loopback、要求 bearer auth 的本机 HTTP/SSE 服务
sigil --version打印安装版本
sigil --config <path> doctor使用显式 config 文件运行诊断

子命令用于自动化、诊断、脚本和设置检查。完整产品表面是 TUI。

Machine Output 与本地服务

sigil run --output json 向 stdout 写入唯一一条带版本的 terminal record。--output jsonl 写入有序的带版本 event records,并以唯一 terminal result 或 error 结束。人类可读进度和安全的 network-disclosure notice 保留在 stderr。稳定 exit code 为:成功 0、执行失败 1、调用或配置无效 2、cooperative cancellation 130

本地服务是供本机 client 使用的高级接口,不替代 TUI。使用保存在环境变量中的 token 启动:

export SIGIL_HTTP_TOKEN="$(openssl rand -hex 32)"
sigil serve

命令会打印 OS 实际选择的 loopback 地址。GET /health 不要求认证;GET /openapi.jsonGET /disclosures,以及所有 session、run、event、cancel 和 approval route 都要求 Authorization: Bearer <token>。V1 会在打开 listener 前拒绝 non-loopback host、缺失 token 和 --no-token。它不启用 cookie auth、wildcard CORS、remote access、daemon auto-start 或 multi-user isolation。

Run event 会先 replay durable history,再保持 live,直到 terminal event、client disconnect、stream gap 或 server shutdown。Last-Event-ID 用于继续读取 retained durable events;transient text/reasoning progress 是 best effort,没有 replay id。按 Ctrl-C 后,服务会关闭新 command admission、cooperatively cancel active runs、drain owned workers 和 connections,然后退出。

Config 解析顺序

Sigil 按以下顺序解析 config:

  1. --config <path>
  2. 用户可见 Sigil 配置目录下的 sigil.toml

默认用户配置路径:

重要路径

Path含义
用户态 state root workspaces/<workspace-id>/sessions/默认 append-only session logs
用户态 state root workspaces/<workspace-id>/input-history.jsonlcomposer input history
用户态 state root workspaces/<workspace-id>/artifacts/terminal 和 changeset artifacts
用户态 state root workspaces/<workspace-id>/http-server-v1/本地服务的恢复与审计数据
用户态 cache root workspaces/<workspace-id>/tmp/shell scratch 目录,通过 $SIGIL_SCRATCH_DIR 暴露,对模型显示为 cache/tmp
用户配置目录 sigil.toml默认本机配置
.sigil/agents/.sigil/commands/.sigil/skills/.sigil/plugins/可选 workspace project assets
SIGIL.md稳定 workspace memory file
AGENTS.mdSigil 可作为 memory 加载的 agent 协作说明
SIGIL.local.md本地专用 memory file

不要提交包含真实 secret 的 sigil.toml 或本地 memory 文件。workspace 根目录的 sigil.toml 默认不会被读取;如需实验配置,请显式传入 --config <path>

Provider 设置

支持的 provider value、model 选择和认证优先级见 Provider 指南。其中链接的各 provider 专页分别维护可复制的配置 block 和完整环境变量清单。共享的模型请求 timeout 覆盖见高级配置

常见 Config Sections

Section作用
[workspace]Workspace root
[agent]共享 agent 设置
[permission]默认审批策略
[web]Stable search route、网络策略、destination rule 与预算
[memory]Workspace memory loading
[compaction]Context compaction 阈值
[task]Planned task 行为和 role settings
[verification]显式用户批准的 verification checks
[code_intelligence]LSP 和 code intelligence tools
[terminal]Mouse、OSC52 clipboard、scroll 行为和可选 attention notification
[appearance]TUI 主题、usage cost currency 和语义颜色覆盖
[[mcp_servers]]显式 stdio 或用户根 streamable_http MCP server 配置

示例见 Sigil 配置指南。 Provider 与 model 选择、[providers.*] block 和认证环境变量统一由 Provider 指南索引。

Web Tool 输入

Tool必填输入关键边界
websearchquery;可选 max_resultsRoute 由 provider-hosted、authoritative configured MCP 或 bundled Exa 解析;已选 route 失败后不会静默换 destination。
webfetchsource_id;可选 formatmarkdown/text)和 max_content_bytes只接受 session-local 精确 URL capability,不接受新造的 raw url 参数。

两个工具都是带独立 NetworkRead effect 的 Read 操作。即使本地 permission mode 较宽松,[web].network_mode = "deny" 仍会阻断;ask 必须来自显式交互动作,因此在无法询问的 headless/eager 场景会 fail closed。

Approval Outcomes

Outcome含义
allow执行 tool call
deny向模型返回结构化 denial
timeout等待过久后自动 deny
approval_requiredHeadless mode 需要决策但无法交互询问

Session Recovery Facts