On this page

Command And Key Reference

Docs home · 简体中文

This page collects user-facing commands, keys, paths, shared config sections, approval outcomes, and recovery facts. Provider selection and credentials stay in the provider documentation so this reference does not duplicate them.

TUI Keys

ActionKey
Open helpF1
Open slash command selector/
Submit prompt or selected slash commandEnter
Toggle right info rail compact/detailF2
Scroll transcriptPageUp/PageDown, Ctrl-U/D, Ctrl-Home/End
Cycle default permission modeShift-Tab
Insert composer newlineCtrl-J; Shift-Enter / Alt-Enter when terminal keyboard enhancement is active and reports modifiers
Move composer cursor by line or characterCtrl-A/E, Ctrl-B/F, Left/Right
Move composer cursor by wordAlt-B/F, Ctrl-Left/Right
Delete composer textBackspace/Delete, Ctrl-H, Ctrl-W, Ctrl/Alt-Backspace, Ctrl/Alt-Delete
Kill/yank composer line tailCtrl-K/Y
Restore last draft cleared with EscCtrl-Z
Request cooperative cancellation of the current runCtrl-C
Leave overlay or clear activity focusEsc
Focus latest activityCtrl-G
Move between activitiesAlt-J / Alt-K
Focus task verificationAlt-V; then Enter runs the exact action, I inspects evidence
Open latest checkpoint restoreCtrl-R opens and loads the reverse-diff dialog; Enter restores controlled files, F forks conversation without changing files, Esc closes
Open actions for a saved sessionSelect a /resume candidate, then press Ctrl-O or right-click it
Cycle visible agent transcriptComposer agent panel (Down, Up/Down, Enter), Alt-A, Shift-Alt-A
Expand or collapse thinking / activityCtrl-T
Run code diagnostics for changed source filesAlt-D
Cancel focused running terminal taskAlt-X
Select or activate an MCP server in /configEnter cycles the inspected server; Down enters footer actions; choose activate and press Enter to activate or refresh

When the composer is focused, Up/Down first handles prompt history or cursor movement inside multiline input. If child agents exist, Down from the last composer input row focuses the composer agent panel. Ctrl-Z is a single draft restore for text cleared by Esc, not a general undo stack.

Slash Commands

CommandPurpose
/configOpen the TUI config panel
/doctorRun local setup diagnostics inside the transcript
/feedbackPreview and save a private support report; after export, Enter reviews the JSON, O reveals the file, B opens the bug form, C copies the report path, and U copies the form URL
/newStart a fresh session with the current provider and model
/resumeSelect and restore a previous session; Ctrl-O or right-click opens its lifecycle actions
/agent <main|child-id>Switch the main chat area between the parent session and child agent transcripts
/agent rename <child-id|current> <name>Persist a short display name for a child agent transcript
/agent cancel <child-id|current>Cancel a running background child agent that still has a live runtime handle
/queueAdvanced follow-up controls
/queue next|interrupt|edit|delete [item]Keep a follow-up for the next turn, interrupt and run it now, edit it, or cancel it
/plan / /plan <prompt>Run a read-only planning prompt; accept the plan card to create and run a durable task
/task <task>Create a durable plan and execute the task step by step
/task continueContinue the latest planned task without extra guidance
/model <flash|pro|id>Switch the next run's model and start a fresh session
/effort <low|medium|high|max>Switch the next run's reasoning effort
/compactReview the V2 fold plan; confirm one manual apply when exact local admission is ready
/quitQuit the TUI

Aliases: /m for /model, /e for /effort, and /q or /exit for /quit.

Workspace trust is handled by the startup workspace trust gate, not a slash command. Trust decisions are recorded in the session audit log. They allow repository-local verification candidates to be promoted for task readiness and permit an exact-workspace LSP with trust_required = true to start. They do not grant shell, plugin, MCP, or file-write permissions, and LSP write tools still require diff approval.

/model, /effort, /resume, /agent, and /queue show candidates. Use Up/Down to select, Tab to accept, and Enter to execute. /agent rename also shows child-agent candidates before the new name is typed.

CLI Commands

CommandUse
sigilOpen the TUI in the current workspace
sigil doctor [--output text|json]Run local diagnostics; JSON produces one versioned, redacted report on stdout
sigil run "<task>" [--output text|json|jsonl]Run a non-interactive task; machine modes keep stdout parseable
sigil resume [session-id]Open the TUI and restore the latest or requested session; TUI exit prints a copyable resume command
sigil serveStart the loopback-only, bearer-authenticated local HTTP/SSE service
sigil --versionPrint the installed version
sigil --config <path> doctorRun diagnostics with an explicit config file

