| Crates.io | match-maker |
| lib.rs | match-maker |
| version | 0.0.5 |
| created_at | 2025-11-11 00:59:32.97093+00 |
| updated_at | 2026-01-14 13:27:02.167392+00 |
| description | A fuzzy finder for the terminal, powered by nucleo |
| homepage | |
| repository | https://github.com/Squirreljetpack/matchmaker |
| max_upload_size | |
| id | 1926516 |
| size | 394,606 |
Matchmaker is a fuzzy searcher, powered by nucleo and written in rust.
(pitch + fzf credit: todo)
cargo install match-maker # note the hyphen!
Pass it some items:
find . | mm
[!NOTE] The default input and preview commands rely on fd, bat and eza. For an optimal experience, install them or update your configuration.
To begin, you can dump the default configuration to a file:
matchmaker --dump-config
The default locations are in order:
~/.config/matchmaker/config.toml (If the folder exists already).{PLATFORM_SPECIFIC_CONFIG_DIRECTORY}/matchmaker (Generally the same as above when on linux)All actions must be defined in your config.toml.
The list of currently supported actions can be found here.
To get the names of keys, type matchmaker --test-keys.
In addition to keys, actions can also be bound to Events and Crossterm events (check your default config for details).
Matchmaker can also be used as a library.
cargo add matchmaker
Here is how to use Matchmaker to select from a list of strings.
use matchmaker::nucleo::{Indexed, Worker};
use matchmaker::{MatchError, Matchmaker, Result, Selector};
#[tokio::main]
async fn main() -> Result<()> {
let items = vec!["item1", "item2", "item3"];
let worker = Worker::new_single_column();
worker.append(items);
let selector = Selector::new(Indexed::identifier);
let mm = Matchmaker::new(worker, selector);
match mm.pick_default().await {
Ok(v) => {
println!("{}", v[0]);
}
Err(err) => match err {
MatchError::Abort(1) => {
eprintln!("cancelled");
}
_ => {
eprintln!("Error: {err}");
}
},
}
Ok(())
}
Some features such as the execute, reload, and print actions, and even the previewer do not have their behavior defined directly in the render loop.
Rather, they are attached as handlers to the Matchmaker, which are triggered by certain events and interrupts generated by the loop.
Some actions can generate these triggers, as well usually performing a minimal amount of other logic.
For example, the Preview(bat {}) command generates a PreviewChanged event, and leaves the string contents as a payload in the render state. This render state is exposed to the handler, and is used to spawn the command which is then displayed to preview.
In this way, very little of the Preview action's behavior is fixed. The Execute action is another example: it simply leaves the tui before raising the execute interrupt, then re-enters before the next render -- the handler associated to the interrupt is what spawns the process in the main app.
Consequently, action handling can in some cases be customized with minimal changes. For more extensive customization however, the set of actions can be extended with a type implementing ActionExt.
For more information, check out the examples and Architecture.md