Skip to content

DeepIntShield CLI

DeepIntShield CLI is an interactive terminal tool that connects your favorite coding agents — Claude Code, Codex CLI, Gemini CLI, and Opencode — to your DeepIntShield gateway with zero manual configuration.

Instead of setting environment variables, editing config files, and looking up provider paths, you just run deepintshield and pick your agent, model, and go.

What it does for you:

  • Automatically configures base URLs, API keys, and model settings for each agent
  • Fetches available models from your DeepIntShield gateway’s /v1/models endpoint
  • Installs missing agents via npm if needed
  • Auto-attaches DeepIntShield’s MCP server to Claude Code for tool access
  • Launches agents inside a persistent tabbed terminal UI so you can switch sessions without re-running the CLI
  • Shows per-tab activity badges so you can tell when a session is progressing, idle, or has sent an alert
  • Stores your selections securely (virtual keys go to your OS keyring, never plaintext on disk)
Terminal window
npx -y @maximhq/deepintshield-cli

This downloads and runs the latest DeepIntShield CLI. No global install required — npx handles everything.

Terminal window
npx -y @maximhq/deepintshield-cli --cli-version v1.0.0

Make sure your DeepIntShield gateway is running. The default is http://localhost:8080:

Terminal window
npx -y @maximhq/deepintshield

In another terminal:

To install

Terminal window
npx -y @maximhq/deepintshield-cli

If you have already installed run

Terminal window
deepintshield
CLI welcome screen

The CLI guides you through an interactive setup flow:

Step 1 — Base URL

Enter your DeepIntShield gateway URL. If you’re running locally, this is typically http://localhost:8080.

Step 2 — Virtual Key (optional)

If your DeepIntShield gateway has virtual key authentication enabled, enter your virtual key here. Otherwise, press Enter to skip.

Step 3 — Choose a Harness

Select which coding agent you want to launch. The CLI shows installation status and version for each:

HarnessBinaryProvider PathNotes
Claude Codeclaude/anthropicMCP auto-attach, worktree support
Codex CLIcodex/openaiSets OPENAI_BASE_URL to {base}/openai/v1; model override via --model
Gemini CLIgemini/genaiModel override via --model flag
Opencodeopencode/openaiCustom models configured automatically through generated OpenCode config

If a harness isn’t installed, the CLI will offer to install it via npm for you.

Step 4 — Select a Model

The CLI fetches available models from your DeepIntShield gateway and presents a searchable list. Type to filter, arrow keys to navigate:

Step 5 — Launch

Review your configuration in the summary screen. Press Enter to launch, or use the shortcut keys to adjust any setting:

KeyAction
EnterLaunch the harness
uChange base URL
vChange virtual key
hChange harness
mChange model
wSet worktree name (Claude Code only)
dOpen DeepIntShield dashboard
rOpen documentation
lToggle harness exit logs
iReport an issue on GitHub
sStar the repo on GitHub
qQuit

The CLI then launches your agent with all the correct environment variables and configuration set automatically.

After launch, DeepIntShield CLI keeps you inside a tabbed terminal UI instead of exiting after the first session. The bottom tab bar shows:

  • The DeepIntShield CLI label and current CLI version
  • One tab per running or recent agent session
  • A status badge for each tab:
    • 🧠 — the visible screen is actively changing, so the agent is still working
    • — the session looks idle and ready
    • 🔔 — the PTY emitted a real terminal alert

Use Ctrl+B at any time to focus the tab bar. From tab mode you can:

KeyAction
nOpen a new tab and launch another agent session
xClose the current tab
h / lMove left or right across tabs
1-9Jump directly to a tab
Esc / Enter / Ctrl+BReturn to the active session

The CLI stores its configuration at ~/.deepintshield/config.json. This file is created automatically on first run and updated when you change settings through the TUI.

{
"base_url": "http://localhost:8080",
"default_harness": "claude",
"default_model": "anthropic/claude-sonnet-4-5-20250929"
}
FieldDescription
base_urlYour DeepIntShield gateway URL
default_harnessLast used harness ID (claude, codex, gemini, opencode)
default_modelLast used model identifier
Terminal window
npx -y @maximhq/deepintshield-cli [flags]
FlagDescription
-config <path>Path to a custom config.json file
-no-resumeSkip resume flow and open fresh setup
-worktree <name>Create a git worktree for the session (Claude Code only)

