Docs / More

Usage

Day-to-day use of Prism from the CLI and from your agent.

One engine, two 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

OptionEffect
-w, --workspace <path>Which repository to analyse
--jsonEmit JSON on stdout instead of a human table
--no-colorDisable ANSI colour (NO_COLOR honoured too)
-q, --quietSuppress progress on stderr
--verboseWorkspace chosen + index timing on stderr
-y, --yesConsent 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, --versionEngine 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

CodeMeaning
0Ran successfully
1Ran successfully, and found what you gated on
2Usage error, or the file, symbol or path you named is not in the index
3Prism 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

--fail-on takes a band and fires at or above it.

Scripting

prism overview --json | jq '.data.dna.rankedDomains'

Success and failure share one JSON wrapper; 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 review with no args reviews the working tree, including untracked files. Pass --base in CI.
  • prism rename and prism safe-delete never write — they only report.

Install · Prepare a change · Troubleshooting