Wagner
Multi-repo task manager for agents sessions. Orchestrates multiple Claude instances across git worktrees with tmux.
Overview
Wagner solves the problem of managing multiple Claude Code sessions when working on tasks that span multiple repositories. It:
- Creates isolated git worktrees for each task
- Manages tmux sessions with multiple panes
- Sets up Claude Code hooks for status tracking
- Provides a unified view of all active sessions
Installation
Quick install (Linux/macOS)
|
From crates.io
With Nix
With devbox
Add to your devbox.json:
From source
# Binary at ./target/release/wagner
Quick Start
1. Create a task
# From inside a git repo - just provide a name
# Creates worktree with branch task/my-feature
# Specify custom branch with -b
# Multi-repo tasks use --repos
This will:
- Create a task folder at
~/tasks/my-feature/ - Create git worktrees for each repo
- Set up Claude Code hooks in each worktree
- Create a tmux session
wagner_my-feature
2. List tasks
Output:
my-feature 3 repos (2h ago) /home/user/tasks/my-feature
another-task 1 repo (3d ago) /home/user/tasks/another-task
3. Attach to a task
# Explicit
# Auto-detect from cwd (when inside a task directory)
4. Add more Claude panes
# Auto-detect task from cwd
# Explicit task and repo
5. Delete a task
# Removes worktrees, keeps branches
# Also deletes the branches
Repo Specification Format
Repos are specified as name:source:branch where:
- name: Display name for the repo within the task
- source: Either a local path or git URL
- Local:
/path/to/repoor~/repos/myrepo - Remote:
https://github.com/user/repo.gitorgit@github.com:user/repo.git
- Local:
- branch: Branch name for the worktree (default:
main)
Examples:
# Local repo, custom branch
# Local repo, default branch (main)
# Remote repo (will be cloned)
Configuration
Config is stored at $XDG_CONFIG_HOME/wagner/config.json (or ~/.config/wagner/config.json).
- tasks_root: Where task folders are created (default:
~/tasks) - default_agent: Agent to use (currently only
claudesupported)
Directory Structure
When you create a task, Wagner creates:
~/tasks/my-feature/
├── .wagner/
│ └── task.json # Task metadata
├── frontend/ # Git worktree
│ └── .claude/
│ └── settings.json # Claude hooks
├── backend/ # Git worktree
│ └── .claude/
│ └── settings.json
└── shared/ # Git worktree
└── .claude/
└── settings.json
Commands
| Command | Description |
|---|---|
wagner |
Launch TUI |
wagner new <name> |
Create task from current repo (auto branch: task/<name>) |
wagner new <name> -b <branch> |
Create task with specific branch |
wagner new <name> --repos <specs> |
Create multi-repo task |
wagner list |
List all tasks with age |
wagner attach [task] |
Attach to tmux session (auto-detects from cwd) |
wagner add [task] [repo] |
Add Claude pane (auto-detects from cwd) |
wagner delete <task> [--force] |
Delete task (--force removes branches) |
wagner completions zsh |
Generate zsh completions |
Shell Completions
Add to your ~/.zshrc:
This enables tab completion for commands and task names (dynamically fetched).
Workflow Example
# Single repo workflow
# Multi-repo workflow
Architecture
Wagner uses a hexagonal architecture with swappable backends:
- Terminal trait: Currently
Tmux, futureGhostty - Agent trait: Currently
ClaudeCode, extensible to other agents
Development
# Enter dev environment
# Build
# Run tests
# Check
# Format
# Lint
License
MIT