Tags

  • Rust
  • CLI
  • Utility

A command-line interface (CLI) tool that automates simple tasks using a simple configuration file

Overview

Machfile is a simple task runner for when a full build system is overkill. Tasks are defined in a configuration file (.toml or .yaml). It is inspired by Makefiles, but with a more modern approach and a simpler syntax.

  • Tasks can use dependencies, environment variables, working directories and .env files
  • Dynamic autocompletion for zsh and bash, including task descriptions
  • The configuration is found automatically inside a Git repository
  • Available as a CLI (mach) and as a reusable Rust library

Example

[run]
script = "cargo run"
desc = "Run with debug logging"
options.environment.RUST_LOG = "mach=debug,info"
options.allow_args = true

[clean]
script = "rm -rf target"
desc = "Remove cache and outputs"

[install]
script = "cargo install --path ."
deps = ["clean"]

Installation

AUR

We package mach for the Arch Linux User Repository (AUR). Mach can be installed with an AUR helper such as yay:

yay -S machfile-cli

Homebrew

We provide a Homebrew tap at machfile/tap.

brew install machfile/tap/machfile

Cargo

Machfile can also be installed directly via Cargo:

cargo install machfile-cli --locked

Binaries

Binaries for Linux and macOS can be downloaded from the GitHub releases page.