Quick Start

Get crag running in under 60 seconds. Zero dependencies, zero config.

Install

$npm install -g @whitehatd/crag

Or run without installing:

$npx @whitehatd/crag

1. Analyze your project

cd your-project
crag analyze

Reads your package.json, CI workflows, Makefiles, and 25+ stack signals. Writes .claude/governance.md with your real gates.

2. Compile to every AI tool

crag compile --target all

Emits 14 files: AGENTS.md, .cursor/rules/governance.mdc, GEMINI.md, .github/copilot-instructions.md, GitHub Actions workflow, Forgejo workflow, Husky hook, and more.

3. Check for drift

crag audit

Compares governance against reality: stale configs, phantom gates, CI extras. Fix drift before your agents inherit it.

One-shot mode

crag

Running crag with no arguments auto-detects the project and runs analyze + compile in one shot.

Demo

crag demo

Self-contained proof-of-value that creates a synthetic project, analyzes it, compiles all 12 targets, checks for drift, and verifies SHA determinism. Takes ~3 seconds, no config required.

Zero dependencies. crag ships with nothing but Node built-ins. No supply chain risk. Works on Node 18+. Installs in under a second.