1 unstable release
Uses new Rust 2024
| 0.1.0 | Mar 17, 2026 |
|---|
#2492 in Development tools
24KB
277 lines
ai-yolo
Run Claude Code in YOLO mode inside a sandboxed Dagger container with full Nix support.
What it does
ai-yolo builds an Alpine-based container with Nix and Claude Code pre-installed, mounts your project directory, and runs Claude Code with --dangerously-skip-permissions so the AI agent can freely modify files, run commands, and iterate on your codebase — all inside an isolated container.
Key features:
- Sandboxed execution — Claude runs inside a Dagger container, not on your host
- Nix support — full
nix-commandandflakesenabled inside the container - Branch isolation — automatically creates a new git branch for AI changes
- Credential forwarding — mounts your
~/.claudecredentials into the container
Installation
cargo install ai-yolo
Usage
Run Claude Code against your project
# Use a prompt file (default: prompt.md in project root)
ai-yolo run
# Use an inline prompt
ai-yolo run --prompt "Fix all clippy warnings and add tests"
# Specify a project directory and prompt file
ai-yolo run --project /path/to/project --prompt-file tasks/refactor.md
# Pass extra environment variables
ai-yolo run --env ANTHROPIC_API_KEY=sk-...
# Skip branch isolation
ai-yolo run --no-branch --prompt "Update dependencies"
Build the container image
ai-yolo build
ai-yolo build --output my-image.tar
Prerequisites
- Dagger CLI installed and running
- Claude Code credentials configured (
claude /loginon the host) - Git repository (for branch isolation features)
How branch isolation works
By default, ai-yolo run will:
- Verify the working tree is clean
- Create a new branch
ai-yolo/<timestamp>from the current branch - Run Claude Code inside the container
- Commit any changes Claude made
- Switch back to your original branch
You can then review and merge the changes at your leisure. Use --no-branch to skip this and run directly on the current branch.
License
MIT
Dependencies
~20–39MB
~517K SLoC