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:| Method | Best For | Complexity | Updates |
|---|---|---|---|
| Install Script | Quick setup, CI/CD | Low | Manual |
| Package Managers | System integration | Low | Automatic |
| GitHub Releases | Specific versions | Medium | Manual |
| Build from Source | Development, customization | High | Manual |
Quick Install (Recommended)
For most users, the one-line install scripts provide the fastest path to a working installation.macOS and Linux
Open your terminal and run:- Detect your operating system and architecture
- Download the appropriate binary from GitHub Releases
- Install it to a user-local bin directory (
~/.local/binor~/bin) - Update your shell configuration if necessary
Windows PowerShell
Open PowerShell and run:- Detect your Windows architecture (x64 or ARM64)
- Download the appropriate binary from GitHub Releases
- Install it to
%LOCALAPPDATA%\*kagi*\bin - Add the directory to your PATH
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: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:Scoop (Windows)
For Windows users who prefer Scoop:npm (Node.js)
The npm package provides a cross-platform wrapper that downloads the native binary:- The package name is
kagi-cli(notkagi) - The installed command is
kagi - The wrapper downloads the matching native binary during install
- Works on any platform supported by Node.js
Cargo (Rust)
If you have the Rust toolchain installed, you can install directly from the repository: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
- Visit the GitHub Releases page
- Choose the latest release (or a specific version)
- 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
- macOS Intel:
Step 2: Extract the Binary
macOS and Linux:Step 3: Move to PATH
Choose a directory in your PATH. Common choices: macOS and Linux: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.70 or later
- Git
- Network connectivity for dependencies
Clone the Repository
Build Release Binary
- macOS/Linux:
./target/release/*kagi* - Windows:
.\target\release\*kagi*.exe
Install from Build
Option 1: Run directly~/.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:- Go to System Preferences → Security & Privacy → General
- Click “Allow Anyway” next to the kagi warning
- Run the command again
Linux
Supported Distributions:- Ubuntu 18.04+
- Debian 10+
- Fedora 32+
- CentOS/RHEL 8+
- Arch Linux
- Alpine Linux (musl build)
Windows
PowerShell Execution Policy: If you encounter execution policy errors when running the install script:- Click “More info” on the warning
- Click “Run anyway”
- 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:-
Find where kagi was installed:
- Add the directory to your PATH (see Manual Installation section)
- 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:- Use a package manager that respects system proxy settings
- Manual download: Download the release asset through a browser
- Build from source: Clone and build locally
”Cannot find binary for platform”
Problem: Your platform isn’t supported by the install script. Solutions:- Check the GitHub Releases for your platform
- Build from source
- Request support by opening an issue
Binary won’t run on Windows
Problem: Windows blocks unsigned executables. Solutions:- Click “More info” → “Run anyway” in the SmartScreen dialog
- Add Windows Defender exclusion for the kagi directory
- Use the npm package instead (Node.js handles the binary)
Installation succeeded but commands fail
Check these common issues:- Authentication not configured: Set up your tokens (see Authentication Guide)
- Wrong token for command: Check the Auth Matrix
- Network connectivity: Verify you can reach kagi.com
- 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:Next Steps
Now that kagi is installed, continue with:- Quickstart - Run your first commands
- Authentication - Set up your tokens
- Advanced Usage - Automation, scripting, and CI/CD patterns
Need help? See the Troubleshooting guide or open an issue on GitHub.