container-use

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2025 License: Apache-2.0

README ยถ

container-use

Containerized environments for coding agents. (๐Ÿ“ฆ๐Ÿค–) (๐Ÿ“ฆ๐Ÿค–) (๐Ÿ“ฆ๐Ÿค–)

Experimental Discord

Container Use lets each of your coding agents have their own containerized environment. Go from babysitting one agent at a time to enabling multiple agents to work safely and independently with your preferred stack. Check out the Container Use playlist to see examples of how others are using it.

container-use demo

It's an open-source MCP server that works as a CLI tool with Claude Code, Cursor, and other MCP-compatible agents.

  • ๐Ÿ“ฆ Isolated Environments: Each agent gets a fresh container in its own git branch - run multiple agents without conflicts, experiment safely, discard failures instantly.
  • ๐Ÿ‘€ Real-time Visibility: See complete command history and logs of what agents actually did, not just what they claim.
  • ๐Ÿš Direct Intervention: Drop into any agent's terminal to see their state and take control when they get stuck.
  • ๐ŸŽฎ Environment Control: Standard git workflow - just git checkout <branch_name> to review any agent's work.
  • ๐ŸŒŽ Universal Compatibility: Works with any agent, model, or infrastructure - no vendor lock-in.

๐Ÿฆบ This project is in early development and actively evolving. Expect rough edges, breaking changes, and incomplete documentation. But also expect rapid iteration and responsiveness to feedback. Please submit issues and/or reach out to us on Discord in the #container-use channel.


Quick Start

Install

# macOS (recommended)
brew install dagger/tap/container-use

# All platforms
curl -fsSL https://raw.githubusercontent.com/dagger/container-use/main/install.sh | bash

Setup with Your Agent

Container Use works with any MCP-compatible agent. The setup is always the same: add container-use stdio as an MCP server.

๐Ÿ‘‰ Complete setup guide for all agents (Cursor, Goose, VSCode, etc.)

Example with Claude Code:

# Add Container Use MCP server
cd /path/to/repository
claude mcp add container-use -- container-use stdio

# Add agent rules (optional)
curl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md >> CLAUDE.md
๐Ÿ’ก Command Shortcut

The container-use command is also available as cu for convenience. Both commands work identically:

  • container-use stdio (used in documentation)
  • cu stdio (shortcut)

Try It

Ask your agent to create something:

Create a hello world app in python using flask

Your agent will work in an isolated environment and give you URLs to view the app and explore the code!

How it Works

container-use is an Model Context Protocol server that provides Environments to an agent. Environments are an abstraction over containers and git branches powered by dagger and git worktrees. For more information, see environment/README.md.

Directories ยถ

Path Synopsis
cmd
container-use command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL