aicage
Run your favorite AI coding agents comfortably in Docker.
Why use aicage?
Agents need deep access (read code, run shells, install deps). Their built-in safety checks are naturally limited.
Running agents in containers gives a hard boundary - while the experience stays the same. See Why cage agents? for the full rationale.
First-time quick start
-
Prerequisites:
- Docker
- Python 3.10+ and
pipx
-
Install:
pipx install aicage
-
Navigate to your project directory and run:
aicage <agent>
This opens the default Textual configuration UI where you can review and adjust the setup before starting.
-
Built-in agent examples:
aicage claude aicage codex aicage copilot aicage crush aicage droid aicage gemini aicage goose aicage opencode aicage qwen
If you want the fastest no-menu first run, use:
aicage --menu none <agent>
--menu none accepts suggested defaults and skips interactive menus.
Menu modes
aicage <agent>uses the default Textual configuration UI.aicage --menu simple <agent>uses the classic line-based prompt menu.aicage --menu none <agent>skips menus and uses defaults.
Run aicage <agent> again whenever you want to review or change the saved config for that agent in the current
project.
Use --config remove only when you want to reset the saved config completely.
-
Show project config path and contents:
aicage --config info
-
Remove config if needed:
aicage --config remove aicage --config remove <agent>
Full documentation
The complete user documentation lives in the wiki: aicage.wiki
Common scenarios
- Pass arguments to the agent:
aicage <agent> resume <session-id>
- Share additional host folders:
aicage --share ~/.m2 <agent>aicage --share /path/to/data:ro <agent>- Extensions can also define extra shares (host mounts).
- Let the agent use Docker:
aicage --docker <agent>
- Set environment variables:
aicage -e FOO=bar -- <agent>
- Use proxies:
aicageforwardsHTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXY.- See CLI options.
- Use host networking or custom networks:
- See Host networking.
- On Windows with a Linux container/WSL workspace:
- set
git config --global core.autocrlf trueon the Windows host to avoid line-ending diffs.
- set
- Run into first-use setup issues:
- See Known hiccups.
- Add custom tools/agents/base images:
Built-in agents
| CLI | Agent | Homepage |
|---|---|---|
| claude | Claude Code | https://claude.com/product/claude-code |
| codex | Codex CLI | https://developers.openai.com/codex/cli |
| copilot | GitHub Copilot CLI | https://github.com/features/copilot/cli |
| crush | Crush | https://github.com/charmbracelet/crush |
| droid | Factory CLI | https://factory.ai/product/cli |
| gemini | Gemini CLI | https://geminicli.com |
| goose | Goose CLI | https://goose-docs.ai |
| opencode | OpenCode | https://opencode.ai |
| qwen | Qwen Code | https://qwenlm.github.io/qwen-code-docs |
Your existing CLI config for each agent is mounted inside the container so you can keep using your preferences and credentials.
Customization
aicage lets you customize images at three levels: extensions, agents, and base images. The sample repo is a fast
way to see working examples and copy a template.
Quick start:
git clone https://github.com/aicage/aicage-custom-samples.git $HOME/.aicage-custom
Then run any agent:
aicage <agent>
These are only samples. Use them to learn the structure, then replace or edit them with your own definitions.
aicage detects whatever you place under ~/.aicage-custom and offers it during selection.
Extensions can install tools and request additional host mounts.
After adding or changing custom definitions, restart aicage.
If your project is already configured for an agent, rerun aicage <agent> to review or change that saved config.
Use aicage --config remove only to reset the whole project config, or aicage --config remove <agent> to reset a
single agent entry. Use aicage --config to inspect the current config.
- Extensions: Customization-Extensions
- Custom agents: Customization-Agents
- Custom base images: Customization-Base-Images
Image updates are handled automatically; see Updates.
aicage options
--dry-runprints the composeddocker runcommand without executing it.--menu textual|simple|noneselects the Textual menu, the simple line-based menu, or no menu.--dockermounts/run/docker.sockinto the container to enable Docker-in-Docker workflows.--share <path>mounts a host path into the container at the same path. Repeatable; add:rofor read-only.- Extensions can also request grouped host mounts during setup.
--configprints the project config path and its contents.--config remove [<agent>]removes the full project config or only one agent entry.
Configuration file formats are documented in CONFIG.md. Extension authoring is documented in doc/extensions.md.
Why cage agents?
AI coding agents read your code, run shells, install packages, and edit files. That power is useful, but granting it directly on the host expands your risk surface.
Where built-in safety is limited:
- Allow/deny lists only cover known patterns; unexpected commands or attack paths can slip through.
- Some agents work fully only after relaxing their own safety modes, broadening what they can touch.
- “Read-only project” features are software rules. Other projects and files still sit alongside them on the same host.
How aicage mitigates this:
- Containers create a hard boundary: the agent can access only what you explicitly mount. Day-to-day use stays familiar—just with the host kept out of reach.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aicage-1.4.1.tar.gz.
File metadata
- Download URL: aicage-1.4.1.tar.gz
- Upload date:
- Size: 79.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e483385d707df6e8a851582cc4d9eae28eb9014737078468bb0842adbca3f54f
|
|
| MD5 |
836ab31424cb76ceb8d6d653cff53e1b
|
|
| BLAKE2b-256 |
47adde9d1b65fba86fab2435eb1ceceb0c2da24969a49b5fa86307154c93d9aa
|
Provenance
The following attestation bundles were made for aicage-1.4.1.tar.gz:
Publisher:
release.yml on aicage/aicage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aicage-1.4.1.tar.gz -
Subject digest:
e483385d707df6e8a851582cc4d9eae28eb9014737078468bb0842adbca3f54f - Sigstore transparency entry: 2178532922
- Sigstore integration time:
-
Permalink:
aicage/aicage@50160ceb4dcf922462b1700b977f3227a54a6ea4 -
Branch / Tag:
refs/tags/1.4.1 - Owner: https://github.com/aicage
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@50160ceb4dcf922462b1700b977f3227a54a6ea4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aicage-1.4.1-py3-none-any.whl.
File metadata
- Download URL: aicage-1.4.1-py3-none-any.whl
- Upload date:
- Size: 161.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
599d0b43cdfed99a72c40bb9f539359acffffff20f97485f64fbcc943e8cc10e
|
|
| MD5 |
18d7d26f992efff79ec688ea828ac108
|
|
| BLAKE2b-256 |
22028f70ad5d0b824338f99b9fb4ef7bc9028eabce00da85d5f535837ef5714c
|
Provenance
The following attestation bundles were made for aicage-1.4.1-py3-none-any.whl:
Publisher:
release.yml on aicage/aicage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aicage-1.4.1-py3-none-any.whl -
Subject digest:
599d0b43cdfed99a72c40bb9f539359acffffff20f97485f64fbcc943e8cc10e - Sigstore transparency entry: 2178532955
- Sigstore integration time:
-
Permalink:
aicage/aicage@50160ceb4dcf922462b1700b977f3227a54a6ea4 -
Branch / Tag:
refs/tags/1.4.1 - Owner: https://github.com/aicage
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@50160ceb4dcf922462b1700b977f3227a54a6ea4 -
Trigger Event:
push
-
Statement type: