Installation
Install the Prism CLI and verify it. The dashboard is optional.
Prerequisites
- Node.js 20 or newer (
package.jsonengines field:>=20) - npm, pnpm, or yarn
Check your Node version:
node --versionInstall the CLI
The npm package is @prism-engine/cli. The binary is prism.
npm install -g @prism-engine/cliOr with pnpm:
pnpm add -g @prism-engine/cliVerify the install
prism --version
# Output: 1.2.0prism --helpprism --help lists every command. See the CLI Reference for details.
Set up enforcement (no account)
prism initprism init writes .prism/rules.json and wires the agent hooks. See Quick Start.
IDE and agent setup
prism ide-setupprism ide-setup auto-detects Cursor, Windsurf, VS Code, and Claude Desktop and writes the MCP configuration for each. It asks before touching each IDE. Claude Desktop has no hooks system, so it gets MCP (advisory rules) only. See Hooks and IDE Setup.
Connect to the dashboard (optional)
The dashboard lives at prism.syntaxure.dev . The CLI works without it, but syncing your team’s rules needs an account:
- Sign up at prism.syntaxure.dev/sign-up
- Create an API key in the dashboard under Settings
- Authenticate the CLI:
# Opens the browser for authentication
prism login
# Set your API key for prism pull (or add "apiKey" to .prism/config.json)
export PRISM_API_KEY=your_key_here
# Fetch your team's rules into .prism/rules.json
prism pullprism pull fails safe. It never overwrites a working .prism/rules.json on error.
MCP server
prism serve starts the MCP server for IDE integration. It tries to start the full prism-mcp-server (from this repository) and falls back to a built-in lite server that reads the local cache. See MCP Server.
Environment variables
These are the variables the CLI reads:
| Variable | Used by | Description |
|---|---|---|
PRISM_TOKEN | login, ide-setup, serve, connect | Auth token (also stored in ~/.prism/token) |
PRISM_API_KEY | pull | API key from the dashboard (Settings) |
PRISM_API_URL | pull, connect | Override the API base URL (default https://prism.syntaxure.dev) |
PRISM_DISABLE | check --hook | Set to 1 to disable all hook enforcement |
PRISM_STOP_SCAN_DIR | check --hook (Stop) | Directory to scan when no transcript is available |
PRISM_GEMINI_CHECK | check | Set to 1 to enable the optional Gemini semantic layer |
GEMINI_API_KEY / GOOGLE_GEMINI_API_KEY | semantic layer | Gemini API key |
PRISM_GEMINI_MODEL | semantic layer | Override the model (default gemini-3.6-flash) |
PRISM_GEMINI_TIMEOUT_MS | semantic layer | Timeout override (1000–29000) |
PRISM_GEMINI_DEBUG | semantic layer | Set to 1 for debug output |
MONGODB_URI | serve, ide-setup | Passed through to the full MCP server if set; not required |
Troubleshooting
| Issue | Solution |
|---|---|
command not found: prism | Reinstall with -g, or check your PATH |
prism pull asks for an API key | Set PRISM_API_KEY or add apiKey to .prism/config.json |
| Hook not firing | See Troubleshooting |
Next Steps
- Quick Start — Block your first violation
- CLI Reference — Every command
- Hooks and IDE Setup — Per-agent details