CLI Command Reference
Authoritative, 20-command surface reference for @fuzit/cli.
The Fuzit CLI provides a local-first, deterministic command surface for repository intelligence, graph analysis, packing, context selection, Git history, local cache lifecycle, and GitHub review workflows.
Global Syntax & Flags
Global flags can be passed to any top-level command:
# Version & Help
fuzit -V
fuzit --version
fuzit -h
fuzit --help
# Global Output Modes
fuzit --json <command>
fuzit --quiet <command>
fuzit --debug <command>
# NOTE: --quiet and --debug cannot be combined.1. Config (fuzit config)
Inspect local Fuzit configuration settings and diagnostic thresholds.
fuzit config show
fuzit config show --output-format json
fuzit config show --max-files 500 --diagnostic-level debug2. Doctor (fuzit doctor)
Perform a system readiness check for Node.js, Git, filesystem access, parsers, and local index compatibility.
fuzit doctor
fuzit --json doctorFuzit doctor
PASS node: Node.js is available.
WARN pnpm: pnpm metadata is unavailable in this process.
PASS platform: Platform metadata is available.
PASS git: Git is available.
PASS filesystem: Working directory is readable and writable.
PASS parser: Built-in parser compatibility is available.
PASS index: Local index compatibility is available.
WARN daemon: No daemon is required for local CLI operation.
WARN mcp: MCP server is not installed in this environment.
WARN extension: VS Code extension is not installed in this environment.
PASS repository: Repository detected.
PASS configuration: Configuration is valid.3. Init (fuzit init)
Initialize Fuzit configuration for the repository root.
fuzit init
fuzit init --dry-run
fuzit init --force
fuzit init --dry-run --force4. Scan (fuzit scan)
Discover repository roots, inspect metadata, list paths, or query path inclusion explanation (mode-based execution).
# Default Human Scan (resolves to summary mode)
fuzit scan --root .
# Explicit Summary Mode
fuzit scan --root . --summary
fuzit --json scan --root . --summary
# List roots explicitly
fuzit scan --root . --list-roots
# Discovered Paths & Metadata
fuzit scan --root . --paths
fuzit scan --root . --metadata
fuzit scan --root . --items
fuzit scan --root . --content
# Path Inclusion Explanation
fuzit scan --root . --explain-path README.md
# Filtered Scans
fuzit scan --root . --paths --include "src/**" --exclude "docs/**"Note
--root missing-folder or --root file.txt) will explicitly return SCAN.INVALID_ROOT (Exit code: 2). Providing conflicting scan modes will return SCAN.MODE_CONFLICT (Exit code: 2) instead of silently choosing one.5. Pack (fuzit pack & fuzit)
Pack repository source into structured context bundles. Supports zero-argument dual packing (Markdown & LLM-optimized XML with explicit <file path="..."> tags), PR URL state packing, unlimited and custom file-size limits (--max-file-bytes), smart content scope selectors, repository token/file distribution stats, repomix alias, full dumps, target model auto-tuning, task intent filtering, and language compression.
# Zero-Argument Dual Packing (packs into fuzit-pack.md & fuzit-pack.xml)
fuzit
# PR State Packing (packs full PR preamble + optional --full repo state at PR head revision)
fuzit pack https://github.com/owner/repo/pull/123
fuzit pack owner/repo#123 --full --output pr-bundle.md
fuzit pr pack https://github.com/owner/repo/pull/123
# Custom & Unlimited Per-File Byte Limits (--max-file-bytes <size>)
fuzit pack --max-file-bytes 500kb
fuzit pack --max-file-bytes 10mb
fuzit pack --max-file-bytes unlimited
# Unconstrained Full Repository Dumps (--full / -F disables per-file byte caps)
fuzit pack --full
fuzit pack -F --output full-dump.md
# Smart Content Scope Selectors (--exclude-tests / --only-code / --exclude-docs)
fuzit pack --exclude-tests --output code-only.md
fuzit pack --only-code
fuzit pack --exclude-docs
# Repository Token & Distribution Breakdown (--stats)
fuzit pack --stats
fuzit pack --stats --output bundle.md
# Target AI Model Auto-Tuning (--target <model>)
fuzit pack --target gemini-3.6-pro --output context.md
fuzit pack --target claude-3-7-sonnet --output context.md
# Intent-Based Task Retrieval & Task Profiles
fuzit pack --task "Fix authentication memory leak" --output task.md
fuzit pack --profile bug-fix --output bug-fix.md
# Git-Diff & Staged Focus (--diff / --staged)
fuzit pack --diff --output diff-context.md
fuzit pack --staged --output staged-context.md
# Custom Instruction Headers & Code Compression
fuzit pack --instruction "System prompt: review for security vulnerabilities" --output bundle.md
fuzit pack --compress --output compressed.md
# Repomix Binary Alias (maps directly to fuzit pack)
repomix
npx @fuzit/cli repomix --compress
# Standard Export Formats: markdown | json | xml | text | auto
fuzit pack --root . --format markdown --output .\fuzit-pack.md
fuzit pack --root . --format json --output .\fuzit-pack.json
fuzit pack --root . --format xml --output .\fuzit-pack.xml
fuzit pack --root . --format text --output .\fuzit-pack.txt
# Output to stdout (-)
fuzit pack --root . --format markdown --output -6. Git Subcommands (fuzit git)
Local-first Git metadata inspection surface.
fuzit git status
fuzit git log --limit 50
fuzit git diff --base main
fuzit git file-history src\App.jsx --limit 50
fuzit git blame src\App.jsx --lines 1:507. Cache Lifecycle (fuzit cache)
Initialize, inspect, rebuild, verify, and purge local index caches.
fuzit cache init --root .
fuzit cache status --root .
fuzit --json cache status --root .
fuzit cache rebuild --root . --dry-run
fuzit cache verify --root .
fuzit cache purge --root . --dry-run8. Snapshot (fuzit snapshot)
Create and inspect immutable repository snapshots.
fuzit snapshot create --root .
fuzit snapshot create --root . --json
fuzit snapshot list
fuzit snapshot show <SNAPSHOT_ID>9. Snapshot Diff (fuzit diff)
Compare two immutable Fuzit snapshots (distinct from fuzit git diff).
fuzit diff <SNAPSHOT_A> <SNAPSHOT_B>
fuzit diff abc123 def456 --json10. Profile Registry (fuzit profile)
List available context selection profiles (bug-fix, feature-development, code-review, security-audit, architecture-review, documentation).
fuzit profile list
fuzit profile list --json
fuzit --json profile list11. Task Context Selection (fuzit context)
Build task-aware context payloads. Mandatory flags: --task, --profile, --budget-tokens, --format, --output.
# Markdown Output
fuzit context `
--root . `
--task "Explain the authentication architecture" `
--profile architecture-review `
--budget-tokens 8000 `
--format markdown `
--output .\authentication-context.md `
--explain
# JSON Output
fuzit context `
--root . `
--task "Trace authentication implementation across src/contexts/AuthContext.jsx and related tests" `
--profile bug-fix `
--budget-tokens 8000 `
--format json `
--output .\auth-context.json `
--explain
# Output to Stdout (-) & Bypass Local Index (--no-index)
fuzit context `
--root . `
--task "Explain the repository architecture" `
--profile architecture-review `
--budget-tokens 8000 `
--format markdown `
--output - `
--no-index12. Explainability (fuzit explain)
Inspect transparent decision receipts from context selection reports.
# Explain entire selection report
fuzit explain selection .\selection-report.json
fuzit --json explain selection .\selection-report.json
# Explain specific path decision
fuzit explain path src\lib\api.js .\selection-report.json13. Watcher Daemon (fuzit watch)
Run local background file watching and incremental graph reconciliation.
fuzit watch --root .
fuzit watch --root . --status
fuzit watch --root . --once
fuzit watch --root . --foreground
fuzit watch --root . --debounce-ms 250 --no-initial-scan --reconcile14. Graph Queries (fuzit graph)
Query repository structure. Note: --input <path> is mandatory for all graph operations.
# Graph Statistics
fuzit graph stats --input .\graph.json
# Query Nodes by Kind
fuzit graph query --input .\graph.json --kind file --limit 25
# Bounded Neighbors
fuzit graph neighbors src\contexts\AuthContext.jsx --input .\graph.json --depth 2 --limit 50
# Impact Analysis
fuzit graph impact backend\app\core\security.py --input .\graph.json --depth 3 --limit 50Note
--root is omitted, preventing errors when running commands against external absolute graph paths. Symlink escapes, external traversal, and outside-root paths remain strictly rejected.15. Authentication (fuzit auth)
Manage authentication for private repository access (e.g. private PR review). Supports GitHub CLI session fallback.
fuzit auth status
fuzit auth githubNote
gh auth login followed by fuzit auth status.16. PR Review (fuzit review)
Engineer context directly from a remote GitHub pull request. Supports authenticated and private GitHub PR review if authenticated via fuzit auth github or gh auth login.
fuzit review OWNER/REPO#123
fuzit review https://github.com/OWNER/REPO/pull/123
fuzit review OWNER/REPO#123 `
--task "Check authentication and authorization changes" `
--profile code-review `
--budget-tokens 12000 `
--format markdown `
--output .\review.md17. PR Subcommands (fuzit pr)
Manage, inspect, view, list, and pack pull request context bundles directly from GitHub PR URLs or shorthands.
# PR Context Packing (Preamble + Diff + Optional Full Repo State at PR Head Revision)
fuzit pr pack https://github.com/OWNER/REPO/pull/123
fuzit pr pack OWNER/REPO#123 --full --output pr-context.md
# Interactive PR Inspection & Details
fuzit pr view https://github.com/OWNER/REPO/pull/123
fuzit pr view OWNER/REPO#123
# List Open Pull Requests for Repository
fuzit pr list
fuzit pr list OWNER/REPO
# Review Generator Shorthand
fuzit pr OWNER/REPO#123
fuzit pr 123 --repo OWNER/REPO --task "Review authentication" --profile code-review --output .\review.md18. Issue Context (fuzit issue)
Engineer context for a GitHub issue.
fuzit issue OWNER/REPO#123
fuzit issue https://github.com/OWNER/REPO/issues/123
fuzit issue 123 --repo OWNER/REPO --profile bug-fix --output .\issue-context.md19. Plugin Management (fuzit plugin)
Manage, inspect, and validate local plugin extensions.
fuzit plugin list --dir .\plugins
fuzit plugin inspect my-plugin
fuzit plugin validate .\plugins\my-plugin\fuzit-plugin.json
fuzit plugin enable my-plugin
fuzit plugin disable my-plugin
fuzit plugin doctor20. Support Diagnostics (fuzit support)
Generate a local metadata-only support preview.
fuzit support --preview22. Interactive Dashboard (fuzit ui / fuzit interactive)
Launch the interactive terminal UI dashboard summarizing repository statistics, discovered files, language breakdowns, and task profiles.
fuzit ui
fuzit interactive23. Local RAG REST API Server (fuzit serve)
Launch a local HTTP RAG API server (http://127.0.0.1:3000/api/context) for local LLMs, Ollama, and custom AI agents.
fuzit serve
fuzit serve 3000
fuzit serve 808024. AI Patch Application (fuzit apply)
Extract and apply AI-generated code blocks and diffs from files or standard input safely back into your working tree.
fuzit apply patch.diff
fuzit apply .\ai-suggestion.md
cat patch.diff | fuzit apply -25. Model Context Protocol Integration (fuzit plugin mcp & fuzit init --mcp)
Run native Model Context Protocol (MCP) server or generate MCP configuration for Claude Desktop & Cursor.
fuzit plugin mcp
fuzit init --mcp26. Repository Token & Statistics Inspector (fuzit stats)
Inspect repository file and token distribution breakdown by language and top file sizes before or alongside context generation.
fuzit stats
fuzit stats --root .
fuzit pack --stats