Skip to content

CLI Reference

Complete reference for all jig commands.

Global flags

These flags can be used with any command.

FlagDescription
--verboseShow full stack traces on error
--jsonOutput as JSON (machine-readable)
--briefCompact one-line-per-item output
-V, --versionShow version
-h, --helpShow help

Table of contents


Getting Started

init

Initialize a .jig/ directory in the current project and register the MCP server with Claude Code.

Terminal window
jig init [options]
FlagDescription
-y, --yesSkip interactive prompts and use defaults
-n, --name <name>Project name (skips name prompt)
--no-hooksSkip git hook installation

Example:

Terminal window
cd my-project
jig init

bootstrap

Scan an existing codebase and generate a prompt for creating specs. The two-step flow outputs a prompt, you run it through an LLM, then apply the result with bootstrap apply.

Terminal window
jig bootstrap [options]
FlagDescription
--file <path>Write prompt to file instead of stdout

Examples:

Terminal window
# Output bootstrap prompt to stdout
jig bootstrap
# Write prompt to file
jig bootstrap --file bootstrap-prompt.md

bootstrap apply

Apply pre-generated specs from JSON input (produced by running the bootstrap prompt through an LLM).

Terminal window
jig bootstrap apply [options]
FlagDescription
--file <path>Read specs from file instead of stdin
--dry-runShow proposed changes without writing
--spec <name>Apply only this spec
--layer <layer>Apply only specs in this layer
--uncategorizedApply only uncategorized specs

Examples:

Terminal window
# Apply from file
jig bootstrap apply --file specs.json
# Preview without writing
jig bootstrap apply --file specs.json --dry-run

Specs

Manage feature specifications.

spec new

Create a new spec from template. Automatically suggests a parent spec if related specs exist.

Terminal window
jig spec new <name> [options]
FlagDescription
--layer <layer>Architectural layer: platform, services, or surface
--parent <parent>Parent spec name for sub-specs
--top-levelSkip placement suggestion and create as top-level spec

Examples:

Terminal window
jig spec new auth-layer --layer platform
jig spec new login-flow --parent auth-layer
jig spec new standalone-feature --top-level

spec list

List all specs with their status summary.

Terminal window
jig spec list

Example output:

[in-progress] auth-layer (3/5 tasks)
[new] login-flow (0/2 tasks)
[done] database-client (2/2 tasks)

spec show

Display a spec’s full markdown content and task summary.

Terminal window
jig spec show <name>

Example:

Terminal window
jig spec show auth-layer

spec update

Patch spec fields without touching content. Use flags to specify which fields to update.

Terminal window
jig spec update <name> [options]
FlagDescription
--layer <layer>Set architectural layer (platform, services, surface)
--stage <stage>Set spec stage
--parent <parent>Set parent spec name
--bundles <bundles>Set associated bundle names (comma-separated)

Examples:

Terminal window
jig spec update auth-layer --layer platform
jig spec update auth-layer --bundles "api-patterns,auth-config"
jig spec update login-flow --parent auth-layer --stage active

spec refresh

Recompute spec status from task completion. Run without a name to refresh all specs.

Terminal window
jig spec refresh [name]

Examples:

Terminal window
# Refresh a single spec
jig spec refresh auth-layer
# Refresh all specs
jig spec refresh

spec reparent

Change a spec’s position in the hierarchy. Move it under a different parent or make it top-level.

Terminal window
jig spec reparent <name> [options]
FlagDescription
--parent <parent>New parent spec name
--no-parentRemove parent (make top-level)

Examples:

Terminal window
# Move under a different parent
jig spec reparent login-flow --parent user-management
# Make top-level
jig spec reparent login-flow --no-parent

spec delete

Delete a spec and all its tasks. This is permanent.

Terminal window
jig spec delete <name>

Example:

Terminal window
jig spec delete old-feature

spec archive

Archive a spec. Archived specs are hidden from lists but preserved in the database.

Terminal window
jig spec archive <name>

Example:

Terminal window
jig spec archive completed-feature

Tasks

tasks

List all tasks for a spec.

Terminal window
jig tasks <spec>

Example:

Terminal window
jig tasks auth-layer

Example output:

[passed] setup-auth-client
[in-progress] implement-token-refresh
[new] add-session-middleware

