autowt 0.6: I rewrote it in Go, among other things
I‘ve been working on autowt, my git worktree helper, on and off for almost a year now. Most of that time, I was at Descript and getting live feedback from a pretty wide spread of engineers: habits, preferences, which terminal and shell they used, what they were willing to put up with.
Nearing the end of my time at Descript, a few things stood out as missed opportunities.
Performance
autowt 0.5.x takes at least 200ms to do anything, because it has to import the Textual TUI library. Not only that, but what it was doing with Textual was just OK.
Meanwhile, Go has the Charm family of libraries to help build great TUIs. Go, being a compiled language, doesn‘t pay a cost to import code on every program invocation. And conveniently, my upcoming gig uses a lot of Go. I had a good reason to look closer.
So as I was winding down at Descript, I took a couple of days to have a coding agent rewrite the whole project in Go. Now it launches in 30ms. Hooray! It’s a little scary to do this kind of port, but I did a lot of manual regression testing.
The Python version is dead code now. Uninstall autowt from uv/pip, and install it with Homebrew or Mise instead.
Shell integration
I originally built autowt to control your terminal program, i.e. iTerm2, Ghostty, Terminal.app, etc. This is an unusual thing to do! The more traditional approach is to integrate with your shell (zsh, bash, fish) to cd you to the right place. But terminal automation adds value because it‘s legitimately fewer keystrokes, and you can do extra “background” work after spawning the new tab.
Some people just could not get into the workflow of having autowt open tabs on their behalf. It‘s not my job to change their habits, and it is my job to make their lives easier. So I finally figured out a clean way to add a shell integration to autowt, so any autowt command can magically cd you somewhere. Instead of autowt go opening a new tab for you, you can open your own new tab and autowt go inside it.
Invoking hooks via the command line
autowt‘s most important feature is hooks: commands that run at various points in the git worktree lifecycle, like after creating a new worktree. This is the main value proposition of autowt: it installs dependencies and runs configuration code in new worktrees automatically.
Every freaking coding agent GUI tool wants to manage its own worktrees, which means a proliferation of configuration and setup code. autowt now exposes autowt hook to let you reuse autowt’s configuration across tools.