Skip to content

Commands

Prism ships 13 CLI commands. Each one is a thin wrapper around a single IRIS operation, so the output is the raw Atelier REST response (as JSON) unless otherwise noted.

All commands pick up connection settings from (in this order):

  1. Environment variables (IRIS_BASE_URL, IRIS_USERNAME, …).
  2. A .env file in the current directory.
  3. The user's config.json (written by prism config).

Run any command with --help to see its options:

prism <command> --help

Command reference

Setup

Command Summary
prism config Save connection settings to a persistent user-level file.
prism info Print IRIS server version, namespaces, and feature flags.

SQL and ObjectScript

Command Summary
prism sql Run an InterSystems SQL query.
prism terminal Run an ObjectScript command via the SuperServer (native driver).
prism ws Run an ObjectScript command via the Atelier WebSocket.

Documents

Command Summary
prism list-docs List source documents on the server.
prism get-doc Fetch a document's source.
prism put-doc Upload a local file as a document.
prism delete-doc Delete a document.
prism compile Compile one or more documents on the server.

Testing

Command Summary
prism list-tests Discover %UnitTest.TestCase classes and their Test* methods.
prism test Run a unit test class (or a single method).

MCP server

Command Summary
prism serve Start the Prism MCP server on http://localhost:3000/mcp.

Common options

Several options appear on multiple commands. They all behave the same way:

Option Long / short Applies to Meaning
--format Global (before the subcommand) Output format: json (default) or toon (requires pip install prism-mcp[toon]). Example: prism --format toon sql "SELECT 1".
--namespace -n sql, terminal, ws, compile, get-doc, list-docs, put-doc, delete-doc, test, list-tests Target IRIS namespace. Defaults to IRIS_NAMESPACE from your settings.
--timeout -t terminal, ws Command timeout in seconds. Default 30.0.
--port -p serve Port for the MCP server. Default 3000.
--flags compile IRIS compiler flags (default cuk, from IRIS_COMPILE_FLAGS).

Where outputs go

Every command prints its result to stdout as JSON. Errors go to stderr and set a non-zero exit code, so the following works as expected in scripts:

prism sql "SELECT 1" | ConvertFrom-Json

or on Linux:

prism sql "SELECT 1" | jq .result.content