task show

Display a task’s full details including objective, file scope, verification gates, and status. Providing only a task name searches all specs. Supports handles (e.g., kex-42).

Terminal window
jig task show <name>
jig task show <spec> <task>

Examples:

Terminal window
jig task show setup-auth-client
jig task show auth-layer setup-auth-client

task start

Mark a task as in-progress.

Terminal window
jig task start <name>
jig task start <spec> <task>

Example:

Terminal window
jig task start setup-auth-client

task done

Mark a task as passed. Runs verification gates first (unless skipped). Always provide --notes with a summary of what changed.

Terminal window
jig task done <name> [options]
jig task done <spec> <task> [options]
FlagDescription
--notes <text>Completion notes: what changed, decisions made, watch-outs
--skip-verifySkip running verification gates

Example:

Terminal window
jig task done setup-auth-client \
--notes "Changed: created src/auth/client.ts singleton. Decisions: used lazy init pattern. Watch: all Supabase access must go through this client."

task fail

Mark a task as failed. Always provide --notes with context on what went wrong.

Terminal window
jig task fail <name> [options]
jig task fail <spec> <task> [options]
FlagDescription
--notes <text>Failure notes: what went wrong, what was tried, suggested next steps

Example:

Terminal window
jig task fail implement-token-refresh \
--notes "Blocked by: Supabase refresh endpoint returns 403 in staging. Tried: manual token exchange, cookie fallback. Next: check Supabase project settings."

task cancel

Mark a task as canceled. Use when a task is no longer relevant.

Terminal window
jig task cancel <name> [options]
jig task cancel <spec> <task> [options]
FlagDescription
--notes <text>Why this task was canceled

Example:

Terminal window
jig task cancel old-migration-task \
--notes "Superseded by new schema design in database-v2 spec."

task blocked

Mark a task as blocked with a mandatory reason. Optionally file a bug for the blocker.

Terminal window
jig task blocked <name> [options]
jig task blocked <spec> <task> [options]
FlagDescription
--reason <text>Why the task is blocked (required)
--bug [text]Also file a bug finding for the blocker

Example:

Terminal window
jig task blocked setup-auth-client \
--reason "Waiting on Supabase project provisioning" \
--bug "Supabase project creation is stuck in pending state"

task add-guardrail

Add a guardrail to a task. Guardrails accumulate and are never replaced.

Terminal window
jig task add-guardrail <name> <guardrail>

Example:

Terminal window
jig task add-guardrail setup-auth-client "Must not store tokens in localStorage"

task create

Create a new task for a spec. Requires either --objective or --from-yaml.

Terminal window
jig task create <spec> <task> [options]
FlagDescription
--objective <text>Task objective (required unless --from-yaml)
--from-yaml <file>Load task fields from a YAML file
--intent <text>Task intent/context
--complexity <level>Complexity: trivial, simple, moderate, complex, epic
--file-scope <files>Comma-separated list of file paths
--dependencies <deps>Comma-separated list of dependency task names
--execution-pattern <pattern>Execution pattern: loop, plan_first, hybrid
--max-iterations <n>Max iterations for loop execution
--mode <mode>Execution mode: afk, hitl

Examples:

Terminal window
jig task create auth-layer setup-auth-client \
--objective "Create the Supabase auth client singleton" \
--complexity simple \
--file-scope "src/auth/client.ts,src/auth/index.ts"
jig task create auth-layer full-auth-setup --from-yaml auth-task.yaml

task update

Update one or more fields on an existing task.

Terminal window
jig task update <spec> <task> [options]
FlagDescription
--status <status>Set status: pending, in-progress, passed, failed, canceled, blocked
--notes <text>Completion or status notes
--objective <text>Update objective
--intent <text>Update intent
--complexity <level>Update complexity
--file-scope <files>Set file scope (comma-separated)
--dependencies <deps>Set dependencies (comma-separated)
--add-guardrail <text>Add a guardrail
--execution-pattern <pattern>Set execution pattern
--max-iterations <n>Set max iterations
--mode <mode>Set mode: afk, hitl

Example:

Terminal window
jig task update auth-layer setup-auth-client \
--complexity moderate \
--file-scope "src/auth/client.ts,src/auth/index.ts,src/auth/types.ts"

