Skip to main content

Runs agentic coding assistants in docker containers

Project description

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.

Quickstart

  • Prerequisites:

    • Docker
    • Python 3.10+ and pipx
  • Install:

    pipx install aicage
    
  • Navigate to your project directory.

  • Use one of these commands:

    aicage cline
    aicage codex
    aicage copilot
    aicage gemini
    aicage goose
    aicage opencode
    aicage qwen
    

Base images

The first run asks which base image to use; pick Ubuntu or whatever matches your Linux distro.

Base Distro Notes
ubuntu Ubuntu Good default for most users
debian Debian For Debian users
fedora Fedora For RedHat/Fedora users
alpine Alpine Minimal footprint; experimental
node Ubuntu Official Node image (all base images have Node)
act Ubuntu Default runner image from act (act runs GitHub Actions locally)

All base images have the same stack of tools installed.

Agents

CLI Agent Homepage
cline Cline CLI https://docs.cline.bot/cline-cli
codex Codex CLI https://developers.openai.com/codex/cli
copilot GitHub Copilot CLI https://github.com/features/copilot/cli
gemini Gemini CLI https://geminicli.com
goose Goose CLI https://block.github.io/goose
opencode OpenCode https://qwenlm.github.io/qwen-code-docs
qwen Qwen Code https://opencode.ai

Your existing CLI config for each tool is mounted inside the container so you can keep using your preferences and credentials.

aicage options

  • --dry-run prints the composed docker run command without executing it.
  • --entrypoint PATH mounts a custom entrypoint script to /usr/local/bin/entrypoint.sh.
  • --docker mounts /run/docker.sock into the container to enable Docker-in-Docker workflows.
  • --config print prints the project config path and its contents.

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

Development info

More details are in DEVELOPMENT.md.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aicage-0.2.7.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aicage-0.2.7-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file aicage-0.2.7.tar.gz.

File metadata

  • Download URL: aicage-0.2.7.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aicage-0.2.7.tar.gz
Algorithm Hash digest
SHA256 a52dc06a4c378d712c94f77d40b6d464a94931421adb1d6cf34dd3418c28ad2f
MD5 20b28d1478842fc12021d499591879a0
BLAKE2b-256 18d26191ebd482d605b48b395a7322fb1dd3c1384933ce7277174dc36df4017a

See more details on using hashes here.

Provenance

The following attestation bundles were made for aicage-0.2.7.tar.gz:

Publisher: publish.yml on aicage/aicage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aicage-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: aicage-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aicage-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f894ccbacca51fc8d76363783ae23c5e6f7c870ba2adc2dba51817d694bb2d3a
MD5 1bad26f8f9830a253ec4b1b74c114b71
BLAKE2b-256 f81152b466b4953514a48b874d659d7a606daf46288e7b07d4749733735220cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for aicage-0.2.7-py3-none-any.whl:

Publisher: publish.yml on aicage/aicage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page