Get primer running in under two minutes
The installer detects your OS and architecture, downloads the correct binary, and places it at ~/.primer/bin/primer.
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/barestripehq/primer/releases/latest/download/primer-installer.sh | sh
primer initThis is the only setup step. It generates shims for every detected package manager and prepends ~/.primer/bin to your PATH.
primer init
What primer init does:
npm, pip, cargo, go, etc.).~/.primer/bin/.~/.primer/bin to your shell config — .zshenv for zsh, .bashrc for bash, fish function wrappers for fish.Non-interactive / Docker: use primer init --no-shell to install shims without modifying any shell config files.
Set ENV PATH="/root/.primer/bin:$PATH" in your Dockerfile instead.
which pip # → /Users/you/.primer/bin/pip
primer doctor # checks PATH order, shim health, cache, model state
primer doctor (alias: primer info) reports PATH precedence, the resolved path of each shim, cache size, and active AI model.
Download and run the MSI installer from the latest release.
It places primer.exe in %USERPROFILE%\.primer\bin and registers it in your user PATH automatically.
Then run once in a new terminal to set up shims:
primer init
What primer init does on Windows:
npm, pip, cargo, go, etc.)..cmd wrappers in %USERPROFILE%\.primer\bin\ (e.g. npm.cmd, pip.cmd).SETX so wrappers take precedence.$env:PATH update into your PowerShell 7 profile.To verify:
where npm # → C:\Users\you\.primer\bin\npm.cmd
primer doctor # checks PATH order and shim health
Git hooks on Windows: the pre-commit hook script requires Git Bash or a POSIX-compatible shell. It works out of the box for developers using Git for Windows.
| Platform | Architecture | Installer |
|---|---|---|
| macOS | Apple Silicon (aarch64) | Shell installer / .tar.xz |
| macOS | Intel (x86_64) | Shell installer / .tar.xz |
| Linux | x86_64 | Shell installer / .tar.xz |
| Linux | ARM64 (aarch64) | Shell installer / .tar.xz |
| Windows | x86_64 | MSI installer / PowerShell installer |
primer uninit reverses every change made by primer init:
primer uninit # remove shims + PATH entry
primer uninit --purge # also delete ~/.primer/cache and ~/.primer/models
primer must appear before version managers in $PATH. If nvm, pyenv, asdf, or volta are detected ahead of ~/.primer/bin, primer doctor will warn and show the exact reorder instruction.
git clone https://github.com/barestripehq/primer
cd primer
cargo build --release # core only
cargo build --release --features ai # with local AI summaries