Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rigbox.dev/llms.txt

Use this file to discover all available pages before exploring further.

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

ToolCatalog recipeProviderWhat it does
Claude CodeclaudeAnthropicAgentic coding assistant that edits files, runs commands, and manages git. Uses the /v1/messages Anthropic passthrough.
Codex CLIcodexOpenAITerminal-based AI agent for code generation and refactoring.
OpenCodeopencodeAny (via OpenRouter)Open-source terminal coding agent.
Kilo CodekilocodeAny (via OpenRouter)Terminal-first agent with planner / executor split.
Gemini CLIGoogleGoogle’s terminal AI assistant. Install manually with npm.
AiderAnyAI pair programming in your terminal. Install manually with pip.

Quick Setup

For the four supported recipes, one call is all you need:
rig catalog install --item claude --workspace <WORKSPACE_NAME>     # or: codex, opencode, kilocode
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:
npm install -g @google/gemini-cli
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

claude
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 catalog install --item claude 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
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 catalog install --item codex configures the agent to route through OpenAI-shape requests to OpenRouter, picking up OPENAI_BASE_URL / OPENAI_API_KEY from the routing shim:
codex "add error handling to the API routes in src/routes/"

OpenCode

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

Kilo Code

rig catalog install --item kilocode writes a shim that maps OPENROUTER_* to the KILO_* environment variables the agent expects:
kilocode

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:
eval "$(rig proxy on)"
gemini

Aider

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

# Use with Anthropic
aider --model claude-sonnet-4-20250514

# Use with OpenAI
aider --model gpt-4o

# Use with Google
aider --model gemini/gemini-2.5-pro

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:
#!/bin/bash
# One-line catalog install (run from inside the workspace)
rig catalog install --item claude

# Or, for tools without a catalog recipe:
pip install aider-chat

Monitor Credit Usage

AI coding tools can consume credits quickly — especially agentic tools that make many API calls in a loop. Monitor your balance:
rig status
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:
curl -X PUT https://api.rigbox.dev/api/v1/workspaces/{workspace_id}/ai-config \
  -H "Authorization: Bearer $RIGBOX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "byok", "provider": "anthropic", "api_key": "sk-ant-..."}'
Then run eval "$(rig proxy on)" again to update the environment.

Why Rigbox for AI Coding

BenefitDetail
Isolated environmentAgents can run commands, install packages, and modify files without affecting your local machine
No key managementManaged credits mean zero API key configuration
Full Linux VMBuild tools, compilers, databases - everything agents need is available
SSH accessWork alongside the agent: SSH in to review changes, run tests, or pair-program
SnapshotsSnapshot before a big refactor, restore if the agent goes sideways

Next Steps