alf — Alias & Function CLI Searching Tool
A Rust TUI to rediscover your custom shell aliases & functions.

Installation
From Crates.io
Using Mise
# Prebuilt binary from the GitHub releases
# Or build from the published crate
Using Homebrew
From Source
Quick Start
-
First-time setup: Run the initialization wizard
-
Launch the search interface:
[!TIP]
After installing,
alfcan be run right away. Using theinitcommand creates a starting config file for you to be able to customize.
Configuration
Configuration file location (created after alf init):
- Linux:
~/.config/alf/config.toml - macOS:
~/.config/alf/config.toml - Windows:
%USERPROFILE%\.config\alf\config.toml
Available Commands
alf- Launch interactive TUI (default, no subcommand)alf search <QUERY>- Launch TUI with an initial search query pre-filledalf init- First-run configuration wizardalf init --print-shell-hook <SHELL>- Print the shell wrapper and exit (non-interactive equivalent ofalf activate <SHELL>)alf activate <SHELL>- Print shell integration wrapper (zshorbash)alf config add <PATH>...- Add one or more shell source files toshell_files(e.g.alf config add ~/.work_aliases); paths must be absolute or start with~/$HOME, and must already existalf config show- Display current configurationalf config edit- Open config in editoralf config reset- Reset to defaults
Configuration Options
Running alf init writes a config.toml like the one below.
The shell_files list is filled in with the shell files detected in your home directory (plus any you add during the wizard), and theme reflects your menu choice; every other value is the built-in default.
The comments are annotations for this README and are not written to the generated file.
[]
= true # show Alias/Function badges
= true # syntax highlight in detail view
= true # parse and display comments from shell files
[]
= ["~/.bashrc", "~/.zshrc"] # detected at init; glob patterns supported
= "name" # "name" | "script" — what Tab/Enter feeds back to the shell
[]
= "smart" # "ignore" | "smart" | "respect"
= true # unicode normalization
= true
= true
[]
= "default" # see Available Themes below
= "vim" # currently only "vim" is supported
Available Themes
default- Classic terminal colorsgruvbox- Retro groovenord- Arctic bluedracula- Purple/pink dark themesolarized- Precision colorscatppuccin- Soothing pastels (Mocha)tokyonight- Tokyo-inspired dark theme (Storm)shades_of_purple- Purple-heavy theme
Keybindings (Vim-style)
The full reference is always available in-app — press ? to toggle the help modal.
Panels & filters
Grouping & sorting
Search
Themes
Actions & quit
Shell Integration
Tab and Enter only affect the parent shell when the alf shell hook is sourced. Add this to your shell config:
# zsh (~/.zshrc)
# bash (~/.bashrc)
The hook installs an alf shell function that wraps the binary so selections feed back into the prompt.
Tab vs Enter semantics:
- Tab — populate the prompt with the selected entry; do not run it.
- Enter — run the selected entry immediately (and add it to history).
Development
Requirements
- Rust 1.74.0 or later
Build
Run tests
Run locally
Makefile targets
| Target | Description |
|---|---|
make build |
Debug build |
make build-release |
Optimized release build |
make check |
Check without building |
make clean |
Remove build artifacts |
make clippy |
Lint check |
make fmt / make fmt-fix |
Check / auto-fix formatting |
make install |
Install locally |
make lint |
Run fmt + clippy |
make run |
Run TUI (debug build) |
make snap |
Review insta snapshot diffs |
make test |
Run tests via nextest |
make test-cov |
Generate HTML coverage report |
make test-fresh |
Run tests with no cache |
make watch |
Watch & rebuild on changes |
Supported Platforms
- Linux (x86_64, aarch64)
- macOS (Intel, Apple Silicon)
- Windows (x86_64)
License
Licensed under either of the following choices at your option.
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)