Skip to main content

Installation Guide

This comprehensive guide covers all methods for installing the kagi CLI on supported platforms. Whether you prefer package managers, manual installation, or building from source, you’ll find detailed instructions here.

Overview of Installation Methods

The kagi CLI can be installed through several methods: For most users, the one-line install scripts provide the fastest path to a working installation.

macOS and Linux

Open your terminal and run:
This script will:
  1. Detect your operating system and architecture
  2. Download the appropriate binary from GitHub Releases
  3. Install it to a user-local bin directory (~/.local/bin or ~/bin)
  4. Update your shell configuration if necessary
Verification:
You should see the help output listing all available commands.

Windows PowerShell

Open PowerShell and run:
This script will:
  1. Detect your Windows architecture (x64 or ARM64)
  2. Download the appropriate binary from GitHub Releases
  3. Install it to %LOCALAPPDATA%\*kagi*\bin
  4. Add the directory to your PATH
Verification:

What the Installers Do

The install scripts are designed to be safe and non-destructive:
  • No sudo required: Installs to user directories, not system directories
  • Non-destructive: Won’t overwrite existing installations without warning
  • Shell integration: Automatically updates PATH in .bashrc, .zshrc, or PowerShell profile
  • Self-contained: No runtime dependencies or external libraries required

Post-Installation Setup

After installation, you may need to: Reload your shell configuration:
Or open a new terminal window to pick up the PATH changes.

Package Manager Installation

For users who prefer package managers, kagi is available through several channels.

Homebrew (macOS and Linux)

If you use Homebrew, you can install kagi via a custom tap:
Updating:
Uninstalling:

Scoop (Windows)

For Windows users who prefer Scoop:
Updating:
Uninstalling:

npm (Node.js)

The npm package provides a cross-platform wrapper that downloads the native binary:
Or with pnpm:
Or with bun:
Important notes:
  • The package name is kagi-cli (not kagi)
  • The installed command is kagi
  • The wrapper downloads the matching native binary during install
  • Works on any platform supported by Node.js
Updating:

Cargo (Rust)

If you have the Rust toolchain installed, you can install directly from the repository:
Or from a local checkout:
Note on crates.io: The package is not currently published to crates.io because both kagi and kagi-cli names are already taken. GitHub Releases remain the canonical distribution method.

Manual Installation from GitHub Releases

For users who want full control over the installation process or need to install a specific version.

Step 1: Download the Release

  1. Visit the GitHub Releases page
  2. Choose the latest release (or a specific version)
  3. Download the appropriate asset for your platform:
    • macOS Intel: kagi-x86_64-apple-darwin.tar.gz
    • macOS Apple Silicon: kagi-aarch64-apple-darwin.tar.gz
    • Linux x86_64: kagi-x86_64-unknown-linux-gnu.tar.gz
    • Linux ARM64: kagi-aarch64-unknown-linux-gnu.tar.gz
    • Windows x64: kagi-x86_64-pc-windows-msvc.zip

Step 2: Extract the Binary

macOS and Linux:
Windows:

Step 3: Move to PATH

Choose a directory in your PATH. Common choices: macOS and Linux:
Windows:

Step 4: Verify Installation

Building from Source

For developers who want to modify the code or build for an unsupported platform.

Prerequisites

  • Rust toolchain 1.85 or later
  • Git
  • Network connectivity for dependencies
Install Rust: If you don’t have Rust installed:
Verify installation:

Clone the Repository

Build Release Binary

The compiled binary will be at:
  • macOS/Linux: ./target/release/*kagi*
  • Windows: .\target\release\*kagi*.exe

Install from Build

Option 1: Run directly
Option 2: Install to Cargo bin directory
This installs to ~/.cargo/bin/ (already in PATH if you have Rust installed). Option 3: Manual installation

Development Build

For development and testing, use the debug build (faster compilation):

Platform-Specific Instructions

macOS

Apple Silicon (M1/M2/M3) and Intel Both architectures are supported. The install scripts and Homebrew automatically detect your architecture. Gatekeeper Notes: macOS may warn about the binary being from an unidentified developer. To allow it:
  1. Go to System Preferences → Security & Privacy → General
  2. Click “Allow Anyway” next to the kagi warning
  3. Run the command again
Or bypass for a single execution:

Linux

Supported Distributions:
  • Ubuntu 18.04+
  • Debian 10+
  • Fedora 32+
  • CentOS/RHEL 8+
  • Arch Linux
  • Alpine Linux (musl build)
Dependencies: The binary is statically linked and has no runtime dependencies beyond the Linux kernel. Shell Completion: To enable tab completion, install a generated completion script for your detected shell:
You can also choose the shell explicitly:
For manual installs, write the generated script yourself:
The older kagi --generate-completion <shell> shortcut still prints the generated script to stdout.

Windows

PowerShell Execution Policy: If you encounter execution policy errors when running the install script:
Then re-run the install command. Windows Defender: Windows Defender may flag the binary as unfamiliar. This is normal for new releases. You can:
  1. Click “More info” on the warning
  2. Click “Run anyway”
  3. Or add an exclusion for the kagi directory

Verification and Testing

After installation, verify everything works:

Basic Functionality

Authentication Test (if you have tokens)

Troubleshooting

”command not found” or “kagi is not recognized”

Problem: The binary isn’t in your PATH. Solution:
  1. Find where kagi was installed:
  2. Add the directory to your PATH (see Manual Installation section)
  3. Reload your shell or open a new terminal

”Permission denied” (macOS/Linux)

Problem: The binary doesn’t have execute permissions. Solution:

Network errors during installation

Problem: Corporate proxy or firewall blocking the download. Solutions:
  1. Use a package manager that respects system proxy settings
  2. Manual download: Download the release asset through a browser
  3. Build from source: Clone and build locally

”Cannot find binary for platform”

Problem: Your platform isn’t supported by the install script. Solutions:
  1. Check the GitHub Releases for your platform
  2. Build from source
  3. Request support by opening an issue

Binary won’t run on Windows

Problem: Windows blocks unsigned executables. Solutions:
  1. Click “More info” → “Run anyway” in the SmartScreen dialog
  2. Add Windows Defender exclusion for the kagi directory
  3. Use the npm package instead (Node.js handles the binary)

Installation succeeded but commands fail

Check these common issues:
  1. Authentication not configured: Set up your tokens (see Authentication Guide)
  2. Wrong token for command: Check the Auth Matrix
  3. Network connectivity: Verify you can reach kagi.com
  4. Rate limiting: Wait a few minutes and try again

Updating from an old version

Using install script: Re-run the install script - it will overwrite the existing binary. Using package manager:

Uninstallation

To completely remove kagi: macOS/Linux:
Windows:
Package managers:

Next Steps

Now that kagi is installed, continue with:
Need help? See the Troubleshooting guide or open an issue on GitHub.