Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lemtoc/muu

Repository files navigation

muu

A minimal, fast task runner written in Rust.

muu interactive selector

Features

  • TOML-based task definitions
  • Local (muu.toml) and global (~/.config/muu/config.toml) configuration
  • Interactive task selector with fuzzy filtering
  • Positional and named arguments with defaults
  • Multi-line commands with fail-fast execution
  • Single binary, no runtime dependencies

Install

Shell (macOS / Linux)

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mfyuu/muu/releases/latest/download/muu-installer.sh | sh

PowerShell (Windows)

powershell -ExecutionPolicy Bypass -c "irm https://github.com/mfyuu/muu/releases/latest/download/muu-installer.ps1 | iex"

Homebrew (macOS)

brew install mfyuu/tap/muu

Quick Start

Create a muu.toml in your project:

muu init

This generates a starter file. Edit it to define your tasks:

[tasks.hello]
cmd = "echo hello"
[tasks.deploy]
description = "Deploy to S3"
cmd = "aws s3 sync $dir s3://$bucket"
args = { dir = ".", bucket = "" }
[tasks.setup]
cmd = """
brew install node
npm install
"""

Usage

Run a task

muu deploy ./dist my-bucket # positional args
muu deploy --bucket=my-bucket # named args (dir uses default ".")
muu hello # no args

Interactive selector

muu

Launches a fuzzy-searchable task selector. If the selected task has arguments, you'll be prompted for each one.

List tasks

muu list
deploy - Deploy to S3 [local]
hello [local]
setup [local]

Filter by scope

muu -l # local tasks only
muu -g # global tasks only
muu list -l # works with list too

Task Definition

Field Type Required Description
cmd string yes Command to run. Use """ for multi-line.
description string no Shown in muu list and the selector.
args inline table no Argument definitions. Key order = positional order.

Arguments

args = { dir = ".", bucket = "" }
  • Non-empty value = optional (used as default)
  • Empty string "" = required (error if not provided)
  • "?" = optional with no default (empty string if omitted)
  • Key order determines positional argument order
# Optional argument example
[tasks.greet]
cmd = """
if [ -n "$name" ]; then echo "Hello, $name!"; else echo "Hello!"; fi
"""
args = { name = "?" }
muu greet # Hello!
muu greet Alice # Hello, Alice!

Shell Completions

Tab completion for task names, subcommands, and flags.

Zsh (add to ~/.zshrc):

source <(COMPLETE=zsh muu)

Bash (add to ~/.bashrc):

source <(COMPLETE=bash muu)

Fish (add to ~/.config/fish/config.fish):

COMPLETE=fish muu | source

Configuration

  • Local: searches upward from the current directory for muu.toml
  • Global: ~/.config/muu/config.toml
  • Local tasks override global tasks with the same name

License

MIT

About

A minimal, fast task runner written in Rust.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /