{"id":49737012,"url":"https://github.com/sahil87/wt","last_synced_at":"2026-06-26T13:00:37.101Z","repository":{"id":355380879,"uuid":"1227091023","full_name":"sahil87/wt","owner":"sahil87","description":"Git worktree CLI for parallel-edit workflows — sibling layout and shell-integrated navigation","archived":false,"fork":false,"pushed_at":"2026-06-20T07:09:42.000Z","size":730,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T07:15:07.715Z","etag":null,"topics":["agents","cli","developer-tools","fab-kit","git","git-worktree","parallel","terminal","tmux"],"latest_commit_sha":null,"homepage":"https://shll.ai/wt","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sahil87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T07:28:59.000Z","updated_at":"2026-06-20T05:43:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sahil87/wt","commit_stats":null,"previous_names":["sahil87/wt"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/sahil87/wt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Fwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Fwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Fwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Fwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahil87","download_url":"https://codeload.github.com/sahil87/wt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Fwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34817641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","cli","developer-tools","fab-kit","git","git-worktree","parallel","terminal","tmux"],"created_at":"2026-05-09T09:55:51.912Z","updated_at":"2026-06-26T13:00:37.035Z","avatar_url":"https://github.com/sahil87.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wt\n\n\u003e Part of [@sahil87's open source toolkit](https://shll.ai) — see all projects there.\n\n[![Latest release](https://img.shields.io/github/v/release/sahil87/wt)](https://github.com/sahil87/wt/releases) [![Downloads](https://img.shields.io/github/downloads/sahil87/wt/total)](https://github.com/sahil87/wt/releases) [![Stars](https://img.shields.io/github/stars/sahil87/wt?style=social)](https://github.com/sahil87/wt/stargazers)\n\nA small CLI that wraps `git worktree` with opinionated defaults: worktrees\nare created as siblings of the main repo (`\u003crepo\u003e.worktrees/\u003cname\u003e/`), names\nare memorable random adjective-noun pairs, and a shell wrapper makes\n`cd`-into-worktree from a menu actually work. Designed for the parallel-edit\nworkflow where each branch (or each AI session) gets its own checkout.\n\n## Why wt?\n\n- **Sibling layout, not clutter** — worktrees go in `\u003crepo\u003e.worktrees/\u003cname\u003e/`, never inside the main repo.\n- **Memorable names** — random adjective-noun pairs (`lively-otter`, `bold-fox`) instead of `feature-1`, `feature-2`.\n- **Real `cd` from a menu** — the shell wrapper lets `wt open` actually change your shell's directory (something a plain binary can't do).\n- **Per-worktree init** — each new worktree runs an init script (default `fab sync`, override via `WORKTREE_INIT_SCRIPT`) so it's ready to use immediately.\n\n## Install\n\nHomebrew (preferred):\n\n```bash\nbrew install sahil87/tap/wt\n```\n\nManual (requires Go and `just`):\n\n```bash\ngit clone https://github.com/sahil87/wt\ncd wt\njust local-install   # builds bin/wt and copies to ~/.local/bin/wt\n```\n\nFor the \"Open here\" menu option to actually `cd` your current shell, add the\nwrapper to your shell profile:\n\n```bash\neval \"$(wt shell-init)\"\n```\n\n\u003e 💡 Have other sahil87 tools? [`shll shell-install`](https://github.com/sahil87/shll#shll-shell-install--wire-the-rc-file-recommended) handles all of their shell integrations and autocompletions at once.\n\nFor the full install guide — every path, the shell wrapper, and cross-tool setup — see the [install guide](docs/site/install.md).\n\n## Usage\n\nA typical first session:\n\n```text\n$ wt create\nCreated: ../wt.worktrees/lively-otter\n  Branch: lively-otter (from main)\n\n$ wt list\nWorktrees for: wt\nLocation: /Users/you/code/wt.worktrees\n\n  Name          Branch         Path\n* (main)        main           wt/\n  lively-otter  lively-otter   wt.worktrees/lively-otter/\n\n$ wt open lively-otter        # menu → \"Open here\" cd's your shell\n$ wt delete lively-otter      # removes worktree (and optionally the branch)\n```\n\n### Command reference\n\n| Command | Summary |\n|---------|---------|\n| `wt create [branch]` | Create a worktree (random name + new branch, or named branch). Key flags: `--base \u003cref\u003e`, `--reuse`, `--worktree-name`, `--non-interactive`. |\n| `wt list` | List all worktrees with name, branch, and path. Add `--status` for dirty/unpushed indicators; `--path` and `--json` for scripting. |\n| `wt open [name\\|path]` | Open a worktree in a detected app (editor, terminal, file manager). `--app` to skip the menu. |\n| `wt delete [names...]` | Delete one or more worktrees with optional branch cleanup. |\n| `wt init` | Run the worktree init script (default `fab sync`, override via `WORKTREE_INIT_SCRIPT`). |\n| `wt shell-init` | Print a shell wrapper function for `eval` in your shell profile. |\n\nRun `wt \u003ccommand\u003e --help` for inline flag details. For every flag and exit code, see the auto-generated [command reference](https://shll.ai/tools/wt/commands/); for the `--base` start-point rules and the `wt open` launcher matrix, see the [workflows guide](docs/site/workflows.md).\n\n### `wt create --base` — branch start-point\n\n`--base \u003cref\u003e` controls the start-point when wt creates a new branch (maps to `git worktree add -b \u003cbranch\u003e \u003cpath\u003e \u003cstart-point\u003e`). Behavior depends on whether the branch already exists:\n\n| Scenario | `--base` | Behavior |\n|----------|----------|----------|\n| New branch (doesn't exist locally or remotely) | provided | Branch created from `--base` ref |\n| New branch | omitted | Branch created from `HEAD` (default) |\n| Existing local branch | provided | Warning: `--base ignored: branch already exists locally` |\n| Existing remote branch | provided | Warning: `--base ignored: fetching existing remote branch` |\n| Exploratory (no branch arg) | provided | Exploratory branch created from `--base` ref |\n| Exploratory | omitted | Branch created from current `HEAD` (default) |\n| With `--reuse` (worktree exists) | provided | `--reuse` takes precedence; `--base` has no effect |\n| Invalid ref | provided | Error exit; no worktree or branch created |\n\nThe ref is validated via `git rev-parse --verify` before worktree creation, so invalid refs produce a clear error rather than a partial failure.\n\n### `wt open` — context-aware launcher\n\n`wt open` is the one command worth knowing in detail. It's the canonical\ndirectory launcher in the toolkit (`hop` delegates to it too), and what it\ndoes depends on where you run it from and what you pass it:\n\n| Where you are | What you type | What happens |\n|---------------|---------------|--------------|\n| Inside a worktree | `wt open` | Opens the **current** worktree in your editor / terminal / file manager. |\n| In the main repo | `wt open` | Shows a **worktree-selection menu** (most recently modified is highlighted). |\n| In a non-git directory | `wt open` | Opens the **current directory** (equivalent to `wt open .`). |\n| Anywhere | `wt open lively-otter` | Resolves the name against this repo's worktrees and opens it. (Requires a git repo.) |\n| Anywhere | `wt open /tmp/notes` | Opens that directory literally — git context doesn't matter. |\n| Anywhere | `wt open --app cursor` | Skips the menu and opens in the named app. |\n\nThe menu lists the apps wt detected on your machine (editors, terminals, file\nmanagers) plus an **\"Open here\"** option that `cd`s your current shell into\nthe target — that one needs the shell wrapper (see [Gotchas](#gotchas)).\n\nRunning `wt open` from the main repo, with two worktrees on disk:\n\n```text\n$ wt open\nSelect worktree to open:\n  1) lively-otter (feature/spinner) (default)\n  2) bold-fox    (fix/race-condition)\n  0) Cancel\n\nChoice [1]: 1\nOpen in:\n  1) Open here\n  2) VSCode (default)\n  3) Cursor\n  4) Ghostty\n  5) Terminal.app\n  6) Finder\n  7) Copy path\n  0) Cancel\n\nChoice [2]:\n```\n\nPick `1` to `cd` your shell into the worktree, `2`–`6` to launch it in a\ndetected app, or `7` to copy the absolute path to your clipboard.\n\n## Gotchas\n\n- **`wt open` can't `cd` without the shell wrapper.** A child process can't change its parent shell's directory — that's a Unix constraint, not a wt bug. `eval \"$(wt shell-init)\"` installs a shell function that wraps the binary so the \"Open here\" menu option actually works.\n- **`--base` is ignored when the branch already exists** (locally or on the remote) — wt checks out the existing branch instead and prints a warning. `--reuse` also takes precedence over `--base`.\n- **Worktrees survive `cd` into deleted directories.** If you delete a worktree from outside (`rm -rf`), run `git worktree prune` in the main repo to clean up git's bookkeeping.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil87%2Fwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahil87%2Fwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil87%2Fwt/lists"}