Run AI coding CLIs from isolated Docker images while keeping your current workspace, tool caches, and agent configuration on the host.
This repo installs local shortcuts for:
agy(Antigravity)claudecodexcopilothermeskiroopencode
Each shortcut builds the matching Docker target when needed, mounts the current directory into the container, and then runs the requested agent command.
Install the wrapper and agent shortcuts:
git clone git@github.com:EricRobert/agent.git
cd agent
make installThe first install can take a while because each shortcut is checked with --version, which builds the corresponding Docker image if it is not already cached.
Run an agent from any project directory:
cd ~/src/my-project
agy
claude --help
codex
copilot "Explain this codebase"
hermes
kiro chat
opencode .The directory you run the command from is mounted at /home/$USER/workspace inside the container.
The base image includes a number of tools including:
- Go
- Node.js
- Python 3
Agent images add the corresponding CLI on top of that shared base image.
Config lives in this repo under agents/<name> and is symlinked into your home directory during install:
| Agent | Host config path |
|---|---|
| Antigravity | ~/.gemini/antigravity-cli |
| Claude | ~/.claude |
| Codex | ~/.codex |
| Copilot | ~/.copilot |
| Hermes | ~/.hermes |
| Kiro | ~/.kiro |
| OpenCode | ~/.opencode |
If a config path already exists and points somewhere else, make install leaves it alone and prints a make move.<agent> command.
Use that command when you want to copy the existing config into this repo and replace it with the symlink:
make move.claude
make move.codexAgent-local secrets and generated files are ignored by the checked-in .gitignore files inside the config directories.
The wrapper forwards these environment variables into the container when they are set on the host:
ANTHROPIC_API_KEYCOPILOT_GITHUB_TOKENGEMINI_API_KEYGITHUB_TOKENKIRO_API_KEYOPENAI_API_KEYOPENROUTER_API_KEY
It also sets BROWSER=echo, which is useful for device-code or remote login flows because the CLI prints the URL instead of trying to open a browser inside the container.
Claude, Codex, and Copilot start their interactive login flow the first time you launch them without existing credentials. Kiro needs an explicit login command. OpenCode uses the local provider configured in this repo, so no auth is required for the default setup.
Launch Antigravity and follow the first-run login prompts, or provide an API key:
export GEMINI_API_KEY="YOUR_KEY"
agyLaunch Claude and follow the first-run login prompts, or provide an API key:
export ANTHROPIC_API_KEY="YOUR_KEY"
claudeLaunch Codex and follow the first-run login prompts, or pipe in an API key:
export OPENAI_API_KEY="YOUR_KEY"
printenv OPENAI_API_KEY | codex login --with-api-keyLaunch Copilot and follow the first-run login prompts, or provide a token:
export GITHUB_TOKEN="YOUR_TOKEN"
copilotHermes is configured in agents/hermes/cli-config.yaml.
The default provider points at a local server on the host:
http://localhost:9052/v1
No auth is required for that default local setup.
To use a remote provider, run hermes model or set the relevant environment variable:
export OPENROUTER_API_KEY="YOUR_KEY"
hermesKiro needs an explicit login before use:
kiro login --use-device-flowYou can also provide a Kiro API key:
export KIRO_API_KEY="YOUR_KEY"
kiro chatOpenCode is configured in agents/opencode/opencode.json.
The default provider points at a local llama.cpp-compatible server on the host:
http://localhost:8080/v1
No auth is required for that default local setup.
Because containers run with --net host, a local server on that port is visible from inside the container.
To use an OpenAI-compatible remote provider instead, set the relevant environment variable and update the OpenCode config:
export OPENAI_API_KEY="YOUR_KEY"
opencodeOpenRouter is supported by OpenCode as a built-in provider. The recommended setup is to let OpenCode store the credential:
opencodeThen run /connect, choose OpenRouter, and paste your OpenRouter API key.
Each run mounts:
./from your current directory to/home/$USER/workspace~/.<agent>to/home/$USER/.<agent>~/.npm~/.cache/uv~/.cache/go-build~/.go/pkg/mod
Kiro also mounts:
~/.aws~/.local/share/kiro-cli
OpenCode also mounts:
~/.local/share/opencode