How It Works
Managed workspaces exposeOPENROUTER_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
Recommended: install via the catalog
For the four supported recipes, one call is all you need:$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: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
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 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 readsOPENROUTER_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 withnpm 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. Runrig 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: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:eval "$(rig proxy on)" again to update the environment.
Why Rigbox for AI Coding
Next Steps
- Managed AI Proxy - how the OpenRouter-backed proxy and credit system work in detail
- App Catalog → CLI-shape recipes - what each recipe installs and how the routing shims translate env vars
- Rigbox CLI - manage workspaces, apps, and recipes from the terminal
- Bring Your Own Keys - use your own API keys for unlimited usage
- Setup Scripts - automate tool installation across workspaces
- Images & Templates - choose the right base image for coding