Skip to content

CLI Options

Raffi supports several command-line flags to control its behavior. All flags are optional and override settings from the configuration file.

--help boolean (default: false)

Print help message and exit.

--version boolean (default: false)

Print version information and exit.

-c, --configfile string (default: ~/.config/raffi/raffi.yaml)

Path to the YAML configuration file.

Supports tilde expansion (~/) and environment variable expansion (${VAR}).

Terminal window
raffi -c ~/custom/config.yaml
raffi --configfile ~/custom/config.yaml

-u, --ui-type string (default: fuzzel)

Select the user interface backend.

Valid values:

  • fuzzel - Uses the external Fuzzel launcher (requires Fuzzel to be installed)

  • native - Uses the built-in iced-based graphical interface (requires build with wayland feature)

    Terminal window
    raffi -u native

-I, --no-icons boolean (default: false)

Disable icon loading for faster startup.

When enabled, no icons will be displayed in the launcher interface. This can significantly speed up startup time, especially on first launch.

Terminal window
raffi -I

-i, --initial-query string

Pre-fill the search field with an initial query.

Only works in native UI mode. Useful for launching Raffi with a specific search term already entered.

Terminal window
raffi -u native -i firefox

-t, --theme string (default: dark)

Select the color theme for the native UI.

Valid values:

  • dark - Dracula-inspired dark theme (default)

  • light - Rose Pine Dawn light theme

    Only affects native UI mode.

    Terminal window
    raffi -u native -t light

-p, --print-only boolean (default: false)

Print the command to stdout instead of executing it.

Useful for debugging or integrating with window managers that execute commands separately.

Terminal window
raffi -p
# Output: firefox --marionette

Example with Sway:

Terminal window
raffi -p | xargs swaymsg exec --

-P, --default-script-shell string (default: bash)

Set the default shell interpreter for script entries.

Used when a configuration entry has a script field but no explicit binary field. Common values include bash, zsh, sh, python3, etc.

Terminal window
raffi --default-script-shell zsh

-r, --refresh-cache boolean (default: false)

Refresh the cached icon paths.

Raffi caches icon locations from system directories to speed up subsequent launches. Use this flag to force regeneration of the cache, for example after installing new icon themes.

Terminal window
raffi -r

Cache location: $XDG_CACHE_HOME/raffi/icon.cache (defaults to ~/.cache/raffi/icon.cache)

Launch with default settings:

Terminal window
raffi

Use a custom config file:

Terminal window
raffi --configfile ~/.config/work/raffi.yaml

Launch the native UI with light theme and no icons:

Terminal window
raffi -u native -t light -I

Print the selected command without executing:

Terminal window
raffi -p

Launch with an initial search query:

Terminal window
raffi -u native -i "screenshot"

Refresh icon cache and use zsh for scripts:

Terminal window
raffi -r --default-script-shell zsh

Command-line flags always take precedence over settings in the configuration file’s general section. This allows you to override persistent defaults on a per-launch basis.