Documentation

Getting Started

Install ForgeLens and generate your first risk-aware context map.

ForgeLens is a local-first CLI. It reads your repo and creates compact context files for coding agents.

1) Run your first scan

forgelens scan --root . --out .forgelens --format all

This generates key files like:

  • AI_COMPACT_CONTEXT.md
  • AI_FOCUS_MAP.md
  • RISK_REPORT.md
  • ENV_REPORT.md

2) Read in the right order

Open AI_COMPACT_CONTEXT.md first.
Then check top risk files in RISK_REPORT.md before broad file browsing.

3) Use the output with your AI

Give your agent:

  1. AI_COMPACT_CONTEXT.md
  2. AI_FOCUS_MAP.md
  3. RISK_REPORT.md

This pushes the model to start from risky boundaries instead of random low-impact files.

4) Run release checks before publish

pnpm release-check

This command runs typecheck, tests, build, and npm pack dry run.

5) Real sample output

Command:

forgelens scan --format all

Result:

  • Scan complete
  • Output directory: ./.forgelens

Files created (one per line):

  • FORGE_CONTEXT.md
  • ROUTES_MAP.md
  • DATABASE_MAP.md
  • SECURITY_RULES.md
  • ENV_REPORT.md
  • UI_UX_REPORT.md
  • PERFORMANCE_RISK_REPORT.md
  • REPO_REPORT.json

Back to docs