task delete

Delete a task permanently.

Terminal window
jig task delete <spec> <task>

Example:

Terminal window
jig task delete auth-layer obsolete-task

task move

Move a task from one spec to another.

Terminal window
jig task move <spec> <task> --to <target-spec>
FlagDescription
--to <target-spec>Target spec name (required)

Example:

Terminal window
jig task move auth-layer setup-oauth --to user-management

next

Show the next tasks that are ready to execute, ordered by priority. Supports parallel-safe selection for dispatching multiple agents.

Terminal window
jig next [options]
FlagDescription
-n, --count <n>Number of tasks to show (default: 10)
-a, --allShow all ready tasks
-p, --parallel <count>Return N conflict-free tasks safe to run in parallel

Examples:

Terminal window
jig next
jig next --count 5
jig next --parallel 3

Example output:

Ready tasks (3):
[new] setup-auth-client (auth-layer)
Create the Supabase auth client singleton
[new] create-spec-table (database-client)
Add specs table migration

decompose

Decompose a spec into implementation tasks using AI. Analyzes the spec’s intent, acceptance criteria, and available context bundles, then proposes a task breakdown for review.

Terminal window
jig decompose <spec> [options]
FlagDescription
-y, --yesSkip confirmation prompts

Example:

Terminal window
jig decompose auth-layer

Execution & Navigation

run

Execute a task by generating a full Claude Code prompt and piping it to claude.

Terminal window
jig run <spec> <task> [options]
FlagDescription
--forceSkip dependency check

Example:

Terminal window
jig run auth-layer setup-auth-client

commit

Git commit with automatic task marking. Any [spec/task] references in the commit message are parsed and those tasks are marked as passed.

Terminal window
jig commit -m <message> [options]
FlagDescription
-m, --message <message>Commit message (required)
--skip-verifyPass --no-verify to git commit

Example:

Terminal window
jig commit -m "feat: add auth client singleton [auth-layer/setup-auth-client]"

This runs git commit first, then parses [auth-layer/setup-auth-client] from the message and marks that task as passed with auto-generated completion notes.


verify

Run the verification commands for a task without executing the task itself.

Terminal window
jig verify <spec> <task>

Example:

Terminal window
jig verify auth-layer setup-auth-client

runs

List execution runs for a spec.

Terminal window
jig runs <spec>

Example:

Terminal window
jig runs auth-layer

status

Show a project status overview with all specs and their task completion. Pass a spec name to see individual task progress.

Terminal window
jig status [spec]

Examples:

Terminal window
# Project overview
jig status
# Spec detail
jig status auth-layer

Example output:

[in-progress] auth-layer (3/5 tasks passed)
[new] dashboard-ui (0/4 tasks passed)
[done] database-client (2/2 tasks passed)

Search across specs, tasks, and findings.

Terminal window
jig search <query> [options]
FlagDescription
--specs-onlySearch specs only
--tasks-onlySearch tasks only
--findings-onlySearch findings only

Examples:

Terminal window
jig search "authentication"
jig search "login" --tasks-only

tree

Show a hierarchical view of specs and their tasks. Optionally scope to a single spec.

Terminal window
jig tree [spec]

Examples:

Terminal window
# Full project tree
jig tree
# Single spec tree
jig tree auth-layer

history

Show a chronological timeline of events for a task: context log entries, criteria changes, test runs, and status changes.

Terminal window
jig history <task> [options]
FlagDescription
--type <type>Filter by type: context-log, criteria-change, test-run, status-change, all

Examples:

Terminal window
jig history setup-auth-client
jig history setup-auth-client --type test-run

Bundles

Manage reusable context bundles that provide shared context (files, constraints, patterns) to tasks.

bundle create

Create a new context bundle.

Terminal window
jig bundle create <name> [options]
FlagDescription
--sharedMake this bundle shared across projects
--description <text>Bundle description

Example:

Terminal window
jig bundle create api-client-patterns --description "REST API patterns and conventions"

bundle list

List all context bundles.

Terminal window
jig bundle list [options]
FlagDescription
--sharedInclude shared bundles from other projects
--project-onlyShow only project bundles (exclude shared)
--shared-onlyShow only shared bundles

Example:

Terminal window
jig bundle list --shared

