Cargo subcommand that provides an interactive TUI for selecting and executing binary or example targets in Rust projects
cargo-selector is a Cargo subcommand that adds an interactive terminal interface for selecting and running binary or example targets in Rust projects. Instead of manually typing cargo run --bin or cargo run --example commands, developers can launch a TUI that displays all available targets and execute them with keyboard navigation.
The tool supports both substring and fuzzy matching for filtering targets, and provides two main actions: run and build. Users can pass additional arguments through the -a flag, which get appended to the final cargo command. The interface includes vim-style keybindings (Ctrl+n/p for navigation) alongside arrow keys, with Tab to switch between run/build actions.
Configuration is handled through a TOML file specified via the CARGO_SELECTOR_CONFIG environment variable, allowing customization of match types, colors, and display preferences. The tool targets Rust developers working on projects with multiple binaries or examples who want to avoid remembering target names or repeatedly typing lengthy cargo commands.
# via Cargo
cargo install cargo-selector
# via AUR
paru -S cargo-selector