Installation#
Quick Install (Linux / macOS)#
curl -sSL https://raw.githubusercontent.com/ndy40/cairn/main/install.sh | shThis downloads the latest release binary for your platform and places it in /usr/local/bin. Since /usr/local/bin is typically in your system PATH, cairn should be accessible immediately after installation.
Permission Requirements#
The installer may prompt for sudo to write to /usr/local/bin. If you don’t have sudo access or prefer user-only installation, use:
sh install.sh --install-dir ~/.local/binThen ensure ~/.local/bin is in your shell’s PATH. Add this line to your shell profile (~/.zshrc, ~/.bashrc, or ~/.profile):
export PATH="$HOME/.local/bin:$PATH"Then reload your shell:
source ~/.zshrc # or ~/.bashrc, or ~/.profileInstall Options#
# Install to a custom directory
sh install.sh --install-dir /usr/local/bin
# Install a specific version
sh install.sh --version v0.0.1
# Non-interactive (CI/CD environments)
sh install.sh -y
# Non-interactive with Vicinae extension
sh install.sh -y --with-extension
# One-liner with Vicinae extension
curl -sSL https://raw.githubusercontent.com/ndy40/cairn/main/install.sh | sh -s -- -y --with-extension
# Also install the desktop app
sh install.sh -y --with-desktopIf Vicinae is installed on your system, the installer will offer to set up the Cairn extension automatically. In interactive mode it also offers to install the desktop app, a native app window for searching, adding and opening bookmarks. The installer no longer sets the desktop app to start at login; turn that on in its Settings. --no-autostart is still accepted but does nothing.
Build from Source#
Requires Go 1.22+. The binary is built with CGO_ENABLED=0 for a fully static, dependency-free executable.
git clone https://github.com/ndy40/cairn.git
cd cairn
go build -o cairn ./cmd/cairn/To cross-compile for another platform:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o cairn-linux-arm64 ./cmd/cairn/Pre-built Binaries#
Pre-built binaries for Linux and macOS (amd64 and arm64) are available on the GitHub Releases page. Each release includes SHA256 checksums.
Supported platforms:
| OS | Architectures |
|---|---|
| Linux | amd64, arm64 |
| macOS | amd64, arm64 (Apple Silicon) |
| Windows | amd64 |
Verify Installation#
cairn versionDatabase Location#
Cairn creates its SQLite database automatically on first run:
| OS | Default path |
|---|---|
| Linux | $XDG_DATA_HOME/cairn/bookmarks.db (default: ~/.local/share/cairn/bookmarks.db) |
| macOS | ~/Library/Application Support/cairn/bookmarks.db |
| Windows | %APPDATA%\cairn\bookmarks.db |
Override the path with --db <path>, the CAIRN_DB_PATH environment variable, or the db_path key in cairn.json.
Uninstall#
cairn uninstall # Remove cairn, the Vicinae extension and desktop app; keep your bookmarks
cairn uninstall --purge # Also delete the database, cairn.json and sync.jsonRemove cairn and keep your bookmarks#
Run cairn uninstall. It lists what it will remove and asks before going ahead. It removes:
- the
cairnbinary - the Vicinae extension, if installed
- the desktop app, if installed. A running app is stopped first.
- Linux:
cairn-desktop, plus its launcher, autostart entry, icon and version file - macOS:
~/Applications/cairn-desktop.app, plus its login item and version file
- Linux:
Your bookmarks database, cairn.json and sync.json stay where they are. When it finishes, cairn lists them with an rm command you can run later. If you reinstall, cairn finds them again and your bookmarks are back.
Remove everything#
Run cairn uninstall --purge to also delete:
- the database, with its
-waland-shmfiles cairn.jsonsync.json
This can’t be undone. To keep a copy of your bookmarks, export them first:
cairn list --json > bookmarks.jsonAdd -y to either command to skip the confirmation prompt, for example in scripts.
If cairn is in /usr/local/bin#
The quick installer puts cairn in /usr/local/bin, which usually needs sudo to change. In that case cairn uninstall changes nothing. It prints the commands to run instead and exits with code 4:
cairn uninstall: permission denied: cannot remove /usr/local/bin/cairn, /usr/local/bin/cairn-desktop
Run these commands instead:
pkill -x cairn-desktop
sudo rm '/usr/local/bin/cairn' '/usr/local/bin/cairn-desktop'
rm '/home/me/.local/share/cairn/desktop-version.txt' '/home/me/.local/share/applications/cairn-desktop.desktop' ...Don’t run sudo cairn uninstall. Under sudo, cairn may look for your files in root’s home directory and miss them.
What uninstalling doesn’t touch#
- Dropbox: the copy of your bookmarks in Dropbox (
cairn/sync.json) is never deleted. Remove it from Dropbox yourself if you no longer need it. - Keyboard shortcuts: if you added a custom shortcut for
cairn-desktop --togglein your desktop’s keyboard settings, for example on GNOME, remove it there. cairn doesn’t change desktop settings. - A desktop app installed elsewhere: on Linux, only a
cairn-desktopinstalled next to thecairnbinary is removed. One elsewhere on yourPATHis left in place.
Uninstall manually#
Use this if your cairn is too old to have cairn uninstall, or if you’re on Windows, where a running program can’t delete itself. On Windows, cairn uninstall prints the paths for you. Remove the binary, then whichever of these files you no longer need:
| What | Linux | macOS |
|---|---|---|
| Binary | /usr/local/bin/cairn (or your --install-dir) | /usr/local/bin/cairn (or your --install-dir) |
| Bookmarks | ~/.local/share/cairn/ | ~/Library/Application Support/cairn/ |
| Config and Dropbox token | ~/.config/cairn/cairn.json, ~/.config/cairn/sync.json | ~/Library/Application Support/cairn/cairn.json, ~/Library/Application Support/cairn/sync.json |
| Vicinae extension | ~/.local/share/vicinae/extensions/cairn/ | ~/Library/Application Support/vicinae/extensions/cairn/ |
To remove the desktop app by hand, see Desktop App → Uninstalling.
See cairn uninstall for all flags and exit codes.