#cli #ratatui #tui #crates-io #fuzzy-finder #makefile #gnu-make

app fzf-make

A command line tool that executes make target using fuzzy finder with preview window

16 breaking releases

new 0.24.0 Feb 17, 2024
0.22.0 Jan 23, 2024
0.12.0 Dec 15, 2023
0.10.0 Nov 30, 2023

#90 in Command line utilities

Download history 2/week @ 2023-11-02 5/week @ 2023-11-09 5/week @ 2023-11-16 33/week @ 2023-11-23 75/week @ 2023-11-30 14/week @ 2023-12-07 40/week @ 2023-12-14 14/week @ 2023-12-21 119/week @ 2023-12-28 105/week @ 2024-01-04 9/week @ 2024-01-11 111/week @ 2024-01-18 45/week @ 2024-01-25 34/week @ 2024-02-01 49/week @ 2024-02-08 467/week @ 2024-02-15

603 downloads per month

MIT license

6MB
2K SLoC

fzf-make is a command line tool that executes make target using fuzzy finder with preview window.

License:MIT Latest Release crates.io

[English] [Deutsch] [Français]

🛠️ Features

  • Select and execute a make target using fuzzy-finder
  • Execute last executed target(By running fzf-make --repeat.)
  • Command history
  • Support include directive
  • (Scheduled to be developed) Support config file

👓 Prerequisites

  • bat (In the future, we intend to make it work with cat as well, but currently it only works with bat.)

📦 Installation

macOS

Homebrew

You don't need to install bat because fzf-make will install it automatically via Homebrew.

# install
brew tap kyu08/tap
brew install kyu08/tap/fzf-make
# update 
brew update
brew upgrade fzf-make

Arch Linux

fzf-make can be installed from the AUR using an AUR helper. For example:

paru -S fzf-make

NixOS / Nix (package manager)

fzf-make can be run from the repository (latest version)

nix run github:kyu08/fzf-make

Or from the nixpkgs (channel >= 23.05)

nix run nixpkgs#fzf-make

Note You may need to enable experimental feature. In that case, execute the following command to enable them echo "experimental-features = nix-command flakes" | tee ~/.config/nix/nix.conf

OS-independent method

Cargo

cargo install --locked fzf-make

💡 Usage

Run target using fuzzy finder

  1. Execute fzf-make in the directory include makefile(file name should be one of GNUmakefile, makefile, Makefile)
  2. Select make command you want to execute. If you type some characters, the list will be filtered. demo demo

Run target from history

  1. Execute fzf-make in the directory include makefile(file name should be one of GNUmakefile, makefile, Makefile)
  2. Press Tab to move to the history pane.
  3. Select make command you want to execute. demo

Commands Supported

Command Description
fzf-make Launch fzf-make
fzf-make --repeat / fzf-make -r / fzf-make repeat Execute last executed target
fzf-make --help / fzf-make -h / fzf-make help Show help
fzf-make --version / fzf-make -v / fzf-make version Show version

💻 Development

  1. Clone this repository
  2. Change the codes
  3. Run make run

To execute test, run make test(needs nextest).

nix

Or you can use nix to create a development shell with the project dependencies.

Within the repo root, execute the following command:

nix develop

👥 Contribution

  • Contributions are welcome!
  • If you have a Feature request, please create an issue first.
  • If you have added fzf-make to some package manager, please let me know. (or please send a PR to add how to install via the package manager in the README.md)
  • If you have any questions, feel free to create an issue and ask.

🗒 Related Article(s)

Dependencies

~11–22MB
~283K SLoC