Skip to content

Installation

Raffi can be installed through multiple package managers or built from source. Choose the method that works best for your system.

Install directly from crates.io using Rust’s package manager:

Terminal window
cargo install raffi

This will download, compile, and install the latest version of Raffi with all features enabled.

What you need
  • Rust toolchain (install via rustup)
  • Cargo (comes with Rust)

Prebuilt binaries for various platforms are available from the GitHub releases page.

  1. Download the archive

    Visit the releases page and download the archive or package for your platform.

  2. Extract the binary

    Extract the archive and move the raffi binary to a directory in your PATH:

    Terminal window
    tar xzf raffi-*.tar.gz
    sudo mv raffi /usr/local/bin/
  3. Make it executable

    Ensure the binary has execute permissions:

    Terminal window
    chmod +x /usr/local/bin/raffi

Clone the repository and build with all features:

Terminal window
git clone https://github.com/chmouel/raffi.git
cd raffi
cargo build --release

The binary will be available at target/release/raffi (approximately 15 MB).

For a significantly smaller binary with only Fuzzel support:

Terminal window
git clone https://github.com/chmouel/raffi.git
cd raffi
cargo build --release --no-default-features

This removes the iced GUI dependency, reducing the binary size from ~15 MB to ~1.1 MB.

Terminal window
# ~15 MB binary with all features
cargo build --release

After building, install to your local bin directory:

Terminal window
cargo install --path .

Or manually copy the binary:

Terminal window
sudo cp target/release/raffi /usr/local/bin/

Check that Raffi is installed correctly:

Terminal window
raffi --help

You should see the help output with available options:

Usage: raffi [OPTIONS]
Options:
-p, --print-only Print command instead of executing
-c, --configfile <FILE> Use custom configuration file
-r, --refresh-cache Refresh icon cache
-I, --no-icons Disable icons
-u, --ui-type <TYPE> Select UI: fuzzel or native
-i, --initial-query <QUERY> Pre-fill search (native mode)
-t, --theme <THEME> Theme: dark or light (native mode)
--default-script-shell <SHELL> Default interpreter for scripts

For contributors who want to set up the development environment:

  1. Clone the repository

    Terminal window
    git clone https://github.com/chmouel/raffi.git
    cd raffi
  2. Install pre-commit hooks

    Set up pre-commit hooks that run cargo clippy before commits:

    Terminal window
    pip install pre-commit
    pre-commit install
  3. Build and test

    Terminal window
    cargo build
    cargo test
    cargo clippy