GitHub Repository

Twist generates canonical imports for your Go packages. Since it does not require a running server (ie in existing tools like uber-go/sally and rsc/go-import-redirector), Twist is particularly useful in conjunction with GitHub Pages.

A canonical import path allows you to make your package import a little fancier with a custom domain, for example:

- import ""
+ import ""

I use Twist myself to generate import names for my packages at, which acts as the source for a GitHub Pages site that performs the redirection.

The CLI can easily generate templates for a single package:

go get -u
#          [        source         ] [     canonical     ]
twist -o x

Or generate templates for many packages using a flexible configuration format:

twist -c twist.example.yml -o x -readme

Drop by the repository to learn more!