feat: add /review skill, /test skill, chokidar file watcher, subcommand help
- Add /review skill: reviews staged/unstaged/commit changes for security,
performance, bugs, and quality with structured findings by severity
- Add /test skill: auto-detects test framework, generates comprehensive
tests for source files, or runs suites with failure analysis
- Add chokidar file watcher: watches ~/.gsd/agent/ for config changes
(settings.json, auth.json, models.json, extensions/) with debounced
events on an EventBus
- Add --help per subcommand: `gsd config --help` and `gsd update --help`
show subcommand-specific usage information
- 8 new file-watcher tests (start/stop, event emission, debouncing,
unrelated file filtering)
2026-03-16 13:47:25 -05:00
|
|
|
const SUBCOMMAND_HELP: Record<string, string> = {
|
|
|
|
|
config: [
|
|
|
|
|
'Usage: gsd config',
|
|
|
|
|
'',
|
|
|
|
|
'Re-run the interactive setup wizard to configure:',
|
|
|
|
|
' - LLM provider (Anthropic, OpenAI, Google, etc.)',
|
|
|
|
|
' - Web search provider (Brave, Tavily, built-in)',
|
|
|
|
|
' - Remote questions (Discord, Slack, Telegram)',
|
|
|
|
|
' - Tool API keys (Context7, Jina, Groq)',
|
|
|
|
|
'',
|
|
|
|
|
'All steps are skippable and can be changed later with /login or /search-provider.',
|
|
|
|
|
].join('\n'),
|
|
|
|
|
|
|
|
|
|
update: [
|
|
|
|
|
'Usage: gsd update',
|
|
|
|
|
'',
|
|
|
|
|
'Update GSD to the latest version.',
|
|
|
|
|
'',
|
|
|
|
|
'Equivalent to: npm install -g gsd-pi@latest',
|
|
|
|
|
].join('\n'),
|
2026-03-16 15:27:10 -06:00
|
|
|
|
|
|
|
|
sessions: [
|
|
|
|
|
'Usage: gsd sessions',
|
|
|
|
|
'',
|
|
|
|
|
'List all saved sessions for the current directory and interactively',
|
|
|
|
|
'pick one to resume. Shows date, message count, and a preview of the',
|
|
|
|
|
'first message for each session.',
|
|
|
|
|
'',
|
|
|
|
|
'Sessions are stored per-directory, so you only see sessions that were',
|
|
|
|
|
'started from the current working directory.',
|
|
|
|
|
'',
|
|
|
|
|
'Compare with --continue (-c) which always resumes the most recent session.',
|
|
|
|
|
].join('\n'),
|
feat: add `gsd headless` CLI subcommand for non-interactive auto-mode
Adds a first-class `gsd headless` command that runs auto-mode without a
TUI by spawning a child process in RPC mode via RpcClient. Useful for
CI/CD pipelines, scripts, and unattended execution.
CLI interface:
gsd headless - Run auto-mode until complete
gsd headless --step - Run one unit only (sends /gsd next)
gsd headless --timeout 300000 - Custom timeout (default 5 min)
gsd headless --json - Forward RPC events as JSONL to stdout
gsd headless --verbose - Show full agent text and tool results
gsd headless --model <id> - Override model
Exit codes: 0 = complete, 1 = error/timeout, 2 = blocked
Features:
- Extension UI auto-responder (handles select, confirm, input, editor,
notify, setStatus, setWidget, setTitle, set_editor_text)
- Completion detection via terminal notification keywords + idle timeout
- Human-readable progress output to stderr
- SIGINT/SIGTERM forwarding for clean shutdown
- Child process crash detection
- Completion summary with diagnostics on failure
2026-03-16 16:18:25 -03:00
|
|
|
|
|
|
|
|
headless: [
|
|
|
|
|
'Usage: gsd headless [flags] [command] [args...]',
|
|
|
|
|
'',
|
|
|
|
|
'Run /gsd commands without the TUI. Default command: auto',
|
|
|
|
|
'',
|
2026-03-16 19:46:56 -03:00
|
|
|
'Flags:',
|
feat: add headless new-milestone command for programmatic milestone creation (#781)
Enables fully headless project creation from specification documents via
`gsd headless new-milestone --context spec.md`. Supports file input,
stdin piping, inline text, and optional auto-mode chaining with --auto.
Key changes:
- headless.ts: new CLI flags (--context, --context-text, --auto, --verbose),
context loading (file/stdin/inline), .gsd/ bootstrapping, auto-mode chaining
- commands.ts: /gsd new-milestone command routing via headless context temp file
- guided-flow.ts: showHeadlessMilestoneCreation(), bootstrapGsdProject(),
buildHeadlessDiscussPrompt() for non-interactive milestone creation
- prompts/discuss-headless.md: headless variant of discuss.md that skips Q&A
rounds and works entirely from the provided specification
- help-text.ts: documentation for new-milestone subcommand and flags
Closes #765
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:28:56 -06:00
|
|
|
' --timeout N Overall timeout in ms (default: 300000)',
|
|
|
|
|
' --json JSONL event stream to stdout',
|
|
|
|
|
' --model ID Override model',
|
2026-03-17 14:08:15 -03:00
|
|
|
' --supervised Forward interactive UI requests to orchestrator via stdout/stdin',
|
|
|
|
|
' --response-timeout N Timeout (ms) for orchestrator response (default: 30000)',
|
feat: add headless new-milestone command for programmatic milestone creation (#781)
Enables fully headless project creation from specification documents via
`gsd headless new-milestone --context spec.md`. Supports file input,
stdin piping, inline text, and optional auto-mode chaining with --auto.
Key changes:
- headless.ts: new CLI flags (--context, --context-text, --auto, --verbose),
context loading (file/stdin/inline), .gsd/ bootstrapping, auto-mode chaining
- commands.ts: /gsd new-milestone command routing via headless context temp file
- guided-flow.ts: showHeadlessMilestoneCreation(), bootstrapGsdProject(),
buildHeadlessDiscussPrompt() for non-interactive milestone creation
- prompts/discuss-headless.md: headless variant of discuss.md that skips Q&A
rounds and works entirely from the provided specification
- help-text.ts: documentation for new-milestone subcommand and flags
Closes #765
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:28:56 -06:00
|
|
|
'',
|
|
|
|
|
'Commands:',
|
|
|
|
|
' auto Run all queued units continuously (default)',
|
|
|
|
|
' next Run one unit',
|
|
|
|
|
' status Show progress dashboard',
|
|
|
|
|
' new-milestone Create a milestone from a specification document',
|
|
|
|
|
'',
|
|
|
|
|
'new-milestone flags:',
|
|
|
|
|
' --context <path> Path to spec/PRD file (use \'-\' for stdin)',
|
|
|
|
|
' --context-text <txt> Inline specification text',
|
|
|
|
|
' --auto Start auto-mode after milestone creation',
|
|
|
|
|
' --verbose Show tool calls in progress output',
|
feat: add `gsd headless` CLI subcommand for non-interactive auto-mode
Adds a first-class `gsd headless` command that runs auto-mode without a
TUI by spawning a child process in RPC mode via RpcClient. Useful for
CI/CD pipelines, scripts, and unattended execution.
CLI interface:
gsd headless - Run auto-mode until complete
gsd headless --step - Run one unit only (sends /gsd next)
gsd headless --timeout 300000 - Custom timeout (default 5 min)
gsd headless --json - Forward RPC events as JSONL to stdout
gsd headless --verbose - Show full agent text and tool results
gsd headless --model <id> - Override model
Exit codes: 0 = complete, 1 = error/timeout, 2 = blocked
Features:
- Extension UI auto-responder (handles select, confirm, input, editor,
notify, setStatus, setWidget, setTitle, set_editor_text)
- Completion detection via terminal notification keywords + idle timeout
- Human-readable progress output to stderr
- SIGINT/SIGTERM forwarding for clean shutdown
- Child process crash detection
- Completion summary with diagnostics on failure
2026-03-16 16:18:25 -03:00
|
|
|
'',
|
2026-03-16 19:46:56 -03:00
|
|
|
'Examples:',
|
feat: add headless new-milestone command for programmatic milestone creation (#781)
Enables fully headless project creation from specification documents via
`gsd headless new-milestone --context spec.md`. Supports file input,
stdin piping, inline text, and optional auto-mode chaining with --auto.
Key changes:
- headless.ts: new CLI flags (--context, --context-text, --auto, --verbose),
context loading (file/stdin/inline), .gsd/ bootstrapping, auto-mode chaining
- commands.ts: /gsd new-milestone command routing via headless context temp file
- guided-flow.ts: showHeadlessMilestoneCreation(), bootstrapGsdProject(),
buildHeadlessDiscussPrompt() for non-interactive milestone creation
- prompts/discuss-headless.md: headless variant of discuss.md that skips Q&A
rounds and works entirely from the provided specification
- help-text.ts: documentation for new-milestone subcommand and flags
Closes #765
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:28:56 -06:00
|
|
|
' gsd headless Run /gsd auto',
|
|
|
|
|
' gsd headless next Run one unit',
|
|
|
|
|
' gsd headless --json status Machine-readable status',
|
|
|
|
|
' gsd headless --timeout 60000 With 1-minute timeout',
|
|
|
|
|
' gsd headless new-milestone --context spec.md Create milestone from file',
|
|
|
|
|
' cat spec.md | gsd headless new-milestone --context - From stdin',
|
|
|
|
|
' gsd headless new-milestone --context spec.md --auto Create + auto-execute',
|
2026-03-17 14:08:15 -03:00
|
|
|
' gsd headless --supervised auto Supervised orchestrator mode',
|
feat: add `gsd headless` CLI subcommand for non-interactive auto-mode
Adds a first-class `gsd headless` command that runs auto-mode without a
TUI by spawning a child process in RPC mode via RpcClient. Useful for
CI/CD pipelines, scripts, and unattended execution.
CLI interface:
gsd headless - Run auto-mode until complete
gsd headless --step - Run one unit only (sends /gsd next)
gsd headless --timeout 300000 - Custom timeout (default 5 min)
gsd headless --json - Forward RPC events as JSONL to stdout
gsd headless --verbose - Show full agent text and tool results
gsd headless --model <id> - Override model
Exit codes: 0 = complete, 1 = error/timeout, 2 = blocked
Features:
- Extension UI auto-responder (handles select, confirm, input, editor,
notify, setStatus, setWidget, setTitle, set_editor_text)
- Completion detection via terminal notification keywords + idle timeout
- Human-readable progress output to stderr
- SIGINT/SIGTERM forwarding for clean shutdown
- Child process crash detection
- Completion summary with diagnostics on failure
2026-03-16 16:18:25 -03:00
|
|
|
'',
|
|
|
|
|
'Exit codes: 0 = complete, 1 = error/timeout, 2 = blocked',
|
|
|
|
|
].join('\n'),
|
feat: add /review skill, /test skill, chokidar file watcher, subcommand help
- Add /review skill: reviews staged/unstaged/commit changes for security,
performance, bugs, and quality with structured findings by severity
- Add /test skill: auto-detects test framework, generates comprehensive
tests for source files, or runs suites with failure analysis
- Add chokidar file watcher: watches ~/.gsd/agent/ for config changes
(settings.json, auth.json, models.json, extensions/) with debounced
events on an EventBus
- Add --help per subcommand: `gsd config --help` and `gsd update --help`
show subcommand-specific usage information
- 8 new file-watcher tests (start/stop, event emission, debouncing,
unrelated file filtering)
2026-03-16 13:47:25 -05:00
|
|
|
}
|
|
|
|
|
|
2026-03-16 13:29:31 -05:00
|
|
|
export function printHelp(version: string): void {
|
|
|
|
|
process.stdout.write(`GSD v${version} — Get Shit Done\n\n`)
|
|
|
|
|
process.stdout.write('Usage: gsd [options] [message...]\n\n')
|
|
|
|
|
process.stdout.write('Options:\n')
|
feat: add MCP server mode, /lint skill, E2E smoke tests
- Add native MCP server mode (--mode mcp): exposes GSD's tools via
Model Context Protocol over stdin/stdout for Claude Desktop, VS Code,
and other MCP-compatible clients. Uses @modelcontextprotocol/sdk.
- Add /lint skill: auto-detects ESLint, Biome, Prettier, rustfmt,
gofmt, Black, Ruff and runs with structured output
- Add 6 E2E smoke tests: --version, --help, config --help, update
--help, --list-models, and --mode text --print startup
- Fix diff-context.ts stdio type for CI compatibility
- Fix token-counter.ts tiktoken import for extensions typecheck
- Update help text and CLI to include --mode mcp
2026-03-16 13:56:31 -05:00
|
|
|
process.stdout.write(' --mode <text|json|rpc|mcp> Output mode (default: interactive)\n')
|
2026-03-16 13:29:31 -05:00
|
|
|
process.stdout.write(' --print, -p Single-shot print mode\n')
|
|
|
|
|
process.stdout.write(' --continue, -c Resume the most recent session\n')
|
|
|
|
|
process.stdout.write(' --model <id> Override model (e.g. claude-opus-4-6)\n')
|
|
|
|
|
process.stdout.write(' --no-session Disable session persistence\n')
|
|
|
|
|
process.stdout.write(' --extension <path> Load additional extension\n')
|
|
|
|
|
process.stdout.write(' --tools <a,b,c> Restrict available tools\n')
|
|
|
|
|
process.stdout.write(' --list-models [search] List available models and exit\n')
|
|
|
|
|
process.stdout.write(' --version, -v Print version and exit\n')
|
|
|
|
|
process.stdout.write(' --help, -h Print this help and exit\n')
|
|
|
|
|
process.stdout.write('\nSubcommands:\n')
|
|
|
|
|
process.stdout.write(' config Re-run the setup wizard\n')
|
|
|
|
|
process.stdout.write(' update Update GSD to the latest version\n')
|
2026-03-16 15:27:10 -06:00
|
|
|
process.stdout.write(' sessions List and resume a past session\n')
|
feat: add `gsd headless` CLI subcommand for non-interactive auto-mode
Adds a first-class `gsd headless` command that runs auto-mode without a
TUI by spawning a child process in RPC mode via RpcClient. Useful for
CI/CD pipelines, scripts, and unattended execution.
CLI interface:
gsd headless - Run auto-mode until complete
gsd headless --step - Run one unit only (sends /gsd next)
gsd headless --timeout 300000 - Custom timeout (default 5 min)
gsd headless --json - Forward RPC events as JSONL to stdout
gsd headless --verbose - Show full agent text and tool results
gsd headless --model <id> - Override model
Exit codes: 0 = complete, 1 = error/timeout, 2 = blocked
Features:
- Extension UI auto-responder (handles select, confirm, input, editor,
notify, setStatus, setWidget, setTitle, set_editor_text)
- Completion detection via terminal notification keywords + idle timeout
- Human-readable progress output to stderr
- SIGINT/SIGTERM forwarding for clean shutdown
- Child process crash detection
- Completion summary with diagnostics on failure
2026-03-16 16:18:25 -03:00
|
|
|
process.stdout.write(' headless [cmd] [args] Run /gsd commands without TUI (default: auto)\n')
|
feat: add /review skill, /test skill, chokidar file watcher, subcommand help
- Add /review skill: reviews staged/unstaged/commit changes for security,
performance, bugs, and quality with structured findings by severity
- Add /test skill: auto-detects test framework, generates comprehensive
tests for source files, or runs suites with failure analysis
- Add chokidar file watcher: watches ~/.gsd/agent/ for config changes
(settings.json, auth.json, models.json, extensions/) with debounced
events on an EventBus
- Add --help per subcommand: `gsd config --help` and `gsd update --help`
show subcommand-specific usage information
- 8 new file-watcher tests (start/stop, event emission, debouncing,
unrelated file filtering)
2026-03-16 13:47:25 -05:00
|
|
|
process.stdout.write('\nRun gsd <subcommand> --help for subcommand-specific help.\n')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function printSubcommandHelp(subcommand: string, version: string): boolean {
|
|
|
|
|
const help = SUBCOMMAND_HELP[subcommand]
|
|
|
|
|
if (!help) return false
|
|
|
|
|
process.stdout.write(`GSD v${version} — Get Shit Done\n\n`)
|
|
|
|
|
process.stdout.write(help + '\n')
|
|
|
|
|
return true
|
2026-03-16 13:29:31 -05:00
|
|
|
}
|