SpecRunnerDocs
ドキュメントCLIリファレンス
REFERENCE

CLIリファレンス

必須引数、任意引数、主要flag、機械出力をコマンド定義と同じ粒度で確認できます。

このページの内容

構文の読み方

job操作はmain checkoutを基準にします。runjob startjob lsjob showjob resumejob archivejob prunejob statsはSpecRunnerのjob worktreeでは実行しません。詳しくは実行・運用を参照してください。

<slug>必須値を1つ指定
[--json]任意必要な場合だけ追加
[options]任意flag群下の表で確認

すべてのコマンドで--helpまたは-hを使用できます。

Request commands

npx specrunner request new <slug> [--type <type>]雛形からrequest.mdを作成
npx specrunner request generate [<text>] [--stdin]LLMでrequest.mdを生成
npx specrunner request lsactive requestを一覧
npx specrunner request validate <file|slug>構文と規律を検証
npx specrunner request template [--type <type>]雛形を標準出力

Job commands

npx specrunner run <slug|file> [options]Pipelineを開始(job start alias)
npx specrunner job start <slug|file> [options]Pipelineを開始
npx specrunner job ls [filters] [--json]jobを運用カテゴリ付きで一覧
npx specrunner job show <jobId|slug>job stateの詳細
npx specrunner job resume <slug> [options]停止したjobを再開
npx specrunner job cancel [jobId] [options]jobをcancelしてcleanup
npx specrunner job archive <slug> [options]merge・change folder・worktreeを整理
npx specrunner job prune [--force]orphan worktreeを確認・削除
npx specrunner job stats [--json]cost・収束回数・時間を集計

job showjob statsによる見積もりはコスト目安と計測、証跡の読み方は監査と証跡を参照してください。

Environment commands

npx specrunner init [--runtime <r>] [--provider <p>]config scaffoldを作成
npx specrunner login [--provider <p>] [--force]GitHubまたはClaudeのcredentialを保存
npx specrunner doctor [--json]環境・設定・認証を診断
npx specrunner config effective [--type <t>] [--json]effective configと取得元を表示
npx specrunner runtime setupmanaged runtimeをセットアップ
npx specrunner runtime statusmanaged runtimeの状態を表示
npx specrunner runtime reset [--force]managed runtime設定をリセット

Inbox & extension commands

npx specrunner inbox run [options]Issue連携を1回reconcile
npx specrunner rules new <step> <slug>rules fileを生成
npx specrunner reviewers new <name>custom reviewerを生成
npx specrunner usage [slug]usage統計を集計

生成後の編集項目と有効化条件はRulesとCustom reviewersを参照してください。

主要オプション

副作用や出力形式を変えるflagをまとめています。--prompt--prompt-fileは同時に指定できません。

commandflagspurpose
run / job start--json, --verbose, --quiet, --no-worktree, --issue <number>開始結果、表示量、worktree、起点Issueを指定
request new / template--type <requestType>省略時はnew-feature
request generate--stdin本文を標準入力から読む
job ls--active, --all, --status <status>, --json表示対象を絞り込む
job resume--from <step>, --force, --prompt <text>, --prompt-file <file>, --json, --no-worktree, --verbose, --quiet再開点と追加指示を指定
job cancel--force, --purge, --all-terminated, --yes, --restore-draft対象、確認、state削除、draft復元を制御
job archive--with-merge, --merge-wait-ms <ms>checks待ち・merge・待機時間を制御
config effective--type <requestType>, --jsonrequest type別の解決結果とsource metadata
inbox run--dry-run, --limit <n>, --json, --verbose, --quietIssue連携の1回分を確認・制限
init--provider anthropic|openai初回scaffoldのproviderを選択。--runtimeはdeprecatedで指定時error
login--provider github|claude, --force保存するcredential種別を選択

--fromはrequest-review、design、spec-review、spec-fixer、test-case-gen、implementer、verification、build-fixer、code-review、code-fixer、conformance、adr-gen、pr-createを受け付けます。

--forceが越える境界はcommandごとに違う

command越える確認越えない確認
job resume --force記録済みstepの直近3 outcomeがescalation / errorのguard生存中process、status遷移、journal・worktree・request読込error
job prune --forcedry-runからorphan削除へ切り替える未commitまたは未push変更があるworktreeはskip
runtime reset --force確認promptを省き、managed以外のstale設定もresetconfig・filesystem操作自体のerror
--forceは汎用的な成功flagではありません

越えるguardを上表で特定し、原因を変更した後だけ使用します。

job resumeの再開点解決、stale判定、promptの扱いは再開と状態照合を参照してください。

JSON出力を持つコマンド

run / job start --json終了結果contract(pr-created / awaiting-human / failed)
job resume --json再開後の終了結果contract
job ls --jsonjob一覧と運用カテゴリ
job stats --jsoncost・収束回数・所要時間の集計値
doctor --jsoncheckごとのstatus・message・hint
config effective --json値、設定レイヤ、fallback source
inbox run --json開始・再開・skipの処理結果

scriptやCIでは表示文言をparseせず、--jsonのstable fieldを使用します。

実行中のversionで最終確認する

このサイトは検証コミットに固定されています。インストール済みversionとの差が疑われる場合は、そのCLI自身のhelpを正とします。

terminal
npx specrunner --help
npx specrunner job archive --help
npx specrunner config effective --help
参照ソース 4