GitHub - smtg-ai/claude-squad: Manage multiple AI terminal agents like Claude Code, Aider, Codex, OpenCode, and Amp.
Key Points
- 1Claude Squad is a terminal application designed to manage multiple AI terminal agents such as Claude Code, Aider, and Codex, enabling users to work on diverse tasks simultaneously within separate workspaces.
- 2It offers features like background task execution, centralized instance management in a single terminal, and pre-application change review, with each task benefiting from an isolated Git workspace.
- 3The system operates by utilizing `tmux` for creating isolated terminal sessions and `git worktrees` to provide independent codebases for each project, all accessible through a simple TUI.
Claude Squad is a terminal application designed to manage and orchestrate multiple AI terminal agents, such as Claude Code, Aider, Codex, Gemini, and local agents, by providing isolated workspaces for concurrent task execution. It addresses the challenge of managing multiple AI-driven coding tasks simultaneously within a single terminal interface.
The core methodology of Claude Squad relies on the strategic integration of two fundamental command-line tools: tmux and git worktrees, complemented by a simple Text-based User Interface (TUI).
tmuxfor Session Isolation and Background Execution: Claude Squad utilizestmux(terminal multiplexer) to establish an isolated and persistent terminal session for each AI agent instance or task. When a new task or agent is initiated (e.g., viacs -p "aider..."), Claude Squad creates a dedicatedtmuxsession. This allows each AI agent to run its operations (like code generation, debugging, or refactoring) in the background, independent of the user's primary terminal window. Users can attach to or detach from these sessions, re-prompt agents, and monitor progress without interrupting other ongoing tasks. This architecture facilitates the "complete tasks in the background" and "manage instances and tasks in one terminal window" features.
git worktreesfor Codebase Isolation and Conflict Prevention: To ensure that each AI agent operates on its own dedicated codebase without conflicts, Claude Squad employsgit worktrees. For every new task or agent instance, a distinctgit worktreeis created, linked to the main Git repository. Each worktree is associated with its own isolated Git branch. This means that changes made by one AI agent within its session are confined to its specific branch and worktree, preventing accidental modifications or conflicts with other agents' work or the project's main development line. This mechanism directly supports the feature "Each task gets its own isolated git workspace, so no conflicts" and enables users to "review changes before applying them" and "checkout changes before pushing them" from a clean, isolated state.
- TUI for Navigation and Management: A simple Text-based User Interface (TUI) overlays these backend processes, providing an intuitive interface for users to navigate between active sessions, create new ones, attach to existing sessions, kill sessions, and perform Git operations like committing, pushing, and checking out changes. The TUI orchestrates the
tmuxandgit worktreecommands, abstracting their complexity for the user.
Key features include the ability to run tasks in the background (with an experimental auto-accept mode), manage multiple instances and tasks from a single terminal, review and apply changes with isolated Git workspaces, and navigate efficiently through a TUI menu. Installation is available via Homebrew or a manual script, and it requires tmux and gh (GitHub CLI) as prerequisites. It supports agents like Claude Code (default), Codex, Aider, and Gemini, configurable via command-line flags or a configuration file.