Skip to main content

Customizable git worktree manager

Project description

autowt: a better git worktree experience

autowt is a layer of convenience over git worktree. It automates the creation, management, and cleanup of git worktrees, giving each branch its own dedicated directory and terminal tab or window.

Full documentation

Consider what it takes to set up a fresh worktree in a typical workflow:

  1. Make a decision about where to put the worktree
  2. git worktree add <worktree_path> -b <branch>
  3. Open a new terminal tab
  4. cd <worktree path>
  5. uv sync or npm install or whatever your dependency setup is
  6. cp <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:

  1. git worktree rm .
  2. Close the tab

Of course, you might close the tab and forget to clean up the worktree, and your set of worktrees will grow.

On the other hand, with autowt, it looks like this:

autowt <branch>
# there is no step 2

And deleting branches that have been merged or are associated with closed PRs looks like this:

autowt cleanup

A lot nicer, right?

Type less

The built-in worktree commands are verbose. autowt makes them shorter, and adds automation hooks.

Terminal program automation

If you like to keep multiple tabs open, autowt can create tabs for new worktrees, and switch to the correct tab for a worktree if you already have it open.

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

Then, make a new worktree for a new or existing branch in your current repo:

autowt my-new-feature

Watch as autowt creates a new worktree and opens it in a new terminal tab or window.

Contributing

PRs, GitHub issues, discussion topics, bring 'em on!

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autowt-0.5.0.dev2.tar.gz (171.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autowt-0.5.0.dev2-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

Details for the file autowt-0.5.0.dev2.tar.gz.

File metadata

  • Download URL: autowt-0.5.0.dev2.tar.gz
  • Upload date:
  • Size: 171.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for autowt-0.5.0.dev2.tar.gz
Algorithm Hash digest
SHA256 7c34c3ca8bd19c6aa4fa6fc70363d9c2d8ca344a8ca5416d8dd7898aa6708670
MD5 7c8f5c90ff3c29d041d9264eef468018
BLAKE2b-256 9ca2f75bf64f72e2ea6e257f322269084446dae37a63dd483715df785804a9ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for autowt-0.5.0.dev2.tar.gz:

Publisher: pypi.yml on irskep/autowt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autowt-0.5.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: autowt-0.5.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 65.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for autowt-0.5.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 7b892e83dcbb24e15326375faa397c2f834ea6a0685dd9b7b1a93077c2c58ab6
MD5 4467647304924b7826e9222549c64b6f
BLAKE2b-256 8778668a0efe398e521aef37a9bdae4c7792b249356723b9f9b7b4f07af8070d

See more details on using hashes here.

Provenance

The following attestation bundles were made for autowt-0.5.0.dev2-py3-none-any.whl:

Publisher: pypi.yml on irskep/autowt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page