Forge’s utility commands handle the scaffolding of a healthy day-to-day workflow: persisting audit results so you can track architectural health over time, guarding every git commit with automated rule validation, creating safe restore points before destructive operations, pinning frequently-visited paths for quick navigation, and keeping the tool itself up to date. None of these commands change your source code directly — they support and protect the work that the core commands do.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ronaldjdev/forge/llms.txt
Use this file to discover all available pages before exploring further.
forge state — Persistent Audit State
forge state — Persistent Audit State
forge state reads and displays the audit state that Forge persists to .forge/ after each forge inspect run. Because architecture health changes incrementally across sprints, the state store gives you a lightweight history of score, grade, and violations without re-running a full audit.forge inspect, Forge writes the score (0–100), grade (A–F), violation list, and timestamp to .forge/. This file is checked in to version control so your team shares the same baseline.--history lists every recorded audit in chronological order — useful for spotting regressions after a major refactor or dependency upgrade.forge hook — Git Pre-Commit Hook
forge hook — Git Pre-Commit Hook
forge hook installs and manages a git pre-commit hook that validates staged files against Forge’s architectural rules before each commit. The hook runs detect.mjs on every staged .ts, .js, .mjs, .tsx, and .jsx file under src/. If any staged file introduces a CRITICAL or ERROR violation, the commit is blocked and the violation details are printed inline.The hook blocks commits but does not prevent bypassing with
git commit --no-verify. Use forge hook status regularly to confirm the hook is still installed — particularly after cloning on a new machine, since git hooks are not versioned.| File | Purpose |
|---|---|
.git/hooks/pre-commit | The hook script itself |
.forge/hooks-ignore.json | Rules suppressed via inline forge-ignore comments |
forge rollback — Restore Checkpoints
forge rollback — Restore Checkpoints
Before executing any destructive operation — Checkpoints are stored in
relocate, reforge, temper, smelt — Forge automatically creates a checkpoint of your project state. forge rollback lets you restore your project to any of those saved checkpoints if a refactoring goes wrong or the architecture score regresses unexpectedly..forge/backups/<target>--<timestamp>/ and preserve the full original directory structure of the migrated code.Typical rollback workflow after a failed migration:nail / unnail — Navigation Shortcuts
nail / unnail — Navigation Shortcuts
forge update — Check for Updates
forge update — Check for Updates
forge update checks whether a newer version of the @ronaldjdevfs/forge package is available on npm and reports the current and latest versions.