Install
Linux & macOS
curl -fsSL gomodvanityurls.com/install.sh | bash
Or download a binary from the latest release.
Windows
Choose based on your shell environment:
Option A — PowerShell (recommended):
powershell -ExecutionPolicy ByPass -c "irm https://gomodvanityurls.com/install.ps1 | iex"
The script auto-detects your architecture, verifies the download, and configures PATH.
Run gvu --version to verify.
Option B — Git Bash / MSYS2 / Cygwin:
Open your shell terminal, then run:
curl -fsSL gomodvanityurls.com/install.sh | bash
The script auto-detects Windows and downloads the correct .exe binary.
Option C — WSL/WSL2:
Open a WSL terminal, then run:
curl -fsSL gomodvanityurls.com/install.sh | bash
Option D — Scoop:
scoop bucket add gomodvanityurls https://github.com/gomodvanityurls/scoop-bucket
scoop install gvu
Scoop handles PATH setup automatically. Run gvu --version to verify.
Option E — CMD / Manual download:
Download gvu-windows-amd64.exe (or gvu-windows-arm64.exe for ARM devices) from the latest release,
rename to gvu.exe, and add its folder to your PATH.
Add a vanity URL
Using gomod.io (default domain, no setup)
$ gvu add gomod.io/private-module https://github.com/yourorg/private-module.git
✔ Route created successfully!
═══════════════════════════════════════════════════════════
┃ Route ID: m_abc123
┃ Vanity Path: gomod.io/private-module
┃ Target Repo: https://github.com/yourorg/private-module.git
┃ Quota: 1 / 5 used
═══════════════════════════════════════════════════════════
An anonymous account is created automatically — no signup required.
Monorepo with subdirectory (Go 1.25+)
If your repo contains multiple Go modules in subdirectories (e.g., go/module-a/go.mod),
use --subdir to point to the module’s location within the repo:
gvu add gomod.io/module-a https://github.com/yourorg/monorepo.git --subdir go/module-a
┃ Route ID: m_def456
┃ Vanity Path: gomod.io/module-a
┃ Target Repo: https://github.com/yourorg/monorepo.git
┃ Subdir: go/module-a
Then use it in your code:
import "gomod.io/module-a"
The Go 1.25+ toolchain will clone https://github.com/yourorg/monorepo and read go/module-a/go.mod. On Go < 1.25 the subdir field is silently ignored (backward compatible).
Major version support (v2, v3, …)
Routes automatically support Go module major version suffixes. You only need to add the base route — no separate entries for /v2, /v3, etc.
# This single route also serves /v2, /v3, and any future major version
gvu add gomod.io/mylib https://github.com/yourorg/mylib.git
Then both of these work without any additional setup:
import "gomod.io/mylib" // v0 or v1
import "gomod.io/mylib/v2" // v2
import "gomod.io/mylib/v3" // v3
Wildcard routing (Pro only)
If you have many repos under the same organization or prefix, wildcard routing lets you cover them all with a single rule:
# Cover all repos under go.mycorp.com/dept1/
gvu add 'go.mycorp.com/dept1/*' 'https://github.com/dept1/*.git'
Requires a Pro account and a custom domain. See Wildcard Routing.
Using a custom domain (requires Verified account)
# Step 1: Create an anonymous account (fast, no email required)
gvu auth signup
# Step 2: Bind your email to upgrade to Verified
gvu auth bind user@example.com
# Enter the 6-digit code sent to your email
# Step 3: Point your DNS (must be done before adding the route)
# go.yourcompany.com CNAME gomodvanityurls.com
# Step 4: Add the custom domain route
gvu add go.yourcompany.com/private-module https://github.com/yourorg/private-module.git
Configure Go
Tell the Go toolchain to resolve your vanity paths directly:
export GOPRIVATE=gomod.io
# Add custom domains too:
export GOPRIVATE=gomod.io,go.yourcompany.com
Add to ~/.bashrc or ~/.zshrc for persistence.
Use it
import "gomod.io/private-module"
import "go.yourcompany.com/private-module"
The Go toolchain resolves vanity paths to your Git repo automatically. If you ever move your code, your users’ import paths stay the same.
Module path must match the vanity URL.
Your module’s
go.modmust use the vanity URL as its module path — not the original Git hosting URL. For example:// go.mod — correct module gomod.io/private-module // go.mod — WRONG (will cause import resolution failure) module github.com/yourorg/private-moduleIf your existing module uses
github.com/...orgitlab.com/...as the module path, update it to the vanity URL before publishing.
Manage routes
# List your routes
gvu list
# Remove a route
gvu remove m_abc123
# Bulk delete
gvu remove m_abc123 m_def456 -y
# Check your account
gvu auth whoami