Gateway Setup
Set up a DeepIntShield gateway if you haven’t already
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:
/v1/models endpointnpx -y @maximhq/deepintshield-cliThis downloads and runs the latest DeepIntShield CLI. No global install required — npx handles everything.
npx -y @maximhq/deepintshield-cli --cli-version v1.0.0Make sure your DeepIntShield gateway is running. The default is http://localhost:8080:
npx -y @maximhq/deepintshieldIn another terminal:
To install
npx -y @maximhq/deepintshield-cliIf you have already installed run
deepintshield
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:
| Harness | Binary | Provider Path | Notes |
|---|---|---|---|
| Claude Code | claude | /anthropic | MCP auto-attach, worktree support |
| Codex CLI | codex | /openai | Sets OPENAI_BASE_URL to {base}/openai/v1; model override via --model |
| Gemini CLI | gemini | /genai | Model override via --model flag |
| Opencode | opencode | /openai | Custom 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:
| Key | Action |
|---|---|
Enter | Launch the harness |
u | Change base URL |
v | Change virtual key |
h | Change harness |
m | Change model |
w | Set worktree name (Claude Code only) |
d | Open DeepIntShield dashboard |
r | Open documentation |
l | Toggle harness exit logs |
i | Report an issue on GitHub |
s | Star the repo on GitHub |
q | Quit |
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:
DeepIntShield CLI label and current CLI version🧠 — the visible screen is actively changing, so the agent is still working✅ — the session looks idle and ready🔔 — the PTY emitted a real terminal alertUse Ctrl+B at any time to focus the tab bar. From tab mode you can:
| Key | Action |
|---|---|
n | Open a new tab and launch another agent session |
x | Close the current tab |
h / l | Move left or right across tabs |
1-9 | Jump directly to a tab |
Esc / Enter / Ctrl+B | Return 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"}| Field | Description |
|---|---|
base_url | Your DeepIntShield gateway URL |
default_harness | Last used harness ID (claude, codex, gemini, opencode) |
default_model | Last used model identifier |
npx -y @maximhq/deepintshield-cli [flags]| Flag | Description |
|---|---|
-config <path> | Path to a custom config.json file |
-no-resume | Skip 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:
npx -y @maximhq/deepintshield-cli -config ./my-project/deepintshield.jsonThis 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:
| Key | Action |
|---|---|
h | Switch to a different harness (Claude Code, Codex, Gemini CLI, Opencode) |
m | Pick a different model from the gateway’s available models |
u | Change the DeepIntShield gateway URL |
v | Update your virtual key |
w | Set worktree name (Claude Code only) |
d | Open the DeepIntShield dashboard in your browser |
r | Open the CLI documentation |
l | Toggle harness exit logs |
i | Report an issue on GitHub |
s | Star the repo on GitHub |
Enter | Launch with current settings |
q | Quit |
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:
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:
Ctrl+B any time to open the tab bar and jump to another session or start a new oneYour 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:
npx -y @maximhq/deepintshield-cli -worktree feature-branchOr 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:
node --version # Should be 18+npm --versionIf 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:
# Check npm global bin pathnpm 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:
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.