Docs / Reference

CLI commands

Every Prism CLI subcommand, generated from the command table the binary is built from.

Every prism command, generated from the command table the binary is built from. If a command appears here, it exists; if its options are listed here, they are the options it accepts.

See Usage for global options, exit codes, and how --fail-on behaves in CI.

Set up

prism start

Install Prism for every coding agent found here, index this repo and show its map

prism start

prism install <client>

Connect Prism to Claude Code, Cursor, Codex or opencode (MCP server, hooks, skills, rule line)

ArgumentMeaning
<client>claude, cursor, codex, opencode, or all
OptionMeaning
--projectWrite the configs into this repository
--userWrite the configs into your home (default)
--local <checkout>Built Prism checkout to link (default: the one this CLI runs from)
prism install claude
prism install cursor --project
prism install all --local ~/Prism

prism uninstall

Remove everything prism install added; --purge also deletes Prism data

OptionMeaning
--purgeAlso delete ~/.prism and this repository's .prism
prism uninstall
prism uninstall --purge

prism upgrade

Re-link the recorded clients to the current build and restart the daemon

prism upgrade

Understand a repository

prism overview

What this repository is: DNA, stack and landmarks

OptionMeaning
--limit <n>Maximum rows to print (default 50)
prism overview --json | jq '.data.dna.frameworks'

prism explain <path>

What a file or folder is for, and who owns it

ArgumentMeaning
<path>File or folder to explain
prism explain src/server

prism explore <target>

Usages, ownership and similar code for a file or symbol

ArgumentMeaning
<target>File path, or symbol with --symbol
OptionMeaning
--symbolTreat the argument as a symbol name rather than a file path
--in <path>File to look in, when several symbols share a name
--limit <n>Maximum rows to print (default 50)
prism explore src/index.ts

prism packages

Every package in the workspace and where it lives

OptionMeaning
--limit <n>Maximum rows to print (default 50)
prism packages

prism agents-md <action>

Generate or verify the Living AGENTS.md (never written to the repo)

ArgumentMeaning
<action>generate or check
prism agents-md generate
prism agents-md check

prism findings <action> [fingerprint]

Unused exports, duplicate implementations, wrapper functions

ArgumentMeaning
<action>list, mute, or unmute
[fingerprint]Required for mute/unmute — a finding's fingerprint field
OptionMeaning
--alllist: include findings already muted
prism findings list
prism findings mute a3f8c5f0c392dbeb

Assess a change

prism prepare <task...>

Files, reuse, and House Style for a task — never file bodies

ArgumentMeaning
<task...>What you are about to change, in plain language
OptionMeaning
--budget <n>Token budget for the whole answer (default 2000, max 6000)
prism prepare --json "add caching to fetchUser"

prism blast <target>

What breaks if this file or symbol changes

ArgumentMeaning
<target>File path, or symbol with --symbol
OptionMeaning
--symbolTreat the argument as a symbol name rather than a file path
--in <path>File to look in, when several symbols share a name
--deleteAssess a deletion rather than an edit
--fail-on <band>Exit 1 when the risk is at or above this band: low, mid, high
--limit <n>Maximum rows to print (default 50)
prism blast src/core/index.ts --fail-on high

prism review [paths...]

Risk of the current changes, or of the paths you name

ArgumentMeaning
[paths...]Files to review (default: the working-tree diff)
OptionMeaning
--base <rev>Diff against a git revision
--lens <name>Also run this lens's data-backed checks (architect, dev, qa, or a custom lens)
--fail-on <band>Exit 1 when the risk is at or above this band: low, mid, high
--limit <n>Maximum rows to print (default 50)
--format <fmt>Machine output format: sarif (GitHub code scanning)
prism review --lens qa
prism review --base origin/main --fail-on high
prism review --base origin/main --format sarif

prism safe-delete <target>

Whether a file or symbol can be removed

ArgumentMeaning
<target>File path, or symbol with --symbol
OptionMeaning
--symbolTreat the argument as a symbol name rather than a file path
--in <path>File to look in, when several symbols share a name
--limit <n>Maximum rows to print (default 50)
prism safe-delete src/legacy/old.ts

prism rename <target> [newName]

Every edit site a rename would touch

ArgumentMeaning
<target>File path, or symbol with --symbol
[newName]Proposed new name
OptionMeaning
--symbolTreat the argument as a symbol name rather than a file path
--in <path>File to look in, when several symbols share a name
--limit <n>Maximum rows to print (default 50)
prism rename src/util.ts src/helpers.ts

prism test-impact <target>

Tests that a change can reach

ArgumentMeaning
<target>File path, or symbol with --symbol
OptionMeaning
--symbolTreat the argument as a symbol name rather than a file path
--in <path>File to look in, when several symbols share a name
--fail-on <count>Exit 1 at this many findings, or 'any' for one or more
--limit <n>Maximum rows to print (default 50)
prism test-impact src/core/index.ts

prism receipts [action] [n]

List the change receipts the stop hook wrote, or show one

ArgumentMeaning
[action]list (default) or show
[n]show: which receipt, 1 is the newest
OptionMeaning
--as <format>show: text, markdown, or svg
--lastShow the newest receipt
--limit <n>Maximum rows to print (default 50)
prism receipts
prism receipts --last
prism receipts show 1 --as markdown > receipt.md

prism lens [action] [target]

