{"id":51095668,"url":"https://github.com/takubii/worktree-manager","last_synced_at":"2026-06-24T06:02:39.534Z","repository":{"id":340158825,"uuid":"1162647673","full_name":"takubii/worktree-manager","owner":"takubii","description":"A cross-platform CLI for creating, listing, removing, and resolving paths for Git worktrees.","archived":false,"fork":false,"pushed_at":"2026-05-31T07:59:07.000Z","size":262,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T09:10:01.051Z","etag":null,"topics":["cli","cross-platform","developer-tools","git","git-worktree","go","productivity","terminal"],"latest_commit_sha":null,"homepage":"https://github.com/takubii/worktree-manager/releases/latest","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/takubii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-20T14:22:27.000Z","updated_at":"2026-05-31T07:59:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/takubii/worktree-manager","commit_stats":null,"previous_names":["takubii/git-worktree-opener","takubii/worktree-manager"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/takubii/worktree-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takubii%2Fworktree-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takubii%2Fworktree-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takubii%2Fworktree-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takubii%2Fworktree-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takubii","download_url":"https://codeload.github.com/takubii/worktree-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takubii%2Fworktree-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34719307,"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-24T02:00:07.484Z","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":["cli","cross-platform","developer-tools","git","git-worktree","go","productivity","terminal"],"created_at":"2026-06-24T06:02:38.571Z","updated_at":"2026-06-24T06:02:39.507Z","avatar_url":"https://github.com/takubii.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# worktree-manager\n\n`wtm` is a CLI tool for managing Git worktrees.\n\nIt focuses on worktree lifecycle operations:\n\n- list worktrees\n- create worktrees\n- print a selected worktree path\n- remove worktrees and optionally delete local branches\n- inspect config and environment health\n- self-update from GitHub Releases\n\n## Install\n\nLatest release:\n\n- [v0.6.0](https://github.com/takubii/worktree-manager/releases/tag/v0.6.0)\n\nLinux/macOS:\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/takubii/worktree-manager/main/scripts/install.sh | sh\n```\n\nWindows PowerShell:\n\n```powershell\niwr https://raw.githubusercontent.com/takubii/worktree-manager/main/scripts/install.ps1 -UseBasicParsing | iex\n```\n\nEnvironment variables:\n\n- `WTM_VERSION=vX.Y.Z` installs a specific release tag\n- `WTM_INSTALL_DIR=\u003cpath\u003e` changes installation directory\n- `WTM_SKIP_CHECKSUM=1` skips SHA256 verification\n\n## Quick Start\n\n```sh\nwtm list\nwtm create feature/my-task\nwtm path\nwtm path --branch feature/my-task\nwtm remove feature/my-task\nwtm doctor\n```\n\n## Commands\n\n### `wtm list`\n\nPrint worktrees from `git worktree list --porcelain`.\n\n```sh\nwtm list\nwtm list --format table\nwtm list --format raw\nwtm list --format json\n```\n\nFlags:\n\n- `--format table|raw|json`\n\nWhen `wtm list` sees stale (`prunable`) or missing-path entries, table and JSON formats keep stdout unchanged and print guidance to stderr. Raw format stays identical to `git worktree list --porcelain`.\n\n### `wtm create`\n\nCreate a worktree for a local, remote, or new branch.\n\n```sh\nwtm create\nwtm create feature/my-task\nwtm create feature/my-task --base main\nwtm create feature/my-task --dry-run\nwtm create feature/my-task --no-bootstrap\nwtm create feature/my-task --output path\nwtm create feature/my-task --output json\n```\n\nBehavior:\n\n- Runs `git worktree prune --expire now` unless disabled.\n- Runs `git fetch origin --prune` unless disabled.\n- Creates worktrees under `\u003crepo-parent\u003e/worktrees/\u003cbranch\u003e` by default.\n- Uses `main` as the default base branch for new branches.\n- Runs configured `create.bootstrap` file copy and post-create hooks after the worktree is created.\n- `--dry-run` prints planned create/bootstrap actions without pruning, fetching, creating a worktree, copying files, or running hooks.\n\nFlags:\n\n- `--base \u003cbranch\u003e`\n- `--dry-run`\n- `--no-fetch`\n- `--no-prune`\n- `--no-bootstrap`\n- `--output none|path|json`\n\n### `wtm path`\n\nSelect an active worktree and print only its path.\n\n```sh\nwtm path\nwtm path --branch feature/my-task\nwtm path --output json\n```\n\nBehavior:\n\n- Does not run `git worktree prune`.\n- Skips stale (`prunable`) and missing local-path entries.\n- Prints warnings for skipped entries to `stderr`.\n\nFlags:\n\n- `--branch \u003cbranch\u003e`\n- `--output path|json`\n\n### `wtm remove`\n\nRemove a worktree and optionally delete its local branch.\n\n```sh\nwtm remove\nwtm remove feature/my-task\nwtm remove feature/my-task --dry-run\nwtm remove feature/my-task --delete-branch none\nwtm remove feature/my-task --force\n```\n\nBehavior:\n\n- Refuses to remove a target worktree if the current directory is inside it.\n- Cleans empty parent directories after branch-path worktree removal.\n- If the selected entry is stale, runs `git worktree prune --expire now`.\n\nFlags:\n\n- `--dry-run`\n- `--force`\n- `--delete-branch none|safe|force`\n\n### `wtm config`\n\nInspect and initialize config.\n\n```sh\nwtm config init\nwtm config init --force\nwtm config show\nwtm config path\nwtm config path --json\n```\n\nConfig precedence:\n\n```text\nflag \u003e repo (.wtmconfig.json) \u003e global (config.json) \u003e built-in defaults\n```\n\nPaths:\n\n- Global: `\u003cos.UserConfigDir()\u003e/worktree-manager/config.json`\n- Repo override: `\u003crepo-root\u003e/.wtmconfig.json`\n\nExample:\n\n```json\n{\n  \"remote\": \"origin\",\n  \"baseBranch\": \"main\",\n  \"worktreeDirTemplate\": \"{repoParent}/worktrees/{branch}\",\n  \"create\": {\n    \"fetch\": true,\n    \"prune\": true,\n    \"bootstrap\": {\n      \"copyFiles\": [\n        {\n          \"from\": \".env\",\n          \"to\": \".env\",\n          \"overwrite\": false,\n          \"required\": false\n        }\n      ],\n      \"postCreate\": [\n        {\n          \"name\": \"install dependencies\",\n          \"command\": [\"npm\", \"install\"]\n        },\n        {\n          \"name\": \"build frontend\",\n          \"command\": [\"npm\", \"run\", \"build\"],\n          \"cwd\": \"frontend\"\n        }\n      ]\n    }\n  },\n  \"remove\": {\n    \"deleteBranch\": \"safe\"\n  }\n}\n```\n\n`worktreeDirTemplate` placeholders:\n\n- `{repoParent}`\n- `{repoRoot}`\n- `{branch}`\n\n`create.bootstrap` is optional. When it is omitted, `wtm create` does not copy files or run post-create hooks. Use `wtm create --no-bootstrap` to skip configured bootstrap actions for one run.\n\nBootstrap file copy:\n\n- `from` is an absolute path or a path relative to `{repoRoot}`.\n- `to` is relative to the new `{worktree}` and must stay inside it.\n- Only files are supported in this release; directories, glob patterns, and templates are not expanded.\n- Existing destination files are skipped unless `overwrite` is `true`.\n- Missing files warn and continue unless `required` is `true`.\n\nPost-create hooks:\n\n- `command` is an argv array and is executed without a shell.\n- Hooks run in order after successful worktree creation and file copy.\n- `cwd` defaults to `{worktree}`. Relative `cwd` values are resolved inside the new worktree.\n- Hook execution stops at the first failure and returns a non-zero exit code.\n\nBootstrap placeholders:\n\n- `{repoRoot}`\n- `{worktree}`\n- `{branch}`\n\nDocker Compose setup can be modeled later with bootstrap templates and post-create hooks, but `wtm` does not provide Docker-specific commands.\n\n### `wtm doctor`\n\nRun environment diagnostics.\n\n```sh\nwtm doctor\n```\n\nChecks:\n\n- `git` availability\n- current repository availability\n- global and repo config validity\n- update prerequisites\n\n### `wtm update`\n\nUpdate `wtm` from GitHub Releases.\n\n```sh\nwtm update\nwtm update --version vX.Y.Z\n```\n\n### `wtm version`\n\nPrint the current version.\n\n```sh\nwtm version\nwtm --version\n```\n\n## Migration From `git-worktree-opener`\n\n`v0.5.0` is the first release under the `worktree-manager` name.\n\n- Replace `wto` with `wtm`.\n- Replace `wto new` with `wtm create`.\n- Replace `wto rm` with `wtm remove`.\n- Replace editor or terminal launch workflows with `wtm path`, then pass the printed path to your shell/editor tooling.\n- Recreate config with `wtm config init`; old `open` and `tmux` config fields are no longer supported.\n\n## Troubleshooting\n\n### `wtm list` fails outside a Git repository\n\nRun `wtm` inside a Git repository or linked worktree.\n\n### `wtm path` finds no valid worktrees\n\nRun `wtm list` to inspect stale or missing entries. Use `wtm remove \u003cbranch\u003e` or interactive `wtm remove` to clean stale metadata or remove registered worktree entries when appropriate.\n\n### `wtm remove` refuses to remove\n\nMove to another directory outside the target worktree, then run `wtm remove` again.\n\n### `wtm update` fails\n\nRun `wtm doctor`, then verify network access, the requested release tag, and checksum availability.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakubii%2Fworktree-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakubii%2Fworktree-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakubii%2Fworktree-manager/lists"}