BeforeCode CLI generates project documentation inside an existing or new software project.
npm install
node ./bin/beforecode.js help
node ./bin/beforecode.js listInstall BeforeCode in your project:
npm install --save-dev beforecode
npx beforecode startbeforecode start asks for project context before generating docs. This prevents generic demo documentation and creates a planning workspace from the user's real idea.
Use a prepared idea file:
beforecode start --from idea.mdPreview without writing files:
beforecode start --from idea.md --dry-runbeforecode init --type saasUse a custom docs folder:
beforecode init --type ai-agent --docs project-docsPreview without writing files:
beforecode init --type saas --dry-runReplace existing generated files intentionally:
beforecode init --type saas --forcebeforecode add prd
beforecode add api-documentation
beforecode add qa-test-planbeforecode check --type saasIf .beforecoderc.json exists, the CLI can read the project type and docs path automatically:
beforecode checkbeforecode score --type saasThe MVP score is based on whether required files exist. Later versions can inspect sections and traceability.
beforecode doctor --type saasIf .beforecoderc.json exists, the command can infer the project type and docs path:
beforecode doctordoctor audits:
- Missing required documents for the selected project type.
- Documents that still look shallow or placeholder-heavy.
- Whether
.beforecoderc.jsonexists. - Whether
AGENTS.mdanddocs/ai-handoff.mdexist. - Suggested next steps before implementation.
beforecode handoffThis creates:
AGENTS.md
docs/ai-handoff.md
- small
- portfolio
- saas
- crm
- ecommerce
- mobile
- ai-agent
- opensource
The CLI does not overwrite files by default. Use --force only when replacing existing generated files is intentional.