# cargo-selector

> Cargo subcommand that provides an interactive TUI for selecting and executing binary or example targets in Rust projects

Stars: 74 · Categories: Dev Tools

- Repository: https://github.com/lusingander/cargo-selector
- Website: https://lusingander.github.io/cargo-selector/
- Page: https://www.trmn.sh/tools/cargo-selector

## Install

- Cargo: `cargo install cargo-selector`
- AUR: `paru -S cargo-selector`

## Overview

cargo-selector is a Cargo subcommand that adds an interactive terminal interface for selecting and executing binary and example targets in Rust projects. Instead of manually typing `cargo run --bin` or `cargo run --example` commands, developers can run `cargo selector` to display a navigable list of available targets and execute them directly from the selection interface.

The tool provides fuzzy and substring matching for filtering targets, keyboard navigation with Vim-like keybindings (Ctrl+n/p for navigation), and the ability to switch between "run" and "build" actions using the Tab key. It supports passing additional arguments to the selected target and can filter by target kind (bin or example only). The interface displays target names, paths, and available features in a structured format.

Developers working on Rust projects with multiple binaries or examples will find this tool useful for quickly discovering and executing targets without remembering exact names. The tool supports configuration through TOML files for customizing match types and display colors, and offers both fullscreen and inline display modes for different workflow preferences.

### Installation

```bash
# via Cargo
cargo install cargo-selector
```

```bash
# via AUR
paru -S cargo-selector
```

## Alternatives

- [act3](https://www.trmn.sh/tools/act3.md): CLI tool that displays the status of the last 3 GitHub Actions workflow runs for repositories (83 stars)
- [dotenvhub](https://www.trmn.sh/tools/dotenvhub.md): TUI application for centralized management and deployment of .env files across projects (61 stars)
- [cloctui](https://www.trmn.sh/tools/cloctui.md): Terminal UI for CLOC code analysis tool that displays line counts and statistics in an interactive table (59 stars)
- [lazycelery](https://www.trmn.sh/tools/lazycelery.md): Terminal UI for monitoring and managing Celery workers, queues, and tasks with real-time updates and keyboard navigation. (Rust, 56 stars)
- [textual-astview](https://www.trmn.sh/tools/textual-astview.md): TUI tool for exploring Python Abstract Syntax Trees (AST) with interactive tree view and source highlighting (Python, 100 stars)

---

Canonical: https://www.trmn.sh/tools/cargo-selector
