Skip to content

Commands

Prism ships 19 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.
prism monitor Monitor IRIS instance CPU, RAM, disk I/O, and process load in real time with a live terminal dashboard.

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).

Code indexing

Command Summary
prism index Build a compact index of all classes in a namespace. Token-efficient alternative to reading every source file.

MCP server

Command Summary
prism serve Start the Prism MCP server on http://localhost:3000/mcp.
prism setup Register Prism MCP in external tools (Claude Code, Codex CLI, OpenCode, Hermes Agent).

GUI

Command Summary
prism gui Launch the tkinter SQL editor GUI with database navigator, inline-editable results grid, and multi-tab editing. (Work in progress.)

Chatbot

Command Summary
prism chatbot Start an AI chatbot agent that orchestrates Prism's MCP tools using natural language. Connect to any OpenAI-compatible LLM API.

Plugins

Command Summary
prism cast Extend Prism with custom commands from Git repositories. Add repos, run commands with typed arguments and shell completion, and manage updates — all without installing packages.

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. Example: prism --format toon sql "SELECT 1".
--namespace -n sql, terminal, ws, compile, get-doc, list-docs, put-doc, delete-doc, test, list-tests, index Target IRIS namespace. Defaults to IRIS_NAMESPACE from your settings.
--timeout -t terminal, ws Command timeout in seconds. Default 30.0.
--port -p serve, setup 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

Shell completion

Prism includes built-in tab completion for bash, zsh, fish, and PowerShell. Once installed, pressing Tab after prism will suggest matching commands, subcommands, and options.

Install

# Auto-detect your current shell
prism --install-completion

# Or specify a shell explicitly
prism --install-completion bash
prism --install-completion zsh
prism --install-completion fish
prism --install-completion powershell

After installing, restart your terminal (or source your shell profile) for the completion to take effect.

Verify it works

Type prism conf and press Tab -- it should auto-complete to prism config.

Type prism s and press Tab -- it should cycle through sql and serve.

Type prism cast template and press Tab -- it should list all available template commands (headers, ip, portcheck, timestamp, uuid, weather).

Windows (PowerShell)

The Inno Setup installer does not install completion automatically. After installing Prism, run:

prism --install-completion powershell

Then restart your PowerShell session. Tab completion will work in any new PowerShell window.

Show completion script

If you prefer to install the completion manually (e.g. in a CI environment or a managed shell profile), you can print the script:

prism --show-completion bash    # for bash
prism --show-completion zsh     # for zsh
prism --show-completion fish    # for fish
prism --show-completion powershell  # for PowerShell