Customizable git worktree manager
Project description
autowt: a better git worktree experience
This README is generated from the index page of the docs. There are many more pages of docs at the link.
What are worktrees?
Worktrees are a built-in feature of git, which are essentially free clones of a local git repo. History is shared and synced across all worktrees for a given repo. Creating a new worktree is cheap, and you can list all your worktrees with a single command. This makes them a great fit for doing work “in parallel,” or not worrying about having uncommitted changes before working on another branch.
How autowt simplifies common workflows
While worktrees are powerful, the built-in tooling is minimalistic. Consider what it takes to set up a fresh worktree in a typical workflow:
- Make a decision about where to put the worktree
git worktree add <worktree_path> -b <branch>- Open a new terminal tab
cd <worktree path>uv syncornpm installor whatever your dependency setup iscp <repo_dir>/.env .to copy secrets
Congrats, you're done! Type type type, open a PR, and merge it. Now you need to clean up:
git worktree rm .- Close the tab
On the other hand, with autowt, it looks like this:
autowt <branch>
And deleting branches that have been merged or are associated with closed PRs looks like this:
autowt cleanup
A lot nicer, right?
Now suppose your team uses an issue tracker like Linear which can suggest branch names based on issue IDs. You could configure autowt to have a custom command to automatically open worktrees for tickets instead of passing a branch name:
autowt linear ABC-1234 # opens yourname/abc-1234-title-of-the-ticket or whatever
[!NOTE]
This example mentions Linear, but autowt has no opinions about which tools you call in your scripts. There is no special GitHub or Linear integration. That functionality comes from command line programs installed and configured by you.
What autowt can do for you
- Worktree ergonomics: It's not hard to learn the commands to manage worktrees, but autowt shortens the most common ones. autowt can open new terminal tabs via automate-terminal (iTerm2, tmux, Ghostty, and more), or with shell integration it can
cddirectly in your current shell. - Deep, customizable automation: You can define scripts in
.autowt.tomlto run at various points, like after creating a worktree but before switching to it, or before a worktree is cleaned up. Check out Lifecycle Hooks for more information. - Smart cleanup: You can configure autowt to automatically clean up worktrees whose branches have been merged, or even branches which are associated with closed pull requests on GitHub.
- Friendly TUIs: autowt uses interactive terminal-based UIs where it makes sense. For example,
autowt configgives you an easy way to edit global settings.autowt switchlets you review your worktrees and pick which one to navigate to.
Getting started
You'll need Python 3.10+ and a version of git released less than ten years ago (2.5+).
First, install autowt:
pip install autowt
Optionally, set up shell integration so worktree switches cd in your current shell:
# bash/zsh
eval "$(autowt shell-init)"
Then, make a new worktree for a new or existing branch in your current repo:
autowt my-new-feature
With shell integration, this creates the worktree and cd's you into it. Without it, autowt opens a new terminal tab or window instead.
Continue to full documentation
Contributing
PRs, GitHub issues, discussion topics, bring 'em on!
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autowt-0.6.0.dev0.tar.gz.
File metadata
- Download URL: autowt-0.6.0.dev0.tar.gz
- Upload date:
- Size: 197.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1205566fc980d4cadc762dfb189ab9186176001e0788f8e1c12dd027459a189
|
|
| MD5 |
121f2b026608c26a7b9a50b562901f70
|
|
| BLAKE2b-256 |
9b6f05c40ff01a497fc2340c80c6181f7cc3d4b31ef3107ddcb61709b53e19b4
|
Provenance
The following attestation bundles were made for autowt-0.6.0.dev0.tar.gz:
Publisher:
pypi.yml on irskep/autowt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autowt-0.6.0.dev0.tar.gz -
Subject digest:
f1205566fc980d4cadc762dfb189ab9186176001e0788f8e1c12dd027459a189 - Sigstore transparency entry: 1512393161
- Sigstore integration time:
-
Permalink:
irskep/autowt@75f8bbd268a03f586d5e4d0724639e98605964a5 -
Branch / Tag:
refs/tags/v0.6.0.dev0 - Owner: https://github.com/irskep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@75f8bbd268a03f586d5e4d0724639e98605964a5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file autowt-0.6.0.dev0-py3-none-any.whl.
File metadata
- Download URL: autowt-0.6.0.dev0-py3-none-any.whl
- Upload date:
- Size: 73.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a99bfff9c7851016fba4f084c6cd8635e6bab8c1bd11d9ccb262091801708af7
|
|
| MD5 |
ea4026137f09e55998dc18f763842cd7
|
|
| BLAKE2b-256 |
aa8bea51f839ba7adcc54da9be5ba2df3b415893569d12e1f425f6b19166ac0d
|
Provenance
The following attestation bundles were made for autowt-0.6.0.dev0-py3-none-any.whl:
Publisher:
pypi.yml on irskep/autowt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autowt-0.6.0.dev0-py3-none-any.whl -
Subject digest:
a99bfff9c7851016fba4f084c6cd8635e6bab8c1bd11d9ccb262091801708af7 - Sigstore transparency entry: 1512393752
- Sigstore integration time:
-
Permalink:
irskep/autowt@75f8bbd268a03f586d5e4d0724639e98605964a5 -
Branch / Tag:
refs/tags/v0.6.0.dev0 - Owner: https://github.com/irskep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@75f8bbd268a03f586d5e4d0724639e98605964a5 -
Trigger Event:
push
-
Statement type: