Skip to main content
The Stigg AI Terminal is currently in public beta. Feedback and bug reports are welcome.
The AI Terminal is a one-command setup tool that wires Stigg into your AI coding assistant. It signs you in, writes the Stigg MCP server into each client’s config, and installs the Stigg agent skills. It automates the same setup you’d otherwise do by hand, end to end.
npx @stigg/terminal
Run it with no arguments for an interactive, full-screen setup, or in --headless mode so an AI agent or CI job can run it for you. Supported clients: Claude Code, Cursor, VS Code, Codex, and Claude Desktop.

Requirements & install

Requires Node.js 22+. No install needed: run it directly with npx, or install globally to get the stiggt command:
npx @stigg/terminal

Two ways to run it

The AI Terminal works the same whether a human drives it or an agent does. The difference is interactive vs. non-interactive. Interactive (you, in a terminal). Run npx @stigg/terminal with no arguments. It opens a full-screen TUI that signs you in through the browser, lets you pick the account, environment, and API key, and choose which clients to configure, then writes everything and shows a summary. When setup succeeds it also offers to launch your coding agent (Claude Code, Codex, or Cursor) right there, seeded with a starter prompt so you can begin building immediately. Best for first-time, hands-on setup. Headless (an AI agent or CI). Pass --headless (or use the mcp add / skills add subcommands) for a fully non-interactive run, with optional JSON output. Best when you want your coding agent to set itself up, or when running in a pipeline. See Headless usage.
Interactive init requires a real terminal (TTY). In a non-interactive context, pass --headless; otherwise the command exits with an error telling you to.

Command reference

Run stiggt <command> --help for the flags on any command.

stiggt

With no arguments in an interactive terminal, launches the setup TUI: sign in → pick account / environment / API key → pick clients → write MCP and install skills → summary. When setup succeeds, it offers to launch your coding agent (Claude Code, Codex, or Cursor), seeded with a starter prompt. With no TTY, it prints help instead.

stiggt init

Runs the full setup: authenticate, write MCP, install skills. Interactive by default; add --headless to run without the TUI. In headless mode it runs in two phases.
FlagDescription
--headlessRun without the interactive TUI (non-interactive).
--force-loginRe-authenticate even if a valid session is cached.
--callback-port <port>Loopback port for the OAuth callback (overrides STIGG_CALLBACK_PORT).
--account-id <id>Phase 2: account ID from the phase 1 listing.
--environment-id <id>Phase 2: environment ID from the phase 1 listing.
--api-key-id <id>Phase 2: API key ID from the phase 1 listing.
-c, --client <id>Limit to specific client(s); repeatable. Default: the host agent if detected, otherwise all detected clients.
--allTarget every detected client (overrides the host-agent default).
--no-skillsSkip installing skills (skills install by default).
--jsonEmit a single JSON object on stdout instead of human-readable text.

stiggt mcp add

Writes the Stigg MCP entry into one or more client configs, without authenticating or installing skills. Requires an API key (--api-key or STIGG_API_KEY) and one of --client / --all.
FlagDescription
--api-key <value>Stigg API key (or set STIGG_API_KEY). Required.
-c, --client <id>Target client; repeatable.
--allTarget every detected client.
--jsonJSON output.

stiggt skills add

Installs the Stigg agent skills for one or more clients, without touching MCP config. No API key required. Requires one of --client / --all.
FlagDescription
-c, --client <id>Target client; repeatable.
--allTarget every detected client.
--jsonJSON output.

stiggt env

Opens an interactive picker to switch the active Stigg environment, then rewrites the MCP config for the clients in your saved setup.

stiggt dash

Opens the Stigg dashboard in your default browser.

Global flags

FlagDescription
--helpShow usage for the program or a command (stiggt <command> --help).
--versionPrint the version.

Clients

Pass these IDs to -c, --client. A client must be installed and detected to be configured, and --client and --all are mutually exclusive.
ClientIDPlatforms
Claude Codeclaude-codemacOS, Linux, Windows
CursorcursormacOS, Windows
Claude Desktopclaude-desktopmacOS, Windows
VS CodevscodemacOS, Linux, Windows
CodexcodexmacOS, Linux, Windows

What it writes

