Commands
Overview
CLI reference for every kural command
Each command is one page: synopsis, flags, an example, and when to reach for it. Conceptual background (why the command exists, what it computes) stays in the matching Concepts page — the reference pages link to it rather than repeat it.
At a glance
| Command | When to use |
|---|---|
snapshot | Bootstrap the repo — parse source, embed every unit, write the local database. |
brief | Before writing new code — show what already exists in the area. |
place | Before writing new code — rank directories by fit to find its home. |
audit | After writing — list specific structural findings on the updated snapshot. |
advise | Prioritize findings into an ordered action plan for one directory. |
score | Track aggregate health over time — fit, uniqueness, children fit/uniqueness. |
Typical flow
Run
kural snapshot generate src on the repo — and again whenever source changes.Before adding code: use kural brief to see what exists, and kural place to find its home.
After editing: run kural audit for findings, then kural advise for a prioritized action
plan.
Use
kural score to track aggregate health over time — pin snapshots and compare.All analysis commands read from the snapshot database — they do not re-embed. Regenerate the snapshot after meaningful code changes so findings stay current.