@repo-prism/cli
v1.0.1
Published
Prism CLI over Core: local-first repository intelligence
Readme
@repo-prism/cli
prism — local-first repository intelligence from a terminal or CI.
Same engine as the VS Code / Cursor extension and the MCP server. Runs on your machine. Nothing is uploaded.
Requires Node.js 26.
Install
# one-shot (recommended)
npx -y @repo-prism/cli doctor
# or install globally
npm install -g @repo-prism/cli
prism doctorQuick start
cd /path/to/your/repo
prism doctor # environment + which workspace was chosen
prism index # build the index (first run is the slow one)
prism dna # languages, frameworks, domains
prism health # overall score + factors
prism blast src/index.ts --fail-on high
prism health --json | jq '.data.score'Global options
Work before or after the subcommand (prism blast x --json is fine).
| Option | Effect |
|---|---|
| -w, --workspace <path> | Repository to analyse |
| --json | JSON on stdout (scripts / CI) |
| --no-color | Disable ANSI colour (NO_COLOR honoured) |
| -q, --quiet | Suppress progress on stderr |
| --verbose | Extra detail |
| -y, --yes | Consent to a gated operation |
| -V, --version | Core version + API level |
Workspace resolution: --workspace → PRISM_WORKSPACE → nearest git root → cwd.
Exit codes
| Code | Meaning |
|---:|---|
| 0 | Success |
| 1 | Ran successfully; the analysis found what you gated on (--fail-on) |
| 2 | Usage error (bad flag, missing argument) |
| 3 | Prism failed |
Use 1 vs 2 carefully in CI: a typo must not look like a real finding.
Commands
Diagnostics
| Command | Purpose |
|---|---|
| prism doctor | Check Node, workspace resolution, git, index |
| prism index | Build or refresh the repository index |
Understand a repository
| Command | Purpose |
|---|---|
| prism dna | Languages, frameworks, domains, stack |
| prism health | Overall health score and factors |
| prism map [--zoom <level>] | Map clusters / landmarks / layers (repo, package, feature, file, symbol) |
| prism explain <path> | What a file or folder is for, ownership |
| prism explore <target> | Usages, ownership, similar code |
| prism stack | Stack signals, domains, personas |
| prism features | Inferred features + confidence |
| prism landmarks | Entrypoints, package roots, anchors |
| prism packages | Every package and where it lives |
Assess a change
| Command | Purpose |
|---|---|
| prism blast <target> [--fail-on low\|mid\|high] | What breaks if this changes |
| prism review [paths…] [--base <ref>] [--fail-on …] | Risk of working-tree or named changes |
| prism safe-delete <target> | Whether something can be removed |
| prism rename <target> <newName> | Every edit site a rename would touch |
| prism test-impact <target> | Tests that a change can reach |
Inspect structure
| Command | Purpose |
|---|---|
| prism deps | Graph size + most connected nodes |
| prism cycles [--fail-on any] | Import / re-export cycles |
| prism symbol <name> | Where a symbol is declared |
| prism refs <name> | Who references a symbol |
| prism route <from> <to> | How one file reaches another |
Reports
| Command | Purpose |
|---|---|
| prism engineering | Entropy, drift, debt, churn, hotspots |
| prism testing | Test structure + on-disk coverage |
| prism security | Left-shift tooling checklist (not a CVE scanner) |
| prism backend | Routes, data layer, env, jobs |
| prism bundle | Bundle weight from an ingested stats artifact |
Common flags on many commands: --limit <n>, --fail-on <band|any>, --json.
CI example
- uses: actions/setup-node@v4
with:
node-version: "26.5.0"
- run: npx -y @repo-prism/cli review --base origin/main --fail-on high
- run: npx -y @repo-prism/cli cycles --fail-on anyCheckout needs full history (fetch-depth: 0) if you compare against a base branch.
Related
| | |
|---|---|
| MCP server (agents) | @repo-prism/mcp-server |
| Core SDK | @repo-prism/core |
| IDE extension | RepoPrism on Marketplace |
| Docs | CLI guide · Command reference |
| Source | github.com/Shailesh200/prism |
| Privacy | PRIVACY.md |