For each selected client, the AI Terminal adds a server named stigg pointing at the Stigg MCP server (https://mcp.stigg.io), authenticated with your environment API key via the X-API-KEY header. Existing config files are merged, not overwritten, and backed up to <path>.bak.<timestamp> before any change.
Uses the claude CLI (no file is edited). The server is added at user scope, idempotently, so re-running removes and re-adds it:
claude mcp add --scope user --transport http stigg https://mcp.stigg.io \
  --header "X-API-KEY: <YOUR_API_KEY>"
After writing, restart the client to load the new server.
The config paths above can be relocated with environment variables (STIGG_CURSOR_CONFIG, STIGG_VSCODE_CONFIG, STIGG_CLAUDE_DESKTOP_CONFIG, STIGG_CODEX_CONFIG), which is useful for testing or non-standard installs.

Agent skills it installs

Unless you pass --no-skills, the Terminal also installs the Stigg agent skills: domain knowledge that helps your assistant use the MCP tools well. It uses the right channel per client:
  • Claude Code registers the marketplace and installs the plugin:
    claude plugin marketplace add stiggio/skills
    claude plugin install stigg@stigg-marketplace
    
  • Other clients install via the agent-skills CLI:
    npx -y skills add stiggio/skills --all
    
Skills install is best-effort: if a step fails, the rest of setup still completes and the failure is reported.

Headless usage

--headless makes init fully non-interactive (no TUI, no prompts), so an AI agent or CI pipeline can run it. Add --json for machine-readable output.

Let your coding agent set itself up

If you’re already working inside an AI coding assistant, just ask it to run the Terminal. It detects its host (Claude Code, Cursor, Codex, and VS Code are auto-detected via environment variables the host sets) and configures that client by default:
“Connect this project to Stigg: run npx @stigg/terminal init --headless to install the MCP server and skills, then confirm it worked by listing my Stigg plans.”
Override the target with -c/--client or --all. To force or disable detection, set STIGG_HOST_AGENT (a client ID, or none).

The two-phase init

Because an account can have multiple environments and API keys, headless init runs in two phases. (If you have exactly one account, one environment, and one API key, it auto-selects them and completes in a single run.)
1

Phase 1: authenticate and list

Run init --headless with no ID flags. It reuses your cached session (or opens a browser to sign in the first time), then lists your accounts, environments, and API keys.
npx @stigg/terminal init --headless --json
With --json, you get a structured listing to parse:
{
  "user": "you@example.com",
  "accounts": [
    {
      "id": "<account-id>",
      "name": "Acme",
      "environments": [
        {
          "id": "<environment-id>",
          "name": "Production",
          "slug": "production",
          "apiKeys": [
            {
              "id": "<api-key-id>",
              "name": "Server",
              "lastFour": "ab12",
              "keyType": "SERVER",
              "createdAt": "2026-01-01T00:00:00.000Z"
            }
          ]
        }
      ]
    }
  ],
  "nextStep": "..."
}
2

Phase 2: provision

Pass the chosen IDs back; all three are required together. The Terminal writes the MCP config and installs skills for the selected clients:
npx @stigg/terminal init --headless \
  --account-id <account-id> \
  --environment-id <environment-id> \
  --api-key-id <api-key-id> \
  --all
On success, init --json emits a single object describing what happened:
{
  "ok": true,
  "writes": [{ "client": "claude-code", "path": "claude mcp add", "written": true }],
  "skipped": [],
  "skillsInstall": { "ok": true },
  "setupPath": "~/.config/stigg/setup.json",
  "hostAgent": { "id": "claude-code", "name": "Claude Code" },
  "restartHint": "Restart Claude Code (/exit + run `claude` again) to load Stigg MCP into your next session.",
  "nextStepPrompt": "..."
}

No-browser path (CI)

The simplest non-interactive setup skips OAuth entirely: create an API key in the Stigg dashboard, then write the MCP config (and optionally skills) directly. No TTY and no browser required, which is ideal for CI, Dockerfiles, and provisioning scripts.
export STIGG_API_KEY=<YOUR_API_KEY>
npx @stigg/terminal mcp add --all --json
npx @stigg/terminal skills add --all

Exit codes

CodeMeaning
0Success
1Runtime error or partial failure (e.g. some clients couldn’t be written)
2Invalid options, or a target config file was malformed

Authentication & stored files

Interactive and phase-1 headless runs sign you in through your browser. The Terminal starts a local listener on http://127.0.0.1:57166/callback to receive the redirect; if that port is taken or isn’t whitelisted, pass a different one with --callback-port (or set STIGG_CALLBACK_PORT). If the browser doesn’t open automatically, the sign-in URL is printed so you can open it manually. Your session is cached so you don’t sign in every time:
FilePurpose
~/.config/stigg/credentials.jsonCached auth session, reused until it expires.
~/.config/stigg/setup.jsonYour last completed setup: account, environment, and configured clients (used by stiggt env).
Both honor $XDG_CONFIG_HOME and are written with restrictive (owner-only) permissions. Pass --force-login to re-authenticate even when a valid session is cached. mcp add and skills add don’t sign in at all; mcp add takes the API key directly.

Environment variables

VariableDescription
STIGG_API_KEYAPI key used by mcp add (and the no-browser path) when --api-key isn’t passed.
STIGG_CALLBACK_PORTOverride the default OAuth callback port (57166).
STIGG_HOST_AGENTForce which host agent is assumed (claude-code, cursor, vscode, codex, claude-desktop), or none to disable detection.

Security

The MCP server the Terminal installs lets your AI agent act on your Stigg environment, including creating customers, provisioning subscriptions, and modifying your catalog. Connect a sandbox environment for development and testing; only connect production when you have a clear need and understand the risks.
  • Use scoped API keys when available. Create a dedicated, least-privilege key per client rather than reusing a full-access key (scoped keys are available on the Scale plan).
  • Keys are environment-bound. The key you select determines exactly which Stigg environment the agent operates on.
  • Never commit API keys or share them in chat. Treat them like passwords.
See MCP server → Security for the full guidance.

MCP Server

What the Terminal connects you to, and how to set it up by hand.

Agent Skills

The domain knowledge the Terminal installs. See all skills and manual install steps.

CLI vs MCP server

Not sure which tool to use? See the side-by-side comparison.