bundle show

Display a bundle’s full content including files, constraints, and patterns.

Terminal window
jig bundle show <name>

Example:

Terminal window
jig bundle show api-client-patterns

bundle update

Update bundle fields.

Terminal window
jig bundle update <name> [options]
FlagDescription
--description <text>New description
--sharedMake bundle shared across projects
--no-sharedMake bundle project-only
--files <json>Set files (JSON array)
--constraints <json>Set constraints (JSON array)
--patterns <json>Set patterns (JSON array)

Example:

Terminal window
jig bundle update api-client-patterns \
--constraints '["Always use fetch, never axios", "Include retry logic"]'

bundle delete

Delete a bundle.

Terminal window
jig bundle delete <name>

Example:

Terminal window
jig bundle delete old-patterns

context (alias)

The context command is an alias for bundle. All subcommands are identical:

Terminal window
jig context create <name>
jig context list
jig context show <name>
jig context update <name>
jig context delete <name>

Snippets

Manage reusable text snippets that can be attached to tasks or shared across projects.

snippet new

Create a new snippet.

Terminal window
jig snippet new <name> [options]
FlagDescription
--content <text>Inline snippet content
--sharedMake this snippet shared across projects

Example:

Terminal window
jig snippet new error-handling --content "Always wrap async calls in try/catch with structured error logging"

snippet list

List snippets.

Terminal window
jig snippet list [options]
FlagDescription
--sharedInclude shared snippets from other projects
--project-onlyShow only project snippets (exclude shared)
--shared-onlyShow only shared snippets

Example:

Terminal window
jig snippet list --shared

snippet show

Display snippet content.

Terminal window
jig snippet show <name>

Example:

Terminal window
jig snippet show error-handling

snippet delete

Delete a snippet.

Terminal window
jig snippet delete <name>

Example:

Terminal window
jig snippet delete old-snippet

Criteria

Manage structured acceptance criteria on tasks. Criteria are mechanically verifiable and can be tested with jig test.

criteria add

Add a structured acceptance criterion to a task.

Terminal window
jig criteria add <task> [options]
FlagDescription
--subject <subject>What to check: file path, URL, command, etc. (required)
--property <property>Property to evaluate: contains_string, file_exists, http_status, etc. (required)
--expected <expected>Expected value or pattern (required)
--description <description>Human-readable description (required)

Example:

Terminal window
jig criteria add setup-auth-client \
--subject "src/auth/client.ts" \
--property file_exists \
--expected "true" \
--description "Auth client module exists"

criteria list

List all current criteria for a task.

Terminal window
jig criteria list <task>

Example:

Terminal window
jig criteria list setup-auth-client

criteria remove

Remove a criterion by ID (soft-delete).

Terminal window
jig criteria remove <task> <criterion-id>

Example:

Terminal window
jig criteria remove setup-auth-client crit-abc123

Intake

bug

File a bug finding into the intake pile. AI triage runs in the background to match it to a spec.

Terminal window
jig bug "<message>"

Example:

Terminal window
jig bug "Login button does nothing when clicked on mobile Safari"

idea

File an idea finding into the intake pile.

Terminal window
jig idea "<message>"

Example:

Terminal window
jig idea "Let users pin specs to the top of the list for quick access"

findings

List active findings from the intake pile.

Terminal window
jig findings [options]
FlagDescription
--bugsShow only bugs
--ideasShow only ideas
--type <type>Filter by type: bug or idea
--status <status>Filter by status: new, triaged, dismissed

Examples:

Terminal window
jig findings
jig findings --bugs
jig findings --status triaged

dismiss

Dismiss a finding by ID. Dismissed findings are hidden but not deleted.

Terminal window
jig dismiss <id>

Example:

Terminal window
jig dismiss bug-3a9f

Requests

Manage requests for tracking user intent from conversation through resolution. Requests link to specs, tasks, and findings, and produce learnings when resolved.

request create

Create a new request.

Terminal window
jig request create <title> [options]
FlagDescription
--description <text>Request description
--origin <origin>Origin: conversation, bug, idea, user-report, internal
--priority <priority>Priority: critical, high, normal, low

Example:

Terminal window
jig request create "Add dark mode support" \
--description "Users are requesting dark mode for the dashboard" \
--origin user-report \
--priority normal

