- All gsdDir/gsdRoot/gsdHome → sfDir/sfRootDir/sfHome - GSDWorkspace* → SFWorkspace* interfaces - bootstrapGsdProject → bootstrapProject - runGSDDoctor → runSFDoctor - GsdClient → SfClient, gsd-client.ts → sf-client.ts - .gsd/ → .sf/ in all tests, docs, docker, native, vscode - Auto-migration: headless detects .gsd/ → renames to .sf/ - Deleted gsd-phase-state.ts backward-compat re-export - Renamed bin/gsd-from-source → bin/sf-from-source - Updated mintlify docs, github workflows, docker configs
182 lines
7.4 KiB
Text
182 lines
7.4 KiB
Text
---
|
|
title: "Commands reference"
|
|
description: "Every SF command, keyboard shortcut, and CLI flag."
|
|
---
|
|
|
|
## Session commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf` | Step mode — execute one unit at a time, pause between each |
|
|
| `/sf next` | Explicit step mode (same as `/sf`) |
|
|
| `/sf auto` | Autonomous mode — research, plan, execute, commit, repeat |
|
|
| `/sf quick` | Execute a quick task with SF guarantees without full planning overhead |
|
|
| `/sf stop` | Stop auto mode gracefully |
|
|
| `/sf pause` | Pause auto mode (preserves state, `/sf auto` to resume) |
|
|
| `/sf steer` | Hard-steer plan documents during execution |
|
|
| `/sf discuss` | Discuss architecture and decisions (works alongside auto mode) |
|
|
| `/sf rethink` | Conversational project reorganization |
|
|
| `/sf mcp` | MCP server status and connectivity |
|
|
| `/sf status` | Progress dashboard |
|
|
| `/sf widget` | Cycle dashboard widget: full / small / min / off |
|
|
| `/sf queue` | Queue and reorder future milestones (safe during auto mode) |
|
|
| `/sf capture` | Fire-and-forget thought capture (works during auto mode) |
|
|
| `/sf triage` | Manually trigger triage of pending captures |
|
|
| `/sf dispatch` | Dispatch a specific phase directly |
|
|
| `/sf history` | View execution history (supports `--cost`, `--phase`, `--model` filters) |
|
|
| `/sf forensics` | Full-access debugger for auto-mode failures |
|
|
| `/sf cleanup` | Clean up SF state files and stale worktrees |
|
|
| `/sf visualize` | Open workflow visualizer |
|
|
| `/sf export --html` | Generate self-contained HTML report |
|
|
| `/sf export --html --all` | Generate reports for all milestones |
|
|
| `/sf update` | Update SF to the latest version in-session |
|
|
| `/sf knowledge` | Add persistent project knowledge |
|
|
| `/sf fast` | Toggle service tier for supported models |
|
|
| `/sf rate` | Rate last unit's model tier (over/ok/under) |
|
|
| `/sf changelog` | Show categorized release notes |
|
|
| `/sf logs` | Browse activity logs, debug logs, and metrics |
|
|
| `/sf remote` | Control remote auto-mode |
|
|
| `/sf help` | Categorized command reference |
|
|
|
|
## Configuration and diagnostics
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf prefs` | Model selection, timeouts, budget ceiling |
|
|
| `/sf mode` | Switch workflow mode (solo/team) |
|
|
| `/sf config` | Re-run the provider setup wizard |
|
|
| `/sf keys` | API key manager — list, add, remove, test, rotate |
|
|
| `/sf doctor` | Runtime health checks with auto-fix |
|
|
| `/sf inspect` | Show SQLite DB diagnostics |
|
|
| `/sf init` | Project init wizard |
|
|
| `/sf setup` | Global setup status and configuration |
|
|
| `/sf skill-health` | Skill lifecycle dashboard |
|
|
| `/sf hooks` | Show configured post-unit and pre-dispatch hooks |
|
|
| `/sf run-hook` | Manually trigger a specific hook |
|
|
| `/sf migrate` | Migrate a v1 `.planning` directory to `.sf` format |
|
|
|
|
## Milestone management
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf new-milestone` | Create a new milestone |
|
|
| `/sf skip` | Prevent a unit from auto-mode dispatch |
|
|
| `/sf undo` | Revert last completed unit |
|
|
| `/sf undo-task` | Reset a specific task's completion state |
|
|
| `/sf reset-slice` | Reset a slice and all its tasks |
|
|
| `/sf park` | Park a milestone — skip without deleting |
|
|
| `/sf unpark` | Reactivate a parked milestone |
|
|
|
|
## Parallel orchestration
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf parallel start` | Analyze eligibility, confirm, and start workers |
|
|
| `/sf parallel status` | Show all workers with state, progress, and cost |
|
|
| `/sf parallel stop [MID]` | Stop all workers or a specific one |
|
|
| `/sf parallel pause [MID]` | Pause all or a specific worker |
|
|
| `/sf parallel resume [MID]` | Resume paused workers |
|
|
| `/sf parallel merge [MID]` | Merge completed milestones to main |
|
|
|
|
## Workflow templates
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf start` | Start a workflow template (bugfix, spike, feature, hotfix, refactor, etc.) |
|
|
| `/sf start resume` | Resume an in-progress workflow |
|
|
| `/sf templates` | List available workflow templates |
|
|
| `/sf templates info <name>` | Show detailed template info |
|
|
|
|
## Custom workflows
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf workflow new` | Create a new workflow definition |
|
|
| `/sf workflow run <name>` | Create a run and start auto-mode |
|
|
| `/sf workflow list` | List workflow runs |
|
|
| `/sf workflow validate <name>` | Validate a workflow definition |
|
|
| `/sf workflow pause` | Pause custom workflow auto-mode |
|
|
| `/sf workflow resume` | Resume paused custom workflow auto-mode |
|
|
|
|
## Extensions
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/sf extensions list` | List all extensions and their status |
|
|
| `/sf extensions enable <id>` | Enable a disabled extension |
|
|
| `/sf extensions disable <id>` | Disable an extension |
|
|
| `/sf extensions info <id>` | Show extension details |
|
|
|
|
## Keyboard shortcuts
|
|
|
|
| Shortcut | Action |
|
|
|----------|--------|
|
|
| `Ctrl+Alt+G` | Toggle dashboard overlay |
|
|
| `Ctrl+Alt+V` | Toggle voice transcription |
|
|
| `Ctrl+Alt+B` | Show background shell processes |
|
|
| `Ctrl+V` / `Alt+V` | Paste image from clipboard |
|
|
| `Escape` | Pause auto mode |
|
|
|
|
<Note>
|
|
In terminals without Kitty keyboard protocol support (macOS Terminal.app, JetBrains IDEs), slash-command fallbacks are shown instead of `Ctrl+Alt` shortcuts.
|
|
</Note>
|
|
|
|
## CLI flags
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `sf` | Start a new interactive session |
|
|
| `sf --continue` (`-c`) | Resume the most recent session |
|
|
| `sf --model <id>` | Override the default model |
|
|
| `sf --print "msg"` (`-p`) | Single-shot prompt mode (no TUI) |
|
|
| `sf --mode <text\|json\|rpc\|mcp>` | Output mode for non-interactive use |
|
|
| `sf --list-models [search]` | List available models and exit |
|
|
| `sf --web [path]` | Start browser-based web interface |
|
|
| `sf --worktree` (`-w`) `[name]` | Start session in a git worktree |
|
|
| `sf --no-session` | Disable session persistence |
|
|
| `sf --extension <path>` | Load an additional extension |
|
|
| `sf --version` (`-v`) | Print version and exit |
|
|
| `sf sessions` | Interactive session picker |
|
|
| `sf config` | Set up global API keys |
|
|
| `sf update` | Update SF to the latest version |
|
|
|
|
## Headless mode
|
|
|
|
`sf headless` runs commands without a TUI — designed for CI, cron jobs, and scripted automation.
|
|
|
|
```bash
|
|
sf headless # run auto mode
|
|
sf headless next # run a single unit
|
|
sf headless query # instant JSON snapshot (~50ms, no LLM)
|
|
sf headless --timeout 600000 auto # with timeout
|
|
sf headless new-milestone --context brief.md --auto
|
|
```
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `--timeout N` | Overall timeout in milliseconds (default: 300000) |
|
|
| `--max-restarts N` | Auto-restart on crash (default: 3, set 0 to disable) |
|
|
| `--json` | Stream events as JSONL to stdout |
|
|
| `--model ID` | Override the model |
|
|
| `--context <file>` | Context file for `new-milestone` (use `-` for stdin) |
|
|
| `--auto` | Chain into auto-mode after milestone creation |
|
|
|
|
**Exit codes:** `0` = complete, `1` = error/timeout, `2` = blocked.
|
|
|
|
### `sf headless query`
|
|
|
|
Returns a JSON snapshot of the project state — no LLM session, instant response.
|
|
|
|
```bash
|
|
sf headless query | jq '.state.phase' # "executing"
|
|
sf headless query | jq '.next' # next dispatch action
|
|
sf headless query | jq '.cost.total' # total spend
|
|
```
|
|
|
|
## MCP server mode
|
|
|
|
```bash
|
|
sf --mode mcp
|
|
```
|
|
|
|
Runs SF as a Model Context Protocol server over stdin/stdout, exposing all tools to external AI clients (Claude Desktop, VS Code Copilot, etc.).
|