Commands
All governance commands are read-only except init (writes expgov.config.ts).
| Command | Description |
|---|---|
expgov | Show help (default) |
expgov help [cmd] | Help for a command or global options |
init | Scaffold expgov.config.ts |
inventory | Barrel snapshot — flat count, tiers, namespaces |
diff | Compare export surfaces between refs |
validate | Governance checks (exit 0/1) |
doctor | Setup hygiene — config paths, cache gitignore |
suggest | Dry-run tier allowlist hints |
trend | Export counts across release tags |
timeline | Git log of barrel edits |
graph | Export surface graph and analytics |
Shared options
All commands accept flags (--json, --quiet, cache, cwd, config).
Listing commands also accept -T/--top and -F/--full. See Flags.
Choose a command
| Goal | Start with |
|---|---|
| First-time setup | init → inventory → validate |
| See current export surface | inventory or graph |
| Compare before release | diff or trend |
| Enforce tier rules | validate |
| Fix unclassified exports | suggest → edit config → validate |
| Barrel commit history | timeline |
| Environment checks | doctor |
Narrative walkthroughs: Workflows.