Subcommands are for automation, diagnostics, scripts, and setup checks. The full product surface is the TUI.

Machine Output And Local Server

sigil run --output json writes one versioned terminal record to stdout. --output jsonl writes ordered versioned event records and then exactly one terminal result or error. Human progress and safe network-disclosure notices stay on stderr. Stable exit codes are 0 for success, 1 for execution failure, 2 for invalid invocation or configuration, and 130 for a cooperatively cancelled run.

The local server is an advanced interface for a local client; it does not replace the TUI. Start it with a token stored in an environment variable:

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

The command prints the actual loopback address selected by the OS. GET /health is unauthenticated; GET /openapi.json, GET /disclosures, and every session, run, event, cancellation, or approval route require Authorization: Bearer <token>. V1 rejects non-loopback hosts, a missing token, and --no-token before opening a listener. It does not enable cookie auth, wildcard CORS, remote access, daemon auto-start, or multi-user isolation.

Run events replay durable history and then remain live until a terminal event, disconnect, stream gap, or server shutdown. Last-Event-ID resumes retained durable events; transient text and reasoning progress is best effort and has no replay id. Ctrl-C closes command admission, cooperatively cancels active runs, drains owned workers and connections, and then exits.

Config Resolution

Sigil resolves config in this order:

  1. --config <path>
  2. sigil.toml in the user-visible Sigil config directory

Default user config path:

Important Paths

PathMeaning
User state root workspaces/<workspace-id>/sessions/Default append-only session logs
User state root workspaces/<workspace-id>/input-history.jsonlComposer input history
User state root workspaces/<workspace-id>/artifacts/Terminal and changeset artifacts
User state root workspaces/<workspace-id>/http-server-v1/Local-server recovery and audit data
User cache root workspaces/<workspace-id>/tmp/Shell scratch directory exposed as $SIGIL_SCRATCH_DIR and shown as cache/tmp
User config sigil.tomlDefault local machine config
.sigil/agents/, .sigil/commands/, .sigil/skills/, .sigil/plugins/Optional workspace project assets
SIGIL.mdStable workspace memory file
AGENTS.mdAgent collaboration instructions that Sigil can load as memory
SIGIL.local.mdLocal-only memory file

Do not commit real secrets in sigil.toml or local memory files. A workspace-root sigil.toml is not loaded by default; pass --config <path> explicitly if you need one for an experiment.

Provider Setup

Use the Provider guide for the supported provider values, model selection, and authentication priority. Each linked provider page owns its copyable config block and complete environment-variable list. Shared model-request timeout overrides are documented in Advanced configuration.

Common Config Sections

SectionPurpose
[workspace]Workspace root
[agent]Shared agent settings
[permission]Default approval policy
[web]Stable search route, network policy, destination rules, and budgets
[memory]Workspace memory loading
[compaction]Context compaction thresholds
[task]Planned task behavior and role settings
[verification]Explicit user-approved verification checks
[code_intelligence]LSP and code intelligence tools
[terminal]Mouse, OSC52 clipboard, scroll behavior, and optional attention notifications
[appearance]TUI theme, usage cost currency, and semantic color overrides
[[mcp_servers]]Explicit stdio or user-root streamable_http MCP server configuration

See Sigil Configuration Guide for examples. Provider and model selection, [providers.*] blocks, and authentication variables are indexed in the Provider guide.

Web Tool Inputs

ToolRequired inputImportant boundary
websearchquery; optional max_resultsRoute resolution is provider-hosted, authoritative configured MCP, or bundled Exa. A failed selected route does not silently change destination.
webfetchsource_id; optional format (markdown or text) and max_content_bytesAccepts only a session-local exact URL capability; it does not accept a novel raw url argument.

Both tools are Read operations with an independent NetworkRead effect. [web].network_mode = "deny" blocks them even if the local permission mode is permissive. ask requires an explicit interactive action and therefore fails closed in headless/eager contexts that cannot ask.

Approval Outcomes

OutcomeMeaning
allowRun the tool call
denyReturn a structured denial to the model
timeoutDeny automatically after waiting too long
approval_requiredHeadless mode needed a decision but could not ask interactively

Session Recovery Facts