{"id":51032632,"url":"https://github.com/kyriacos/go-gwt","last_synced_at":"2026-06-22T02:01:38.580Z","repository":{"id":365947412,"uuid":"1274365051","full_name":"kyriacos/go-gwt","owner":"kyriacos","description":"A fast git worktree helper with a nice TUI","archived":false,"fork":false,"pushed_at":"2026-06-19T14:53:38.000Z","size":1131,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T16:30:18.314Z","etag":null,"topics":["agent","ai","git","go","worktrees"],"latest_commit_sha":null,"homepage":"https://github.com/kyriacos/go-gwt","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/kyriacos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":null,"dco":null,"cla":null}},"created_at":"2026-06-19T12:43:51.000Z","updated_at":"2026-06-19T14:53:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kyriacos/go-gwt","commit_stats":null,"previous_names":["kyriacos/go-gwt"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kyriacos/go-gwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriacos%2Fgo-gwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriacos%2Fgo-gwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriacos%2Fgo-gwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriacos%2Fgo-gwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyriacos","download_url":"https://codeload.github.com/kyriacos/go-gwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyriacos%2Fgo-gwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34630770,"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-22T02:00:06.391Z","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":["agent","ai","git","go","worktrees"],"created_at":"2026-06-22T02:01:35.225Z","updated_at":"2026-06-22T02:01:38.569Z","avatar_url":"https://github.com/kyriacos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gwt\n\n[![CI](https://github.com/kyriacos/go-gwt/actions/workflows/ci.yml/badge.svg)](https://github.com/kyriacos/go-gwt/actions/workflows/ci.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/kyriacos/go-gwt.svg)](https://pkg.go.dev/github.com/kyriacos/go-gwt)\n[![License: MIT](https://img.shields.io/github/license/kyriacos/go-gwt)](LICENSE)\n\nA fast git worktree helper with a Charm TUI and `gh` integration. `gwt` keeps\nyour worktrees tidy as siblings of the repo, gives you a live dashboard over all\nof them, and checks out GitHub PRs into fresh worktrees in one command.\n\nWorktrees default to a sibling of the repo (one level up), named\n`\u003crepo\u003e-\u003cbranch\u003e` — so `gwt new feature` from `~/code/backend` creates\n`~/code/backend-feature`.\n\n## Demo\n\n![gwt demo](docs/demo/demo.gif)\n\n\u003e The gif is generated with [VHS](https://github.com/charmbracelet/vhs) from\n\u003e [`docs/demo/demo.tape`](docs/demo/demo.tape) — run `vhs docs/demo/demo.tape`\n\u003e to regenerate it.\n\n## Features\n\n- Sibling-by-default worktrees, named from a template (default `{repo}-{branch}`).\n- Color-coded worktree **states** in `ls`: active, local-only, gone (upstream\n  deleted), missing, detached — with a legend when anything is stale.\n- A live Bubble Tea dashboard: every worktree with concurrent git status\n  (branch, ahead/behind, dirty, last commit, disk size) and inline actions.\n- Interactive pickers: `from`/`co` with no argument open a branch picker; `clean`\n  opens a multi-select list with stale worktrees pre-marked.\n- `gh` integration: check out a PR into a new worktree; see PR and CI status.\n- Safety checks: warns before removing a worktree with uncommitted or unpushed\n  work, and refuses to remove the main worktree.\n- `clean`: multi-select removal of worktrees (`--merged` for a non-interactive sweep).\n- TOML config with a clear precedence chain and repo-local overrides.\n- Post-create / pre-remove hooks, plus optional editor and tmux launch on create.\n\n## Install\n\n```sh\ngo install github.com/kyriacos/go-gwt@latest   # binary: gwt\n```\n\nPrebuilt binaries for macOS and Linux (amd64/arm64) are attached to each\n[release](https://github.com/kyriacos/go-gwt/releases).\n\n### Build from source\n\nRequires Go 1.26+ and `git` at runtime (`gh` is optional, for the PR commands).\n\n```sh\ngit clone https://github.com/kyriacos/go-gwt\ncd go-gwt\ngo build -o gwt .          # produces ./gwt\n# or install into $GOBIN / $GOPATH/bin:\ngo install .\n```\n\nRun the test suite and linters:\n\n```sh\ngo test -race ./...\ngo vet ./...\ngolangci-lint run          # optional; see .golangci.yml\n```\n\nTo cut a release build locally (matches CI), install\n[goreleaser](https://goreleaser.com) and run `goreleaser release --snapshot --clean`.\n\n## Quickstart\n\n```sh\ngwt new feature            # new branch + worktree (sibling), prints its path\ngwt from existing-branch   # worktree for an existing branch (no arg = picker)\ngwt co feature             # switch if it exists, else create from branch\ngwt rm feature -d          # remove the worktree and delete its local branch\ngwt ls                     # table of all worktrees (non-interactive)\ngwt                        # no args + a tty = open the dashboard\ngwt pr 1234                # check out PR #1234 into a fresh worktree\ngwt clean --merged         # remove worktrees whose branch is merged\n```\n\nThe switch verbs (`new`, `from`, `co`, `search`, dashboard select) print **only\nthe chosen path** to stdout; all diagnostics and the TUI render to the tty. That\nis what makes the shell integration below able to `cd` for you.\n\n## Shell integration\n\nA process cannot change its parent shell's directory, so the switch verbs print\nthe target path to stdout and a tiny wrapper does the `cd`:\n\n```sh\neval \"$(gwt shell-init zsh)\"   # or: bash | fish\n```\n\nAdd that line to your `~/.zshrc` (or equivalent) to have `gwt new`/`co`/`from`\ndrop you into the new worktree automatically.\n\nIf you installed the binary under a different name, pass `--name` so the wrapper\nfunction and the command it calls match it:\n\n```sh\neval \"$(gogwt shell-init zsh --name gogwt)\"\n```\n\n## Configuration\n\n`gwt` reads `${XDG_CONFIG_HOME:-~/.config}/gwt/config.toml`, with a repo-local\n`.gwt.toml` at the main worktree root taking precedence, and environment\nvariables / command-line flags overriding both. All keys are optional:\n\n```toml\nworktree_dir = \"\"                # default: parent of the main worktree\nnaming       = \"{repo}-{branch}\" # tokens: {repo} {branch} {branch_slug}\nauto_setup   = \"prompt\"          # prompt | always | never\nopen_editor  = false\neditor       = \"\"                # e.g. \"cursor\", \"code\", \"nvim\"; falls back to $EDITOR\ntmux         = false             # open a new tmux window/session in the worktree\n\n[hooks]\npost_create = []                 # shell commands; cwd = new worktree\npre_remove  = []                 # shell commands; cwd = worktree about to go\n\n[gh]\nenabled = true                   # auto-detected; set false to disable\n\n[ui]\ncolor = \"auto\"                   # auto | always | never (also honors NO_COLOR)\n```\n\nHooks and setup commands come from the repo and are treated as untrusted: they\nrun only with your consent (`auto_setup`, `--run-setup`/`--no-setup`, or an\ninteractive prompt; skipped by default when there is no tty).\n\n## Contributing\n\nContributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyriacos%2Fgo-gwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyriacos%2Fgo-gwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyriacos%2Fgo-gwt/lists"}