CLI Reference
Every command, every flag, every example. The chapter you bookmark.
You've built your first feature. Chapters 7โ14 are reference material, you don't need to read them in order. Jump to whichever chapter answers your current question, then return to building.
Overview
The pforge CLI is a convenience wrapper, two scripts, no dependencies beyond Git and your shell. Every command shows the equivalent manual steps, so non-CLI users can follow along.
| Platform | File | Usage |
|---|---|---|
| Windows / PowerShell | pforge.ps1 | .\pforge.ps1 <command> |
| macOS / Linux / Bash | pforge.sh | ./pforge.sh <command> |
setup.ps1 / setup.sh. If they're missing, copy them manually from the Plan Forge repo.
pforge analyze scores a plan's quality (traceability, coverage, gates, 0 to 100).pforge diagnose (or the forge_diagnose MCP tool) investigates a bug in code (root cause, fix recommendations).One tells you if your blueprint is solid. The other finds out why the bridge collapsed.
Use analyze after hardening a plan. Use diagnose when a slice fails.
I'm Trying To…
Most people don't need every command. Find your use case, run the matching command:
| Goal | Command | When |
|---|---|---|
| Setup & daily housekeeping | ||
| Set up a new project | pforge init | First time on this repo |
| Check setup is healthy | pforge smith | Before reporting a bug; after upgrading |
| Validate file counts and templates | pforge check | Before committing setup changes |
| Update framework files | pforge update | After a new Plan Forge release |
| Planning & authoring | ||
| Start a new feature plan | pforge new-phase <name> | You have a feature in mind |
| Score a plan's quality before running it | pforge analyze <plan> | Right after hardening |
| See what files changed vs the plan's scope | pforge diff <plan> | Mid-execution; before commit |
| Find leftover TODO/FIXME/HACK markers | pforge sweep | Before declaring a slice done |
| Execution | ||
| Estimate cost before running | pforge run-plan <plan> --estimate | You want to know what this will cost first |
| Run a plan end-to-end (cheapest) | pforge run-plan <plan> | Plan is hardened and you trust it |
| Run with multi-model consensus | pforge run-plan <plan> --quorum=auto | High-stakes feature; complex slices |
| Resume after a failed slice | pforge run-plan <plan> --resume-from N | You fixed slice N−1's failure |
| Co-pilot mode (you code, gates check) | pforge run-plan <plan> --assisted | You want to write the code yourself |
| Troubleshooting | ||
| Investigate a failing slice | pforge diagnose <file> | Slice failed and you don't know why |
| Run closed-loop drain | pforge audit-loop | Mass content audit (opt-in feature) |
| See chronological event history | pforge timeline | Forensic / "what happened on Tuesday?" |
| Post-deploy (LiveGuard) | ||
| Score code drift since baseline | pforge drift | After every deploy |
| Scan for high-entropy secrets | pforge secret-scan | Before every deploy (blocking) |
| Scan dependencies for CVEs | pforge dep-watch | Daily / before deploy |
| Compute health score 0–100 | pforge health-trend | Weekly / on alert |
Full command reference below, organized alphabetically. Each entry has the equivalent manual steps for non-CLI users.
Commands
setup.ps1 / setup.sh.| Flag | Type | Description |
|---|---|---|
-Preset | string | Tech preset: dotnet, typescript, python, java, go, swift, rust, php, azure-iac. Comma-separated for multi-preset. |
-ProjectPath | path | Target project directory (default: current dir) |
-Agent | string | Agent adapter: copilot, claude, cursor, codex, gemini, windsurf, generic, all |
.\pforge.ps1 init -Preset dotnet
.\pforge.ps1 init -Preset typescript -ProjectPath ./my-app
.\pforge.ps1 init -Preset dotnet -Agent all
./pforge.sh init --preset dotnet
./pforge.sh init --preset typescript --path ./my-app
./pforge.sh init --preset dotnet --agent all
Equivalent manual steps
- Run
.\setup.ps1/./setup.shwith your preferred parameters - Follow the interactive wizard
validate-setup.ps1 / validate-setup.sh.pforge check
Equivalent manual steps
- Run
.\validate-setup.ps1 - Review the output for any missing files
DEPLOYMENT-ROADMAP.md with their current status.pforge status
Phase Status (from DEPLOYMENT-ROADMAP.md):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Phase 1: User Authentication ๐ Planned
Phase 2: Dashboard Widgets ๐ง In Progress
| Arg / Flag | Type | Description |
|---|---|---|
name | string (required) | Phase name, e.g. user-auth |
--dry-run | boolean | Preview without creating |
.\pforge.ps1 new-phase user-auth --dry-run
.\pforge.ps1 new-phase user-auth
What it does
- Finds the next phase number (e.g., Phase 3)
- Creates
docs/plans/Phase-3-USER-AUTH-PLAN.mdfrom template - Adds a Phase 3 entry to
DEPLOYMENT-ROADMAP.md
| Arg / Flag | Type | Description |
|---|---|---|
plan | path (required) | Path to plan file |
--dry-run | boolean | Preview without creating |
.\pforge.ps1 branch docs/plans/Phase-3-USER-AUTH-PLAN.md --dry-run
.\pforge.ps1 branch docs/plans/Phase-3-USER-AUTH-PLAN.md
| Arg / Flag | Type | Description |
|---|---|---|
plan | path (required) | Path to plan file |
slice | number (required) | Slice number |
--dry-run | boolean | Preview commit message without committing |
.\pforge.ps1 commit docs/plans/Phase-3.md 2 --dry-run
.\pforge.ps1 commit docs/plans/Phase-3.md 2
| Arg | Type | Description |
|---|---|---|
plan | path (required) | Path to plan file |
status | enum (required) | planned ยท in-progress ยท complete ยท paused |
.\pforge.ps1 phase-status docs/plans/Phase-3.md in-progress
.\pforge.ps1 phase-status docs/plans/Phase-3.md complete
pforge sweep
Completeness Sweep, scanning for deferred-work markers:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
src/Services/UserService.cs:42: // TODO: Wire to real email service
src/Controllers/AuthController.cs:18: // FIXME: Add rate limiting
FOUND 2 deferred-work marker(s). Resolve before Step 5 (Review Gate).
Also available as: forge_sweep MCP tool
.\pforge.ps1 diff docs/plans/Phase-3-USER-AUTH-PLAN.md
Scope Drift Check, 4 changed file(s) vs plan:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ IN SCOPE src/Services/UserService.cs
โ IN SCOPE src/Repositories/UserRepository.cs
โ UNPLANNED src/Config/AppSettings.cs
โ FORBIDDEN tests/Legacy/OldTests.cs
DRIFT DETECTED, 1 forbidden file(s) touched.
Also available as: forge_diff MCP tool
--quorum or --models, runs a multi-model review instead, of a plan or a source file.| Flag | Type | Description |
|---|---|---|
--quorum[=<preset>] | boolean | preset | Multi-model consensus review instead of the score; the preset is power, speed or power-gov. Spends tokens; the report is saved to .forge/analysis/ |
--mode | plan | file | Analysis mode. Defaults to plan for .md/.markdown files and file otherwise; file needs --quorum |
--models | string | Comma-separated model override; implies --quorum |
# Single-model analysis
.\pforge.ps1 analyze docs/plans/Phase-1-AUTH-PLAN.md
# Multi-model quorum
.\pforge.ps1 analyze docs/plans/Phase-1-AUTH-PLAN.md --quorum
# Multi-model code review of a source file
.\pforge.ps1 analyze src/services/billing.ts --quorum=power
Scoring Dimensions
| Dimension | Points | What It Checks |
|---|---|---|
| Traceability | 25 | MUST/SHOULD criteria exist, slices defined, criteria mapped to slices |
| Coverage | 25 | Changed files within Scope Contract, no forbidden edits |
| Test Coverage | 25 | MUST criteria matched against test files via keyword fuzzy matching |
| Gates | 25 | Validation gates referenced in slices, no deferred-work markers |
Exit codes: 0 = pass (โฅ60), 1 = fail (<60); with --quorum, 0 when the review completes. Also available as: forge_analyze MCP tool.
forge_diagnose MCP tool for Copilot Chat or any MCP client.| Flag / parameter | Type | Description |
|---|---|---|
--quorum=<preset> (CLI) | preset | power, speed or power-gov (default: quorum config) |
file (required) | string | Path to the source file to investigate (e.g., src/services/billing.ts) |
models | string | Comma-separated model override (default: quorum config models) |
path | string | Project directory (default: current) |
.\pforge.ps1 diagnose src/services/billing.ts
.\pforge.ps1 diagnose src/auth/token-validator.ts --models grok-4.20-0309-non-reasoning,grok-4.7
# From Copilot Chat
forge_diagnose({ file: "src/services/billing.ts" })
forge_diagnose({ file: "src/auth/token-validator.ts", models: "grok-4.20-0309-non-reasoning,grok-4.7" })
Each model analyzes independently for: root cause, failure modes, reproduction steps, impact assessment, fix recommendations, regression risk. The CLI saves the report to .forge/analysis/diagnose-*; the MCP tool returns it inline to the calling agent.
Reference: pforge-mcp/tools.json » forge_diagnose. Adjacent CLI command: pforge analyze for plan quality.
| Flag | Type | Default | Description |
|---|---|---|---|
--estimate | boolean | — | Cost prediction only, no execution. Always backed by forge_estimate_quorum, never hand-computed. |
--assisted | boolean | — | Human codes, orchestrator validates gates |
--model | string | — | Model override (e.g., gpt-6-sol) |
--resume-from | number | — | Skip completed slices, resume from N |
--dry-run | boolean | — | Parse and validate without executing |
--quorum | auto | power | speed | false | auto | Quorum preset. auto: threshold-based escalation. power: flagship models, threshold 5 (premium tier). speed: fast models, threshold 7. false: disable. |
--quorum-threshold | number | 6 | Override the complexity threshold for auto-quorum (1–10). Implied by --quorum=power|speed. |
# Estimate cost without executing (always tool-backed via forge_estimate_quorum)
.\pforge.ps1 run-plan docs/plans/Phase-7.md --estimate
# Full auto execution
.\pforge.ps1 run-plan docs/plans/Phase-7.md
# Assisted mode
.\pforge.ps1 run-plan docs/plans/Phase-7.md --assisted
# Resume from slice 3 after fixing a failure
.\pforge.ps1 run-plan docs/plans/Phase-7.md --resume-from 3
# Quorum presets (v2.82)
.\pforge.ps1 run-plan docs/plans/Phase-7.md --quorum=power # flagship models, threshold 5
.\pforge.ps1 run-plan docs/plans/Phase-7.md --quorum=speed # fast models, threshold 7
.\pforge.ps1 run-plan docs/plans/Phase-7.md --quorum=auto --quorum-threshold 8
Execution Modes
| Mode | Flag | What Happens |
|---|---|---|
| Full Auto | (default) | gh copilot CLI executes each slice with full project context. Routing honors a host-aware preference so non-Copilot hosts (Claude Code, Cursor, Windsurf, Zed) prefer direct API to honor your subscription. |
| Assisted | --assisted | You code in VS Code; orchestrator prompts and validates gates |
| Estimate | --estimate | Shows slice count, token estimate, and cost, without executing. Returns the same numbers as the forge_estimate_quorum tool. |
Results written to: .forge/runs/<timestamp>/. Also available as: forge_run_plan MCP tool.
FIX: suggestion.pforge smith
What The Smith Checks
| Category | Checks |
|---|---|
| Environment | git, VS Code CLI, PowerShell/bash version, GitHub CLI |
| VS Code Config | chat.agent.enabled, chat.useCustomizationsInParentRepositories, chat.promptFiles |
| Setup Health | .forge.json valid, copilot-instructions.md exists, file counts match preset |
| Version Currency | Installed templateVersion vs source VERSION |
| Common Problems | Duplicate instructions, orphaned agents, missing applyTo, unresolved placeholders |
Also available as: forge_smith MCP tool.
| Subcommand | Description |
|---|---|
ext search [query] | Browse the community catalog. Omit query for all extensions. |
ext add <name> | Download and install from catalog in one step. |
ext info <name> | Show detailed info before installing. |
ext install <path> | Install from a local directory path. |
ext list | List all installed extensions. |
ext remove <name> | Remove an installed extension. |
ext publish <path> | Generate a catalog entry for submission via PR. |
.\pforge.ps1 ext search saas
.\pforge.ps1 ext add saas-multi-tenancy
.\pforge.ps1 ext info plan-forge-memory
.\pforge.ps1 ext list
.\pforge.ps1 ext remove healthcare-compliance
.\pforge.ps1 ext publish .forge/extensions/my-extension
Also available as: forge_ext_search, forge_ext_info MCP tools.
| Flag | Type | Description |
|---|---|---|
source | path (optional) | Plan Forge source path (auto-detects ../plan-forge) |
--dry-run | boolean | Preview changes without applying |
--yes, -y | boolean | v3.31.2+ โ Skip the confirmation prompt (for unattended runs) |
--force | boolean | Skip the confirmation prompt and apply the update even when the source is the version you already have |
--overwrite-customized | boolean | v3.28.0+ โ Also replace guidance files you edited. Each one is copied to .forge/update-backups/<timestamp>/ first. |
.\pforge.ps1 update
.\pforge.ps1 update C:\path\to\plan-forge --dry-run
.\pforge.ps1 update --force
.\pforge.ps1 update --overwrite-customized
What Gets Updated vs Protected
| Updated (safe to replace) | Never Touched (your files) |
|---|---|
Pipeline prompts, agents, shared instructions, runbook, lifecycle hooks, preset files. A stack preset's own copy of a shared instruction (for example testing or security) is used instead of the shared one. |
copilot-instructions.md, project-profile, project-principles, DEPLOYMENT-ROADMAP.md, .forge.json, plan files |
Guidance files you edited
Since v3.28.0, instruction, prompt, agent, skill, hook and runbook files are replaced only when your copy matches a version Plan Forge shipped. Setup's substitutions (project name, stack and setup date from .forge.json) are taken into account and filled in again on updated files, including files an older updater left with raw placeholders.
If you edited a file, update keeps your copy, lists it as KEEP, and writes the new version to .forge/update-pending/<path> so you can merge what you want. Run with --overwrite-customized to take the new versions anyway; each replaced file is backed up to .forge/update-backups/<timestamp>/<path> first.
Review the kept files with pforge pending, which pforge smith also reminds you about while any remain:
pforge pendinglists them with their age.pforge pending diff <path>compares your copy with the new version.pforge pending apply <path> --yestakes the new version and backs your copy up to.forge/update-backups/.pforge pending discard <path> --yeskeeps your copy.
Use --all instead of a path to act on every file. Without --yes, apply and discard only show what they would do.
Files a release removed
Since v3.31.2, update also lists files in pforge-mcp/, pforge-master/ and pforge-sdk/ that the new release no longer ships as REMOVE, and moves them to .forge/update-backups/<timestamp>/ when it applies. Installed dependencies, .forge/, lockfiles, logs and .env files in those folders are never touched.
pforge.ps1 / pforge.sh with the v3.28.0 copy first and then run the update.
pforge.ps1 doesn't have the update command yet (pre-v1.2.1), download the latest script first, then run pforge update.
pforge update under the hood; refreshes the consumer .gitignore managed block (v3.15.1+) and invalidates the version-check cache so the next pforge smith doesn't show a stale "update available" banner.| Flag | Type | Description |
|---|---|---|
--yes, -y | boolean | Skip the "Install vX.Y.Z now? [Y/n]" confirmation prompt. Before v3.31.2, the update it started still asked its own question and, with nobody to answer, cancelled; on those versions run pforge self-update --yes --force unattended |
--dry-run | boolean | Print what would happen (target tag, downgrade detection) without writing anything |
--force | boolean | Heal an already-current install โ reinstalls the latest tagged release even when the local VERSION matches. Useful when a corrupt -dev tarball needs replacing |
--downgrade | boolean | Required with --force when the latest release is OLDER than the local version (e.g. recovering from a manual VERSION edit). Without it, self-update refuses to silently downgrade. |
--verify | boolean | v3.20.0+ โ After a successful update, runs pforge check and pforge smith in subprocesses against the freshly-installed wrapper. Exits non-zero if either fails. Composes with every other flag. |
--overwrite-customized | boolean | v3.28.0+ โ Passed to pforge update: also replace guidance files you edited, backing each one up first. |
pforge self-update # interactive โ prompts before installing
pforge self-update --yes # unattended (CI, scripts)
pforge self-update --dry-run # preview only
pforge self-update --force # heal a corrupt install
pforge self-update --force --downgrade # explicit roll-back (rare)
pforge self-update --verify # update + check + smith
pforge self-update --yes --verify # unattended with verification
pforge self-update --force --verify # heal + verify
--verify spawns subprocesses: When pforge.ps1 / pforge.sh are updated in-place, the running shell still has the OLD wrapper code loaded in memory (Issue #177). --verify shells out to pwsh -File pforge.ps1 check / bash pforge.sh check so the just-installed wrapper is the one that does the verification.
pforge help
.forge.json → audit.mode = "auto" | "always", or use --auto to respect the config.| Flag | Type | Default | Description |
|---|---|---|---|
--auto | boolean | — | Respect .forge.json#audit.mode, skip cleanly if off |
--max | number | 5 | Maximum drain rounds before terminating |
--dry-run | boolean | — | Scan + triage but skip fix dispatch |
--env | dev | staging | dev | Environment name passed to content-audit scanner. Production is hard-blocked unless allowProduction: true in scanner opts. |
# One-shot manual drain (3 rounds max, dry-run)
pforge audit-loop --max 3 --dry-run
# Respect .forge.json#audit config (most common in CI)
pforge audit-loop --auto
# Drain against staging
pforge audit-loop --auto --env staging
bug (registers in the bug registry), spec (submits to Crucible for re-smelting), or classifier (writes a local proposal artifact under .forge/audits/ for human review). The classifier-reviewer agent in .github/agents/ can audit the classifier's lane choices read-only.
Also available as: forge_tempering_drain MCP tool, POST /api/tempering/drain REST endpoint, and the /audit-loop slash-command skill in chat.
| Flag | Type | Default | Description |
|---|---|---|---|
--window | duration | 24h | Lookback window (e.g., 1h, 24h, 7d) |
--from / --to | ISO datetime | — | Explicit range (overrides --window) |
--source | string | all | Filter to one source: run, incident, bug, deploy, crucible, fm-turn, memory, tempering, watch |
--correlation | string | — | Filter to one correlation id (run id, incident id, etc.) |
--group-by | source | hour | day | — | Bucket events for a summary view |
--limit | number | 200 | Max events returned |
--json | boolean | — | Machine-readable JSON output |
# Last 24h, all sources
pforge timeline
# Last hour, only Forge-Master turns
pforge timeline --window 1h --source fm-turn
# Everything tied to one run
pforge timeline --correlation run-2026-05-04T120000
# Daily summary for the past week, grouped by source
pforge timeline --window 7d --group-by source
# JSON for piping into jq / scripts
pforge timeline --window 24h --json | jq '.[] | select(.source == "incident")'
Also available as: forge_timeline MCP tool, GET /api/timeline REST endpoint, and the Timeline tab on the dashboard.
LiveGuard Commands (v2.27.0+)
Post-coding intelligence commands. All run locally, no network unless openclaw.endpoint is configured.
pforge drift
pforge drift --since HEAD~5Also available as: forge_drift_report MCP tool.
resolvedAt for MTTR tracking.| Flag | Type | Description |
|---|---|---|
--severity | enum | critical ยท high ยท medium ยท low |
--files | string | Comma-separated affected file paths, e.g. src/api/handler.ts |
pforge incident "Auth token validation bypass" --severity critical --files src/auth/validator.ts
pforge incident "Slow query on dashboard load" --severity medium
| Flag | Type | Description |
|---|---|---|
--min-severity | enum | Filter by minimum severity: critical ยท high ยท medium ยท low |
--max | number | Maximum number of results to display |
pforge triage
pforge triage --min-severity medium --max 10
| Flag | Type | Description |
|---|---|---|
--version | string | Deployment version, e.g. v2.27.0 |
--env | string | Target environment, e.g. production |
--status | enum | success ยท failure ยท rollback |
pforge deploy-log --version v2.27.0 --env production --status success
pforge deploy-log --version v2.27.0 --env staging --status failure
| Flag | Type | Description |
|---|---|---|
--plan | path | Path to plan file, e.g. docs/plans/Phase-LiveGuard-v2.27.0-PLAN.md |
pforge regression-guard --plan docs/plans/Phase-LiveGuard-v2.27.0-PLAN.md
| Flag | Type | Description |
|---|---|---|
--plan | path | Path to plan file |
pforge runbook --plan docs/plans/Phase-7-DASHBOARD-PLAN.md
| Flag | Type | Description |
|---|---|---|
--top | number | Number of files to display (default: 10) |
--since | string | Git log time range, e.g. "3 months ago" |
pforge hotspot
pforge hotspot --top 15 --since "3 months ago"
pforge dep-watch
| Flag | Type | Description |
|---|---|---|
--since | string | Git ref range to scan, e.g. HEAD~3 |
--threshold | number | Entropy threshold for detection (default: 4.5), e.g. 4.0 |
pforge secret-scan
pforge secret-scan --since HEAD~3 --threshold 4.0
Also available as: forge_secret_scan MCP tool.
.env files. Keys only, values are never read.| Flag | Type | Description |
|---|---|---|
--baseline | path | Baseline env file, e.g. .env |
--files | string | Comma-separated env files to compare, e.g. .env.staging,.env.production |
pforge env-diff
pforge env-diff --baseline .env --files .env.staging,.env.production
Also available as: forge_env_diff MCP tool.
| Flag | Type | Description |
|---|---|---|
--days | number | Number of days to include (default: 14), e.g. 30 |
pforge health-trend
pforge health-trend --days 30
| Flag | Type | Description |
|---|---|---|
--source | enum (required) | regression ยท drift ยท incident ยท secret |
--incident-id | string (optional) | Specific incident ID (used when source=incident) |
pforge fix-proposal --source regression
pforge fix-proposal --source drift
pforge fix-proposal --source secret
pforge fix-proposal --source incident --incident-id INC-2026-04-001Also available as: forge_fix_proposal MCP tool, POST /api/fix/propose REST endpoint (requires auth).
docs/plans/auto/LIVEGUARD-FIX-*.md and fill in the TODO markers, then pforge run-plan --assisted <plan> on a branch.| Flag | Type | Description |
|---|---|---|
--source | enum (required) | drift ยท triage ยท incident ยท runbook ยท fix-proposal |
--goal | enum (optional) | root-cause ยท risk-assess (default) ยท fix-review ยท runbook-validate |
--custom-question | string (optional) | Freeform question that overrides --goal (max 500 chars) |
--quorum-size | number (optional) | Model vote count requested in the prompt (default 3) |
pforge quorum-analyze --source triage
pforge quorum-analyze --source drift --goal root-cause
pforge quorum-analyze --source incident --custom-question "Which fix should I prioritize given the sprint deadline?"Also available as: forge_quorum_analyze MCP tool, POST /api/quorum/prompt REST endpoint (no auth required).
Third Edition Commands v3.x+
Six commands shipped between v2.99 and v3.5 that postdate the original CLI reference. Each is a thin wrapper over a v3.x MCP tool or subsystem, see the per-command "Also available as" link for the full MCP / REST mapping.
.github/copilot-memory-hints.md from forge decisions, trajectories, auto-skills, OpenBrain entries. Hash-deduped and atomic; safe to run repeatedly. See Chapter 26 โ Copilot Integration Trilogy.| Flag | Type | Description |
|---|---|---|
--since | duration (optional) | Limit to trajectories in the last N (e.g. 14d, 30d). Default: 50 most recent. |
--explain | flag (optional) | Verbose: show which entries were included/excluded and why |
--preview | flag (optional) | Generate without writing, print the diff |
pforge sync-memories
pforge sync-memories --since=14d
pforge sync-memories --preview --explainAlso available as: forge_sync_memories MCP tool.
.github/copilot-instructions.md by composing project profile + principles + extra instruction files + .forge.json commitments. Output is deterministic; same inputs produce identical files.| Flag | Type | Description |
|---|---|---|
--preview | flag (optional) | Generate without writing, print the resulting content |
--force | flag (optional) | Overwrite even if content hash matches (bypass dedup) |
pforge sync-instructions
pforge sync-instructions --preview
pforge sync-instructions --forceAlso available as: forge_sync_instructions MCP tool, POST /api/copilot-instructions/sync REST endpoint.
| Flag | Type | Description |
|---|---|---|
--peer | string (optional) | Limit sync to one configured peer name |
--apply | flag (optional) | Write the merged records (default: dry-run) |
--since | duration (optional) | Only consider records newer than N (default: 7d) |
pforge sync-spaces # dry-run, all peers
pforge sync-spaces --peer=billing-svc --apply
pforge sync-spaces --since=30d --applyConfigured under brain.federation.repos in .forge.json.
| Flag | Type | Description |
|---|---|---|
--min-severity | enum (optional) | low ยท medium ยท high ยท critical (default: medium) |
--max-slices | number (optional) | Cap the number of slices (default: 10) |
--phase-name | string (optional) | Override the auto-generated phase name |
pforge plan-from-sarif codeql-results.sarif
pforge plan-from-sarif scan.sarif --min-severity=high --max-slices=5
pforge plan-from-sarif sec.sarif --phase-name="Phase-SEC-FIX"Writes to docs/plans/Phase-N-PLAN.md. Plan still needs hardening via step2-harden-plan.prompt.md before execution.
| Flag | Type | Description |
|---|---|---|
--since | duration (optional) | Window (default: 24h). Common: 7d for weekly roll-up. |
--format | enum (optional) | markdown (default) ยท json |
--post | flag (optional) | Send via configured notification channel (Slack, Teams, etc.) |
--rebuild | flag (optional) | Recompute from logs instead of reading cached .forge/digests/YYYY-MM-DD.json |
pforge digest # today's, markdown
pforge digest --since=7d # weekly
pforge digest --format=json | jq # pipe-friendly
pforge digest --post # broadcast to configured channelBacks the Yesterday's Digest dashboard tile. Cron-friendly: pforge digest --post at 09:00 weekdays = free standup.
forge_sweep + forge_tempering_drain in a single tightened loop suitable for pre-release gates.| Flag | Type | Description |
|---|---|---|
--strict | flag (optional) | Exit non-zero on any finding (default: report-only) |
--include | glob (optional) | Limit scan to files matching a glob (default: all tracked) |
--max-rounds | number (optional) | Cap convergence rounds (default: 3) |
pforge hammer-fm
pforge hammer-fm --strict # CI gate
pforge hammer-fm --include="src/**/*.ts"Pairs well with forge_classifier_issue when findings are noise rather than bugs, see Chapter 27 โ Team Coordination.
.forge/forge-master/sessions/.| Flag | Type | Description |
|---|---|---|
--resume | string (optional) | Session ID to continue (omit to start new) |
--model | string (optional) | Override the configured Forge-Master model |
--quiet | flag (optional) | Suppress thought-trace output (final answer only) |
pforge fm-session "Why did Phase-31 slice 4 fail?"
pforge fm-session --resume=fm-7f3a-...
pforge fm-session --quiet "What's the cheapest quorum for Phase-32?"Also available as: forge_master_ask MCP tool (one-shot), POST /api/forge-master/ask REST endpoint.
fm-session --resume=... from.| Flag | Type | Description |
|---|---|---|
--limit | number (optional) | Max results (default: 5) |
--since | duration (optional) | Only sessions from last N (default: 90d) |
--json | flag (optional) | Machine-readable output |
pforge fm-recall "gate timeout"
pforge fm-recall "snapshot pop strategy" --limit=10
pforge fm-recall "cost anomaly Phase-31" --since=30d --jsonBacked by the L2 search index over .forge/forge-master/sessions/*.jsonl.
MCP Server Commands
The MCP server is started directly with Node.js, not through the pforge CLI:
.vscode/mcp.json for auto-start.# Full MCP server (normal usage, started by VS Code via mcp.json)
node pforge-mcp/server.mjs
# Dashboard + REST API only (no MCP stdio)
node pforge-mcp/server.mjs --dashboard-only
# Custom project path
node pforge-mcp/server.mjs --project /path/to/project
Full Reference
This chapter covers the happy path for each command. For exhaustive edge-case documentation, see the source: CLI-GUIDE.md on GitHub