Point the CLI to a project-specific config:

Terminal window
npx -y @maximhq/deepintshield-cli -config ./my-project/deepintshield.json

This is useful when working across multiple DeepIntShield gateways or projects with different configurations.

The CLI handles all environment variables, API keys, and provider-specific configuration automatically — you never need to set them yourself. To change your setup, use the shortcut keys from the summary screen:

KeyAction
hSwitch to a different harness (Claude Code, Codex, Gemini CLI, Opencode)
mPick a different model from the gateway’s available models
uChange the DeepIntShield gateway URL
vUpdate your virtual key
wSet worktree name (Claude Code only)
dOpen the DeepIntShield dashboard in your browser
rOpen the CLI documentation
lToggle harness exit logs
iReport an issue on GitHub
sStar the repo on GitHub
EnterLaunch with current settings
qQuit

When you switch harnesses, the CLI reconfigures everything for the new agent — base URLs, API keys, model flags, and any agent-specific setup. You can switch as many times as you like before launching.

DeepIntShield CLI applies two OpenCode-specific behaviors automatically:

  • Custom model selection: when you pick a model in DeepIntShield CLI, OpenCode is launched with the correct provider-qualified model reference and a generated OpenCode runtime config.
  • Theme handling: if your OpenCode tui.json already defines a theme, DeepIntShield preserves it. If not, DeepIntShield supplies the adaptive system theme so OpenCode does not fall back to its default dark-only appearance.

The CLI is designed for iterative development sessions:

  1. Launch — Select your agent and model, press Enter
  2. Work — Use your agent as normal, all traffic routes through DeepIntShield
  3. Switch — Press Ctrl+B any time to open the tab bar and jump to another session or start a new one
  4. Return — When an agent exits (or you quit it), the CLI returns to the chooser with your previous configuration intact
  5. Re-launch — Change model, switch harness, or re-launch the same setup instantly

Your last selections are remembered across sessions. The next time you run deepintshield, you’ll see the summary screen with your previous configuration ready to go. Press Enter to re-launch immediately, or adjust any setting.

Launch Claude Code in an isolated git worktree for parallel development:

Terminal window
npx -y @maximhq/deepintshield-cli -worktree feature-branch

Or select worktree mode from the TUI during the setup flow. The CLI passes the --worktree flag to Claude Code automatically.

When launching Claude Code, the CLI automatically registers DeepIntShield’s MCP server endpoint (/mcp) so all your configured MCP tools are available inside the agent.

If a virtual key is configured, the CLI sets up authenticated MCP access with the correct Authorization header — no manual claude mcp add-json commands needed.

For other harnesses, the CLI prints the MCP server URL so you can configure it manually in your agent’s settings.

The CLI needs npm to install harnesses. Make sure Node.js is installed:

Terminal window
node --version # Should be 18+
npm --version

If a harness was installed but the binary still isn’t found, you may need to restart your terminal or add npm’s global bin directory to your PATH:

Terminal window
# Check npm global bin path
npm config get prefix
# Add to PATH (add to ~/.zshrc or ~/.bashrc for persistence)
export PATH="$(npm config get prefix)/bin:$PATH"

If the model list doesn’t load, check that:

  1. Your DeepIntShield gateway is running and accessible at the configured base URL
  2. You have at least one provider configured in DeepIntShield
  3. If using virtual keys, your key has permission to list models

The CLI stores virtual keys in your OS keyring. On Linux, ensure gnome-keyring or kwallet is running. If keyring access fails, the CLI will log a warning but continue working — the key will need to be re-entered next session.

Gateway Setup

Set up a DeepIntShield gateway if you haven’t already

Open →

Provider Configuration

Configure AI providers in your DeepIntShield gateway

Open →

Virtual Keys

Set up authentication and usage limits

Open →

MCP Gateway

Configure MCP tools for your agents

Open →