List, show, add or remove review lenses (shared by every repository), or overrule a lens check

ArgumentMeaning
[action]list (default), show, add, remove, or override
[target]add: the lens name; show/remove/override: the lens id
OptionMeaning
--name <text>add: display name (default: the id)
--role <text>add: what the lens is
--focus <text>add: how it judges
--checklist <item>add: a checklist item (repeatable)
--checks <ids>add: data-backed checks, comma-separated (repeatable)
--evidence <ids>add: Prism reads it uses, comma-separated (repeatable)
--trigger <phrase>add: a phrase that chooses this lens (repeatable)
--check <id>override: the check to overrule
--path <file>override: the file the finding names
--note <text>override: why it is fine
prism lens show dev
prism lens add perf --role "Checks hot paths" --focus "No new N+1" --checklist "No query in a loop" --trigger "slow query"
prism lens override dev --check reuse_missed --path src/utils/formatDueDate.ts --note "intentionally differs"

Inspect structure

prism deps

Dependency graph size and its most connected nodes

OptionMeaning
--packagesAggregate files into packages
--limit <n>Maximum rows to print (default 50)
prism deps --packages

prism cycles

Import and re-export cycles

OptionMeaning
--packagesAggregate files into packages
--fail-on <count>Exit 1 at this many findings, or 'any' for one or more
--limit <n>Maximum rows to print (default 50)
--format <fmt>Machine output format: sarif (GitHub code scanning)
prism cycles --fail-on any
prism cycles --format sarif

prism symbol <name>

Find where a symbol is declared

ArgumentMeaning
<name>Symbol name
OptionMeaning
--in <path>File to look in, when several symbols share a name
--kind <kind>Filter by kind, e.g. function
--limit <n>Maximum rows to print (default 50)
prism symbol createWorkspace

prism refs <name>

Find who references a symbol

ArgumentMeaning
<name>Symbol name
OptionMeaning
--in <path>File to look in, when several symbols share a name
--limit <n>Maximum rows to print (default 50)
prism refs riskToBand

prism route <from> <to>

How one file reaches another through dependencies

ArgumentMeaning
<from>Starting file
<to>Destination file
OptionMeaning
--alternatives <n>How many distinct routes to return
prism route src/cli.ts src/output.ts

Memory

prism habit [action] [name]

Save routines (e.g. "start my day") that any agent can run through the habits tool

ArgumentMeaning
[action]list (default), add, show, edit, or remove
[name]The habit name (quote it)
OptionMeaning
--step <text>add: "source: action [| filter]" (repeatable, in order)
--output <format>add: standup, summary, checklist, table, or free
--template <text>add: how to lay out the result
--description <text>add: one line about the habit
prism habit add "start my day" --step "github: list my open PRs and review requests" --step "linear: my in-progress issues" --step "notion: read Daily notes for today" --output standup
prism habit show "start my day"

prism remember <note...>

Save a note about this repository for Prepare to hand back

ArgumentMeaning
<note...>The note, in plain language
OptionMeaning
--symbol <name>Anchor the note to a symbol
--path <path>Anchor the note to a path
prism remember "use lruCache, never a bare Map" --symbol lruCache

prism forget <id-or-text...>

Forget memories by id or by matching text

ArgumentMeaning
<id-or-text...>A memory id or part of its text
prism forget 3f9a2c1b7e04
prism forget lruCache

prism memories

List the notes saved for this repository

prism memories
prism memories --json

Diagnostics

prism doctor [topic]

Check the environment, workspace and index

ArgumentMeaning
[topic]skills: check user skills that name Prism tools
OptionMeaning
--ciExtra CI checks (e.g. warn on shallow clones that truncate history)
--surfacesShow which Prism each editor launches. Fails inside this repo if any of them is the published package.
--fixStop the daemon, rewrite editor configs to the recorded local build or the installed server, and update hook configs an older release wrote
prism doctor
prism doctor --ci
prism doctor --surfaces
prism doctor skills
prism doctor --fix

prism strength [level]

How much the hooks do: full (default), lite (rules and the stop receipt) or off

ArgumentMeaning
[level]full, lite or off; omit to show the strength in effect
OptionMeaning
--repoSet it for this repository only (.prism/config.json)
prism strength
prism strength lite
prism strength off --repo

prism stats

Hook and tool timings and outcomes from events.jsonl

OptionMeaning
--since <duration>Only events newer than this, e.g. 1d, 6h (default: all)
prism stats
prism stats --since 1d

prism data prune

Prune Prism's local library (dry run unless --yes)

ArgumentMeaning
pruneList empty workspace folders, caches of deleted checkouts, and untracked worktrees
prism data prune
prism data prune --yes

prism index

Build or refresh the repository index

prism index

prism graph [action]

The background daemon that keeps the graph fresh

ArgumentMeaning
[action]status (default), serve, stop, refresh, map, or export
OptionMeaning
--out <dir>export: where to write graph.json
--scope <path>map: only files under this path
--budget <tokens>map: token budget for the map
--refreshmap: rebuild instead of reading the cache
prism graph
prism graph serve
prism graph map --budget 800
prism graph export --out .prism/graph

prism completions <shell>

Print shell completion script (bash, zsh, or fish)

ArgumentMeaning
<shell>Shell to generate for: bash, zsh, or fish
prism completions bash >> ~/.bashrc
prism completions zsh > ~/.zfunc/_prism