request list

List requests with optional filters.

Terminal window
jig request list [options]
FlagDescription
--status <status>Filter by status: open, in-progress, resolved, abandoned, deferred
--priority <priority>Filter by priority: critical, high, normal, low

Example:

Terminal window
jig request list --status open --priority high

request show

Show request details and all linked work (tasks, findings, specs).

Terminal window
jig request show <id>

Example:

Terminal window
jig request show req-abc123

Link a task, finding, or spec to a request.

Terminal window
jig request link <request-id> [options]
FlagDescription
--task <spec/task>Link a task (spec/task format)
--finding <id>Link a finding
--spec <name>Link a spec

Example:

Terminal window
jig request link req-abc123 --task "auth-layer/setup-auth-client"
jig request link req-abc123 --spec dashboard-ui

request resolve

Resolve a request with an outcome and learning.

Terminal window
jig request resolve <id> [options]
FlagDescription
--outcome <outcome>Outcome: resolved, partial, deferred, wont-fix, cant-reproduce
--learning <text>What was learned (required)
--notes <text>Additional notes

Example:

Terminal window
jig request resolve req-abc123 \
--outcome resolved \
--learning "Dark mode requires CSS custom properties migration before it can be implemented cleanly"

Search requests by title or description.

Terminal window
jig request search <query>

Example:

Terminal window
jig request search "dark mode"

request defer

Defer a request for later.

Terminal window
jig request defer <id> [options]
FlagDescription
--reason <text>Reason for deferring

Example:

Terminal window
jig request defer req-abc123 --reason "Waiting on design system v2 for proper theming support"

learnings

List learnings extracted from resolved requests.

Terminal window
jig learnings [options]
FlagDescription
--search <query>Filter learnings by keyword

Examples:

Terminal window
jig learnings
jig learnings --search "authentication"

Cloud

login

Authenticate with Jig via GitHub or Google OAuth.

Terminal window
jig login [options]
FlagDescription
--token <token>Paste an API token directly (for headless or SSH environments)
--provider <provider>OAuth provider: github (default) or google

Examples:

Terminal window
jig login
# Opens browser for GitHub OAuth
jig login --token jig_tok_abc123
# Headless environments
jig login --provider google

logout

Clear saved credentials from the local machine.

Terminal window
jig logout

whoami

Show the currently authenticated user.

Terminal window
jig whoami

Example output:

Logged in as: alice@example.com

projects

Manage projects registered with Jig.

projects add

Register a project directory. Defaults to the current directory.

Terminal window
jig projects add [path]

Examples:

Terminal window
jig projects add
jig projects add /Users/alice/projects/my-app

projects list

List all registered projects.

Terminal window
jig projects list

Example output:

my-app /Users/alice/projects/my-app 4 specs
api-server /Users/alice/projects/api 2 specs

projects remove

Unregister a project. Does not delete any files.

Terminal window
jig projects remove <name>

Example:

Terminal window
jig projects remove my-app

projects delete

Permanently delete a cloud project and all its data.

Terminal window
jig projects delete <name> [options]
FlagDescription
-y, --yesSkip confirmation prompt

Example:

Terminal window
jig projects delete old-project --yes

projects switch

Switch this directory to a different cloud project.

Terminal window
jig projects switch <name>

Example:

Terminal window
jig projects switch my-other-project

Servers

serve

Start the API server for the web UI.

Terminal window
jig serve [options]
FlagDescription
-p, --port <port>Port to listen on (default: 3847)

serve mcp

Start the MCP server on stdio transport for use with Claude Code or other MCP clients.

Terminal window
jig serve mcp

Environments

env list

Show configured environments with their current status.

Terminal window
jig env list

env check

Ping health endpoints for each configured environment.

Terminal window
jig env check

deploy

Deploy to staging or production environment.

Terminal window
jig deploy [options]
FlagDescription
--stagingDeploy to staging environment
--productionDeploy to production environment

Examples:

Terminal window
jig deploy --staging
jig deploy --production

promote

Promote from staging to production. Runs the full pipeline: verify staging, deploy to production, run production tests.

Terminal window
jig promote

Reference

guide

Show the Jig workflow guide with the full SAP format reference and examples.

Terminal window
jig guide