One branch, every repo.
One command checks a branch out in every repository of a project, runs each repo's setup, and lays the result out in tmux or herdr.
curl -fsSL https://github.com/anton-fomin/ws/releases/latest/download/install.sh | shThe problem
A feature touches the API and the web app. So you git switch in one repository, then the other, then you remember the infrastructure repo. Halfway through a review someone needs a hotfix, and every one of them has to move again.
Worktrees help, but one repository at a time: each new one starts without your .env, without node_modules, and without the setup steps nobody wrote down.
# without ws, for every branch
cd ~/src/api && git switch -c feature/login
cd ~/src/web && git switch -c feature/login
cd ~/src/infra && git switch -c feature/login
cp ../.env.backup .env # which one was it?
pnpm install # againHow it works
A workspace is a directory with a ws.yaml. It holds one bare clone per repository and one branch directory per branch, with a worktree of every repository inside. Which branch is where is always read back from git.
acme/
ws.yaml # repositories, setup, overrides
.bare/api.git .bare/web.git # one bare clone per repository
local/api/.env # untracked files for every worktree
main/api main/web # a branch directory per branch…
feature-login/api # …with one worktree per repository
feature-login/webws switch feature/login creates the worktrees, places your local files, installs dependencies, runs each repository's setup and opens the session. More on the layout →
Features
- One feature folder, every repo. Create worktrees side by side in
project/feature/, withbackend/andfrontend/inside. - Packages installed automatically. Works with uv, npm, pnpm and Yarn. pnpm and Yarn reuse dependencies through hardlinks where possible.
- Remote branches, ready locally. Fetch all repos with
ws fetch, then switch to new worktrees from a remote branch. - Run tasks across repos. Define
devin a Taskfile, justfile orpackage.json, then runws run dev. All repos run in parallel, with output in one console. - Logs your agent can read. Enable file logs for all tasks run with
ws run. - Local files. Copy or link
.env, editor settings and other files from alocal/folder into your worktrees. - Your setup commands. Run custom commands on worktree creation—for example, decrypt SOPS secrets into a
.envfile. - For people who love the CLI. Open a tmux session or herdr workspace for your branch, with a window or tab per repo and a shared root for multi-repo workspaces.
- Agent skills included. Let your coding agent create worktrees, find its way around and run tasks.
- Written in Rust. Blazingly fast, of course.
git is the only requirement. tmux, herdr, fzf, zoxide and package managers are optional integrations.
Works with coding agents
Type /ws <task> in Claude Code or OpenCode, or /skill:ws <task> in pi. The agent picks a branch name from your repositories' conventions, runs ws switch, and starts a fresh agent on the task in the new workspace's session.
A second skill teaches every agent inside a workspace how to find its way around: ws status, each repository's own instructions, ws runfor tasks. Coding agents →
npx skills add anton-fomin/ws -g -a claude-code opencodeInstall
Then add the shell wrapper so ws switch also changes directory, and shell completion. Getting started →