Skip to main content
Rigbox workspaces come with a full Linux environment, SSH access, and a managed AI proxy — making them a natural home for AI coding agents. Tools like Claude Code, Codex CLI, OpenCode, and Kilocode can use Rigbox credits without ever seeing a provider API key.

How It Works

Managed workspaces expose OPENROUTER_BASE_URL and OPENROUTER_API_KEY to every login shell. The bridge-local proxy at 172.16.0.1:9090 fronts OpenRouter, which in turn routes to the appropriate upstream provider for whatever model you ask for. Your credits cover the usage; provider API keys stay outside the VM. The four catalog recipes — claude, codex, opencode, kilocode — each ship a small /etc/profile.d/*-routing.sh shim that translates OPENROUTER_* into whatever env vars that particular agent prefers (Anthropic shape for Claude Code, OpenAI shape for Codex, the native OpenRouter env vars for OpenCode, and the Kilo provider env vars for Kilocode). You don’t need to know which one you’re getting — install the recipe and it just works.

Supported Tools

Quick Setup

For the four supported recipes, one call is all you need:
This drops the binary into $PATH, writes the per-agent routing shim into /etc/profile.d/, and exits — there’s no service to wait on. SSH into the workspace and invoke the agent directly. See Catalog Apps → CLI-shape recipes for the routing details and equivalent API call.

Manual install (for tools without a catalog recipe)

For Gemini CLI and Aider, install the package yourself:
Managed workspaces export OPENROUTER_BASE_URL and OPENROUTER_API_KEY at login, so most OpenRouter-aware tools just work. For tools that prefer provider-native env vars (e.g. ANTHROPIC_BASE_URL, OPENAI_BASE_URL), run eval "$(rig proxy on)" to print compatibility exports for your current shell.

Start coding

Use the dev or full image for AI coding tools. They include build toolchains that coding agents often need (compilers, linters, test runners).

Tool-Specific Setup

Claude Code

rig recipe app install -r @rigbox/claude@builtin writes a profile.d shim that points ANTHROPIC_BASE_URL at the proxy’s /v1/messages Anthropic passthrough and sets ANTHROPIC_API_KEY to a managed placeholder. After SSH-ing in, just run:
Claude Code can edit files, run shell commands, manage git, and run tests inside the workspace. Since each workspace is an isolated VM, there’s no risk of the agent affecting other projects.
Claude Code uses Claude Sonnet by default. To use Opus, pass --model claude-opus-4-20250514. Credit consumption is higher for Opus.

Codex CLI

rig recipe app install -r @rigbox/codex@builtin configures the agent to route through OpenAI-shape requests to OpenRouter, picking up OPENAI_BASE_URL / OPENAI_API_KEY from the routing shim:

OpenCode

OpenCode reads OPENROUTER_API_KEY natively, so the catalog install only needs to drop the binary in place:

Kilo Code

rig recipe app install -r @rigbox/kilocode@builtin writes a shim that maps OPENROUTER_* to the KILO_* environment variables the agent expects:

Gemini CLI

Gemini CLI doesn’t have a catalog recipe yet — install with npm install -g @google/gemini-cli. It reads GOOGLE_API_KEY or a configured base URL from the environment; run eval "$(rig proxy on)" to export equivalent variables in your current shell, then start the agent:

Aider

Aider supports multiple providers and reads provider-native env vars. Run rig proxy on first to export them, then choose a model:

Automate with Setup Scripts

If you want every new workspace to come pre-loaded with a coding agent, attach a setup script that calls the catalog (preferred — it picks up the routing shim) or installs the package directly:

Monitor Credit Usage

AI coding tools can consume credits quickly — especially agentic tools that make many API calls in a loop. Monitor your balance:
For programmatic access (e.g. polling from a CI job), see Get Credits.
Agentic tools like Claude Code and Codex can make dozens of API calls per task. A single complex refactoring session might use 50-200 credits depending on the model and codebase size. Monitor your balance if you’re on the free tier.

BYOK Alternative

If you burn through managed credits quickly, switch to BYOK mode and use your own API keys for unlimited usage. Flip the workspace mode, then set your provider key as a workspace environment variable:
Then run eval "$(rig proxy on)" again to update the environment.

Why Rigbox for AI Coding

Next Steps