
`fzf-make` is a command line tool that executes commands using fuzzy finder with preview window. Currently supporting [**make**](https://www.gnu.org/software/make/), [**npm**](https://docs.npmjs.com/about-npm), [**pnpm**](https://github.com/pnpm/pnpm), [**yarn**](https://github.com/yarnpkg/berry), [**just**](https://github.com/casey/just), [**task**](https://github.com/go-task/task).
[](https://www.rust-lang.org/)
[](https://ratatui.rs/)
[](https://github.com/kyu08/fzf-make/blob/main/LICENSE)
[](https://crates.io/crates/fzf-make)
[](https://formulae.brew.sh/formula/fzf-make)
[](https://github.com/kyu08/fzf-make/releases/latest)
[](https://crates.io/crates/fzf-make)
# 🛠️ Features
- Select and execute a make target or (npm | pnpm | yarn) scripts or just recipe or task using fuzzy-finder with a preview window by running `fzf-make`!
- Execute the last executed command(By running `fzf-make --repeat`.)
- Command history
- Support [**make**](https://www.gnu.org/software/make/), [**npm**](https://docs.npmjs.com/about-npm), [**pnpm**](https://github.com/pnpm/pnpm), [**yarn**](https://github.com/yarnpkg/berry), [**just**](https://github.com/casey/just), [**task**](https://github.com/go-task/task).
- Support passing additional arguments to the command using popup window. The UI looks like: https://github.com/kyu08/fzf-make/pull/447
- [make] Support `include` directive
- [npm] Support workspace (collect scripts from all `package.json` files in the workspace using `npm query`).
- **Note that the minimum supported npm version for workspace support is `8.16.0` (required for `npm query`).**
- [pnpm] Support workspace(collect scripts all of `package.json` in the directory where fzf-make is launched.)
- [yarn] Support workspace(collect all scripts which is defined in `workspaces` field in root `package.json`.)
- [just] Support execution inside of directory of justfile.
- [task] Support `includes` with both file and directory paths, following [Taskfile schema](https://taskfile.dev/docs/reference/schema#taskfile). (fzf-make is just using output of `task --list-all --json`)
- **Note that the minimum supported task version is [`v3.44.0`](https://github.com/go-task/task/releases/tag/v3.44.0).**
- **(Scheduled to be developed)** Support config file
# 📦 Installation
## macOS
### Homebrew
```sh
# install
brew install fzf-make
```
```sh
# update
brew upgrade fzf-make
```
## Arch Linux
`fzf-make` can be installed from the [AUR](https://aur.archlinux.org/packages/fzf-make) using an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers). For example:
```sh
paru -S fzf-make
```
## NixOS / Nix (package manager)
`fzf-make` can be run from the repository (latest version)
```sh
nix run github:kyu08/fzf-make
```
Or from the nixpkgs (channel >= 23.05)
```sh
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`
## Cargo
```sh
cargo +1.90.0 install --locked fzf-make
# Or build from the latest source
cargo +1.90.0 install --git https://github.com/kyu08/fzf-make/
```
## Pre-built binaries for Linux
Pre-built binaries are available for `linux_amd64` and `linux_arm64`.
> [!NOTE]
> Replace `/usr/local/bin` with any directory in your `$PATH` if you prefer another installation place.
### linux_amd64
```sh
TAG=$(curl -fsSL https://api.github.com/repos/kyu08/fzf-make/releases/latest | grep -m1 tag_name | cut -d '"' -f 4) && curl -fsSL "https://github.com/kyu08/fzf-make/releases/download/${TAG}/fzf-make_${TAG}_linux_amd64.tar.gz" | tar -xz && sudo mv fzf-make /usr/local/bin/
```
### linux_arm64
```sh
TAG=$(curl -fsSL https://api.github.com/repos/kyu08/fzf-make/releases/latest | grep -m1 tag_name | cut -d '"' -f 4) && curl -fsSL "https://github.com/kyu08/fzf-make/releases/download/${TAG}/fzf-make_${TAG}_linux_arm64.tar.gz" | tar -xz && sudo mv fzf-make /usr/local/bin/
```
# 💡 Usage
## Run target using fuzzy finder
1. Execute `fzf-make` in the directory you want to run make target, or (npm | pnpm | yarn) scripts or just recipe.
1. Select command you want to execute. If you type some characters, the list will be filtered.