DEV Community

Rohan Sharma
Rohan Sharma Subscriber

Posted on

I Built workz: The Zoxide for Git Worktrees That Finally Fixes .env + node_modules Hell in 2026

I've been using git worktrees a lot lately — especially for running multiple Claude/Cursor AI agents in parallel without them stepping on each other's toes. The idea is great: fast branch switching, isolated dirs, no stashing mess.

But the reality sucks:

  • Untracked files like .env*, .npmrc, secrets, docker overrides get left behind every time.
  • Heavy folders (node_modules, target, .venv, caches, dist…) get duplicated → gigabytes wasted and 5–15 min waits for reinstalls.
  • No clean, zero-config tool handles symlinking/copying + fuzzy navigation.

So I built workz (Zoxide-inspired for worktrees) to fix exactly that.

What workz actually does

  • Automatically symlinks 22+ heavy dependency dirs (smart detection via package.json / Cargo.toml / pyproject.toml / go.mod etc.)
  • Copies env/config patterns (.env*, .secrets, .tool-versions…)
  • Fuzzy switcher with skim TUI → just type w to search and cd instantly
  • --ai flag to launch your AI coding agent directly in the new worktree
  • Optional .workz.toml for custom globs if needed
  • Single Rust binary (clap + skim + git2), MIT licensed, cross-platform (macOS/Linux focus)

It's fully open source, no tracking/telemetry, and designed to be extensible (Docker/podman hooks coming soon).

How it feels in real life (30-second workflow)


bash
# Create new worktree + launch AI
ws feature/login --ai

# workz prints the cd command for you
cd /Users/rohan/projects/my-app--feature-login

Repo: https://github.com/rohansx/workz
Enter fullscreen mode Exit fullscreen mode

Top comments (0)