| Crates.io | maki-cli |
| lib.rs | maki-cli |
| version | 0.1.0 |
| created_at | 2025-12-02 11:12:58.900019+00 |
| updated_at | 2025-12-02 11:12:58.900019+00 |
| description | A cross-platform fuzzy Makefile task finder |
| homepage | |
| repository | https://github.com/cesarferreira/maki |
| max_upload_size | |
| id | 1961629 |
| size | 258,859 |
A cross-platform fuzzy Makefile task finder and runner.
cargo install maki-cli
cargo install --path .
git clone https://github.com/cesarferreira/maki
cd maki
cargo build --release
# Binary will be at ./target/release/maki
Simply run maki in a directory with a Makefile to start the interactive fuzzy finder:
maki
Use the arrow keys to navigate, type to filter, and press Enter to run the selected target.
# Interactive fuzzy search (default)
maki
# List all targets
maki list
# Run a specific target directly
maki run build
# Interactive picker (explicit)
maki pick
| Flag | Description |
|---|---|
-f, --file <FILE> |
Use a custom Makefile |
--all |
Include private targets (starting with _) |
--patterns |
Include pattern rules (e.g., %.o: %.c) |
--json |
Output results as JSON |
--no-ui |
Skip the fuzzy finder UI |
-r, --recursive |
Scan subdirectories for Makefiles |
--dry-run |
Print command without executing |
--cwd <DIR> |
Set the working directory |
--no-cache |
Skip the cache and re-parse Makefiles |
# List all targets in JSON format
maki list --json
# Include private targets (those starting with _)
maki list --all
# Run a target without actually executing it
maki run deploy --dry-run
# Use a custom Makefile
maki -f build/Makefile list
# Scan all subdirectories for Makefiles
maki -r list
# Force re-parsing (skip cache)
maki --no-cache list
Maki automatically detects when a target requires variables and prompts you to enter them.
From comments - Define hints in your target's comment using VAR=value|value2|value3:
# Bump version (usage: make bump V=patch|minor|major)
bump:
cargo set-version --bump $(V)
When you select this target, maki shows a fuzzy-select menu with the options: patch, minor, major.
From recipe - Maki also scans recipe lines for $(VAR) or ${VAR} patterns:
# Deploy the application
deploy:
./deploy.sh --env $(ENV) --version $(VERSION)
When you select this target, maki prompts you to enter values for ENV and VERSION.
Combined - You can mix both approaches:
# Deploy (usage: make deploy ENV=dev|staging|prod)
deploy:
./deploy.sh --env $(ENV) --version $(VERSION)
This gives you a fuzzy-select for ENV (with options) and a text prompt for VERSION.
$ maki
> bump
Selected: bump
? Select value for V:
patch
> minor
major
Running: make bump V=minor
Maki automatically ignores common Make built-in variables like CC, CFLAGS, LDFLAGS, $@, $<, $^, etc.
Maki caches parsed Makefiles to improve performance. The cache:
~/Library/Caches/maki/~/.cache/maki/%LOCALAPPDATA%\maki\--no-cacheMaki detects targets using the pattern:
target_name: [dependencies]
Maki extracts descriptions from:
Inline comments using ##:
build: ## Build the project
cargo build
Preceding comments:
# Build the project with optimizations
build:
cargo build --release
Maki automatically skips:
VAR := value, VAR ?= value, VAR += value)target: VAR := value)--patterns is used)_ (unless --all is used)The --json flag outputs targets in this format:
[
{
"name": "build",
"description": "Build the project",
"file": "/path/to/Makefile",
"line": 42,
"required_vars": []
},
{
"name": "bump",
"description": "Bump version (usage: make bump V=patch|minor|major)",
"file": "/path/to/Makefile",
"line": 63,
"required_vars": [
{
"name": "V",
"hint": "patch|minor|major"
}
]
}
]
cargo build
cargo test
cargo run -- list
src/
├── main.rs # Application entry point
├── cli.rs # CLI argument parsing (clap)
├── target.rs # Target struct definition
├── makefile.rs # Makefile parsing logic
├── fuzzy.rs # Fuzzy finder UI (skim)
├── executor.rs # Task execution
├── prompt.rs # Variable prompting (dialoguer)
└── cache.rs # SHA-based caching
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.