Docs / Reference

Configuration

Ignore rules, environment variables, CLI and MCP settings.

There is very little to configure, which is deliberate. Everything below has a default that works.

Ignore rules

The one setting worth attention — it is behind most surprises about speed and file counts.

Prism combines these sources:

  1. A builtin list of directories nobody wants indexed
  2. Your .gitignore
  3. .prismignore at the repository root, if present
  4. Optional excludeGlobs in .prism/config.json

.prismignore uses gitignore syntax and applies on top of the others. Use it for things that belong in the repository but not in the analysis — generated clients, vendored code, large fixtures:

src/generated/**
fixtures/large/**

Defaults already cover node_modules, dist, build, .next, out, coverage, .git, .turbo, .cache, minified JavaScript and source maps, plus ecosystem-specific additions once Prism detects the ecosystem.

.prism/config.json

Indexing settings shared by the CLI and the MCP server (read when a workspace opens):

{
  "excludeGlobs": ["vendor/**", "fixtures/large/**"],
  "maxFileBytes": 5242880
}
FieldEffect
excludeGlobsExtra gitignore-style patterns
maxFileBytesSkip hashing files larger than this; null = no limit

Precedence when indexing: CLI / API flags → .prism/config.json → defaults (5 MiB max file size).

Environment variables

VariableEffect
PRISM_WORKSPACEThe repository to analyse, when not passed explicitly
NO_COLORDisables ANSI colour in CLI output
COLUMNSTerminal width used for wrapping, when it cannot be detected

CLI

Most behaviour is flags; indexing also honours .prism/config.json. See using the CLI for global options and the command reference for per-command options.

Workspace resolution, most explicit first: --workspace, then PRISM_WORKSPACE, then (MCP only) the host WORKSPACE_FOLDER_PATHS, then the nearest ancestor with a .git, then the current directory. prism doctor prints which rule won.

MCP server

Configured by your MCP client, not by Prism. Happy path — no path flags, no workspace variable:

{
  "mcpServers": {
    "prism": {
      "command": "prism-mcp",
      "args": [],
      "env": {
        "NODE_USE_SYSTEM_CA": "1"
      }
    }
  }
}

Canonical copy: packages/mcp-server/mcp-install.json. prism install <editor> (and prism start) write this entry for you with absolute paths (node …/mcp-server/dist/bin.js), pointing at the server installed with the CLI; they do not write npx or @latest. The hand-written config on Install and the Add to Cursor button start the published server with npx instead.

Resolution: --workspace → PRISM_WORKSPACE → host WORKSPACE_FOLDER_PATHS → CURSOR_WORKSPACE → nearest git root → cwd. When that lands on a directory with no git root (an editor sandbox), the server asks the client for its open folders via MCP roots — retried until answered — and follows roots/list_changed. Only set --workspace / PRISM_WORKSPACE when the client cannot report roots. See MCP install.

What is stored, and where

Machine-wide settings live in ~/.prism/config.json (extraTools[], the opt-in MCP tools). Per-repository state lives under ~/.prism/workspaces/<key>/, never in your checkout.

Troubleshooting · CLI usage · privacy