gwm CLI

A Rust git worktree manager with a TUI: it creates the branch, copies files, runs setup and shows where an AI agent works

  • 150 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Extended access

Why this level

  • Hooks from `.gwm.toml` run shell commands; before version 1.6.0 a branch name with `;` or `$` ran as a command (GHSA-fffq-vg6f-gxqm).
  • The tool creates and deletes working copies on disk and talks to GitHub or GitLab through `gh` and `glab`.
All reasons and checks

kbrdn1/gwm-cli

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/gwm

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Hooks from `.gwm.toml` run shell commands; before version 1.6.0 a branch name with `;` or `$` ran as a command (GHSA-fffq-vg6f-gxqm).
  • The tool creates and deletes working copies on disk and talks to GitHub or GitLab through `gh` and `glab`.

This is third-party code. Review the repository files before installing.

What it does

gwm is a single Rust binary (CLI and TUI) for working with git worktrees across all repositories at once. `gwm create feat 42 user-auth` creates a branch, places the working copy on disk, copies the files you listed, runs the configured setup commands and links the worktree to GitHub issue 42. Bare `gwm` opens a TUI with every worktree, a sidebar (CI state, working-tree files), and embedded lazygit and shell overlays. Setup lives in `.gwm.toml`: file copies with deny-list regular expressions (protection against dragging secrets from `.env`), six lifecycle hook phases and presets for Laravel, Symfony, Node, Rust, Go and Python. `gwm undo` and `gwm history` bring back a worktree removed by mistake without `git reflog`. For agent work gwm finds Claude Code, Codex, opencode and Mistral Vibe sessions from their on-disk files and shows them in the AGENT column, in `gwm agents` and in the statusline. Scripts get `--format=json` and a JSON-RPC daemon with a push stream, and the repository ships a ready `skills/SKILL.md` skill for Claude Code.

Who it is for. Developers who keep several branches in parallel, run AI agents in them and still prepare every copy (dependencies, `.env`, database) by hand.

Good fit when

  • Claude Code works on one task, Codex on another, and you want to see which session sits in which branch.
  • Every branch needs dependencies installed and `.env` copied, and the stack is common: Laravel, Symfony, Node, Rust, Go or Python.
  • Someone else's pull request is easier to inspect in a separate working copy: `gwm review <number>`.
  • One command, such as the tests, has to run across all worktrees: `gwm exec -- <command>`.
  • A working copy was removed by mistake and you want it back.

Not a fit when

  • Work happens in one branch without parallel tasks: plain `git switch` is enough.
  • The repository lives neither on GitHub nor on GitLab: issue and pull request linking goes through `gh` or `glab`.
  • The agent is not Claude Code, Codex, opencode or Mistral Vibe: gwm cannot detect other sessions and they can only be pinned by hand.

Example request

Create a worktree for issue 42 with gwm, wait for the setup to finish and show the report of which files were copied and which commands ran.

Limitations

The `git` command must be on `PATH`, and issue and pull request linking uses `gh` for GitHub or `glab` for GitLab. The crates.io package is called `gwm-cli`, while the installed command is `gwm`. The Nix flake builds for x86_64-linux, aarch64-linux and aarch64-darwin; Intel Mac users install a prebuilt archive or `cargo install`. The AUR package is community-maintained and can lag behind a release. The `gcd` fast jump needs `gwm shell-init`.

How to disable. Remove the binary (`cargo uninstall gwm-cli` or `brew uninstall gwm`) and the `gwm shell-init` line from your shell profile; `.gwm.toml` files in repositories can stay, git does not read them.

FAQ

How do I install gwm?

Run `cargo install gwm-cli` or fetch a prebuilt binary with `cargo binstall gwm-cli`. There is also Homebrew (`brew tap kbrdn1/tap && brew install gwm`), Scoop, Nix, aqua, and `.deb` and `.rpm` packages.

How does gwm know which agent is in which branch?

It reads session files on disk and does not enumerate processes. It finds Claude Code, Codex, opencode and Mistral Vibe, and other agents can be pinned by hand with `gwm agents attach`.

What are the hooks in .gwm.toml and are they safe?

They are shell commands in six phases of a working copy's life. Repository hooks go through a trust prompt on first run (`gwm trust`), and values are shell-escaped on substitution. Before version 1.6.0 a branch name with special characters ran as a command, so use a current version.

Can a script consume gwm data?

Yes. `gwm list --format=json` and `gwm doctor --format=json` return the schemas frozen in `docs/schema/`, and `gwm daemon` serves JSON-RPC over a socket and pushes events to subscribers.

How do I restore a removed worktree?

Run `gwm undo`; `gwm history` lists the removals. Per-worktree notes live in the main checkout and survive removal.

Discussion

No questions or reviews yet.

CLI tools

A git worktree CLI with a fuzzy finder: one folder per branch so several agents can work in parallel without conflicts

CLIBroad access480Repository stars
Official

An MCP server for Git merge conflicts: it resolves the trivial cases itself and leaves the complex hunks to the agent

MCP serverExtended access194Repository stars

One desktop window for Claude Code, Codex, Gemini CLI and OpenCode: terminals, pull requests, diffs and approvals

CLIBroad access347Repository stars

Local review of agent changes before commit: the agent itself reads line comments and replies to them through MCP.

PluginMinimal access131Repository stars

A Rust CLI proxy that compacts output from git, tests and other commands so the agent spends fewer tokens reading the terminal

CLIExtended access85.7KRepository stars

README in short

The README opens with the promise of one binary with setup already done, then gives a table of install channels, a 30-second tour and a feature list. Detailed documentation sits in `docs/`, and the author froze the JSON and daemon schemas under SemVer.

README badge

Report a problem

Foxx AIgwm
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.