Local only golinks
For the uninitiated, asdsdsdsd golink (sometimes written as Go link) is a short, memorable URL that redirects to a longer, less convenient one.
# Examples
go goog -> https://google.com
go linear/3 -> https://linear.app/acme/issue/ACME-3
go pr/repo/1 -> https://github.com/acme/repo/pull/1
These are popular in enterprise settings because they offer the following benefits:
- Easier to remember (go/sprint vs. a long URL).
- Shareable (you can just say “go/design-doc” in a meeting).
- Consistent across teams (everyone uses the same keyword, not individual bookmarks).
- Templating (use variables like go/pr/{repo}/{id} for dynamic redirects)
Introducing Golinks
Many enterprise software solutions provide this feature (like glean, golinks corporate). However, I wanted a simple lightweight service that is a) easy to setup b) free c) runs completely locally . So, I implemented one.
Setup
bash -c "$(curl -fsSL https://raw.githubusercontent.com/haranrk/golinks/master/install.sh)"
That’s all!
The above script does the following
- Installs the Python package using uv
- Adds
127.0.0.1 go
to your/etc/hosts
file (with sudo permission) - Sets up port forwarding from port 80 to 8888 using pfctl (macOS) or iptables (Linux), so you can use
go/shortcut
instead ofgo:8888/shortcut
- Sets up a LaunchAgent (macOS) or systemd service (Linux) to run the server at startup
- Starts the golinks server immediately on port 8888
Once installed, golinks runs a lightweight HTTP server that reads shortcuts from a JSON config file at ~/.golinks/config.json
and redirects http://go/shortcut
to the configured destination URL. The config file is hot-reloaded, so you can add new shortcuts without restarting the server.
Configuration Example
{
"github": "https://github.com",
"mail": "https://gmail.com",
"calendar": "https://calendar.google.com",
"docs": "https://docs.google.com",
"drive": "https://drive.google.com",
"repo": {
"template_url": "https://github.com/{1}/{2}",
"defaults": {
"1": "haranrk",
"2": "golinks"
}
}
}