Usage
Day-to-day use of the CLI, the IDE extension, and AI agents — one engine, three surfaces.
One engine, three ways to reach it. The numbers are identical whichever tab you pick; only the presentation changes.
Real exit codes and clean JSON — what makes prism useful in a script. Full
command list: CLI reference.
Global options
| Option | Effect |
|---|---|
-w, --workspace <path> | Which repository to analyse |
--json | Emit JSON on stdout instead of a human table |
--no-color | Disable ANSI colour (NO_COLOR honoured too) |
-q, --quiet | Suppress progress on stderr |
--verbose | Workspace chosen + index timing on stderr |
-y, --yes | Consent to an operation that would otherwise be refused |
--max-file-bytes <n> | Skip hashing files larger than this |
--exclude <glob> | Extra ignore glob; repeatable |
-V, --version | Engine version and API level |
No subcommand prints help and exits 0. A near-miss typo exits 2 with a suggestion.
Which repository?
Most explicit wins: --workspace → PRISM_WORKSPACE → nearest .git ancestor
→ cwd. prism doctor prints which rule won. Path arguments resolve from
your directory; paths outside the workspace are refused, not clamped.
Exit codes
| Code | Meaning |
|---|---|
0 | Ran successfully |
1 | Ran successfully, and found what you gated on |
2 | Usage error |
3 | Prism itself failed |
Failing a build
prism blast src/core/index.ts --fail-on high
prism review --base origin/main --fail-on high
prism cycles --fail-on any
prism engineering --fail-on high--fail-on takes a band and fires at or above it.
Scripting
prism dna --json | jq '.data.rankedDomains'Success and failure share one JSON envelope; in --json mode errors go to
stdout inside it. Colour is never emitted when stdout is not a TTY.
--json is never truncated — --limit bounds only the human table.
Worth knowing
- The first command in a repo is slow (it builds the index); later commands reuse it.
prism reviewwith no args reviews the working tree, including untracked files. Pass--basein CI.prism renameandprism safe-deletenever write — they only report.prism securityis a config checklist, not a vulnerability scanner.