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 Using the CLI for global options, exit codes, and how --fail-on behaves in CI.

Understand a repository

prism dna

Identify languages, frameworks, domains and stack

prism dna --json | jq '.data.frameworks'

prism health

Overall health score and the factors behind it

OptionMeaning
--fail-on <band>Exit 1 when the risk is at or above this band: low, mid, high
prism health --fail-on high

prism map

Repository map: clusters, landmarks and layers

OptionMeaning
--zoom <level>Zoom level to render: repo, package, feature, file, symbol
--limit <n>Maximum rows to print (default 50)
prism map --zoom package

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 stack

Detected stack signals, domains and personas

prism stack

prism features

Inferred features and their confidence

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

prism landmarks

Entrypoints, package roots and feature anchors

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

prism packages

Every package in the workspace and where it lives

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

Assess a change

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
--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 review --base origin/main --fail-on high

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

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)
prism cycles --fail-on any

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

Reports

prism engineering

Entropy, drift, debt, churn and hotspots

OptionMeaning
--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 engineering --fail-on high

prism testing

Test structure and on-disk coverage

OptionMeaning
--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 testing

prism security

Left-shift tooling and configuration checklist

OptionMeaning
--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 security --fail-on mid

prism backend

Routes, data layer, env vars and background jobs

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

prism bundle

Bundle weight from an ingested stats artifact

OptionMeaning
--artifact <id>Ingested stats artifact id
--limit <n>Maximum rows to print (default 50)
prism bundle --artifact <id>

Diagnostics

prism doctor

Check the environment, workspace and index

prism doctor

prism index

Build or refresh the repository index

prism index

On this page