Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Agent Environment

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)
  • claude
  • codex
  • copilot
  • hermes
  • kiro
  • opencode

Each shortcut builds the matching Docker target when needed, mounts the current directory into the container, and then runs the requested agent command.

Quick Start

Install the wrapper and agent shortcuts:

git clone git@github.com:EricRobert/agent.git
cd agent
make install

The 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.

Included Tools

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.

Configuration

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.codex

Agent-local secrets and generated files are ignored by the checked-in .gitignore files inside the config directories.

Authentication

The wrapper forwards these environment variables into the container when they are set on the host:

  • ANTHROPIC_API_KEY
  • COPILOT_GITHUB_TOKEN
  • GEMINI_API_KEY
  • GITHUB_TOKEN
  • KIRO_API_KEY
  • OPENAI_API_KEY
  • OPENROUTER_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.

Antigravity

Launch Antigravity and follow the first-run login prompts, or provide an API key:

export GEMINI_API_KEY="YOUR_KEY"
agy

Claude

Launch Claude and follow the first-run login prompts, or provide an API key:

export ANTHROPIC_API_KEY="YOUR_KEY"
claude

Codex

Launch 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-key

Copilot

Launch Copilot and follow the first-run login prompts, or provide a token:

export GITHUB_TOKEN="YOUR_TOKEN"
copilot

Hermes

Hermes 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"
hermes

Kiro

Kiro needs an explicit login before use:

kiro login --use-device-flow

You can also provide a Kiro API key:

export KIRO_API_KEY="YOUR_KEY"
kiro chat

OpenCode

OpenCode 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"
opencode

OpenRouter

OpenRouter is supported by OpenCode as a built-in provider. The recommended setup is to let OpenCode store the credential:

opencode

Then run /connect, choose OpenRouter, and paste your OpenRouter API key.

Mounted Host Paths

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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages