A CLI tool for launching agent workspaces with configurable profiles. Supports Docker containers, git worktrees, zellij sessions, and combinations thereof.
curl -fsSL https://raw.githubusercontent.com/hiragram/agent-workspace/main/install.sh | bashThis downloads the binary to ~/.local/bin/.
go install github.com/hiragram/agent-workspace@latest# Run the default profile
aw
# Run a specific profile
aw <profile-name>
# Self-update
aw update
# Show version
aw --versionDetailed Configuration Guide -- Full reference for all options, validation rules, and examples.
Create .agent-workspace.yml in your git repository root:
default: worktree-zellij
profiles:
# Run Claude Code inside a Docker container
claude:
environment: docker
launch: claude
# Create a worktree and open a shell
worktree-shell:
worktree:
base: origin/main
environment: host
launch: shell
# Create a worktree and run Claude on host
worktree-claude:
worktree: {}
environment: host
launch: claude
# Create a worktree, mount in Docker, run Claude
worktree-docker:
worktree: {}
environment: docker
launch: claude
# Create a worktree with a full zellij dev environment
worktree-zellij:
worktree: {}
environment: docker
launch: zellij
zellij:
layout: defaultIf no .agent-workspace.yml is found, aw uses a built-in default that creates a worktree and starts a zellij dev environment with Docker-based Claude (equivalent to worktree-zellij above).
worktree(optional): Creates a git worktree.base— base ref for the new worktree. Defaults toorigin/main.dir— directory under which worktrees are created. Defaults to<repoRoot>/worktrees. Supports~expansion; relative paths are resolved against the repo root.on-create/on-end— shell hooks run after the worktree is created / after the launched process exits.
environment(required):"host"or"docker"— where the main process runs.launch(required):"shell","claude", or"zellij"— what to launch.zellij(optional): Zellij session config. Only valid withlaunch: zellij.
Any profile field can also be declared at the top level of the config. Top-level values act as defaults for every profile, and each profile overrides them field-by-field (sub-structs like worktree and zellij are merged, not replaced):
default: worktree-zellij
# Shared by every profile below
worktree:
base: origin/main
dir: ~/.aw/worktrees
environment: host
profiles:
shell:
launch: shell # inherits worktree + environment from top level
docker-claude:
environment: docker # overrides only environment
launch: claude
worktree:
dir: /tmp/aw-worktrees # overrides only worktree.dir; base is inheritedOn first run with environment: docker:
- Builds a lightweight Docker image (Debian slim + git + curl + Node.js + gh)
- Installs Claude Code into a persistent Docker volume
- Prompts you to log in via OAuth (browser-based)
On subsequent runs, it starts instantly with your existing authentication and settings.
The following files from ~/.claude/ are synced into the container on each launch:
settings.json- Claude Code configurationCLAUDE.md- global instructionshooks/- custom hook scriptsplugins/- installed plugins and skillscommands/- custom slash commandsagents/- custom agent definitions
These are copied to ~/.agent-workspace/ to avoid conflicts with the host-side Claude Code (which uses macOS Keychain for credentials).
| Path | Purpose |
|---|---|
~/.agent-workspace/ |
Container-side Claude config (credentials, settings copy) |
~/.agent-workspace.json |
Onboarding state |
Docker volume claude-code-local |
Claude Code installation (persists auto-updates) |
# Remove binary
rm ~/.local/bin/aw
# Remove data
rm -rf ~/.agent-workspace ~/.agent-workspace.json
docker rmi claude-code-docker
docker volume rm claude-code-local# Run tests
go test ./...
# Build
go build -o aw .
# Lint
golangci-lint runThese tools must be installed on the host and available on PATH.
| Tool | When needed | Purpose |
|---|---|---|
git |
worktree profiles |
Worktree creation, repo root detection, remote fetch |
docker |
environment: docker profiles |
Build image, create volume, run container |
zellij |
launch: zellij profiles |
Multi-pane session |
When launch: zellij is used, the layout spawns helper panes that shell out to the following tools. Install the ones for the panes you actually use.
git-diff-picker pane — interactive diff viewer
fzf— fuzzy picker (listen mode)delta— side-by-side diff rendererlsof— free-port detection for the fzf listen servercurl— posts reload commands to the fzf server
pr-status pane — current branch's PR status
gh(GitHub CLI) — fetches PR info and checksjq— parses PR JSON
plans-watcher pane — live Markdown preview of plans/
fswatchorentr— file-change watcher (either works; fswatch preferred)glow(optional) — Markdown renderer; falls back tocatif missing
These are installed automatically inside the Docker image; you do not need them on the host. Listed here so you know what's available inside environment: docker containers.
- Base: Debian bookworm-slim
git,curl,wget,ca-certificates,openssh-client,sudo,setprivpython3,python3-pip,python3-venvgh(GitHub CLI)- Node.js 22,
corepack,pnpm - Go 1.23.6
gpg/gpg-agent— only if you sign git commits- SSH keys /
ssh-agent— only if you push/pull over SSH