2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00
2026-03-30 17:57:34 +03:00

wand

wand is a tiny, cross-platform command runner driven by a simple YAML config file, written in Go. Define your commands and subcommands in a wand.yml, and run them from anywhere in your project tree.

Release Downloads License


🚀 Features

  • Simple YAML config: define commands, descriptions, and nested subcommands in a single file.
  • Auto-discovery: finds wand.yml by searching the current directory, parent directories, ~/, and ~/.config/.
  • Nested subcommands: commands can have arbitrarily deep children.
  • Built-in help: auto-generated --help for every command and subcommand.
  • Shell execution: runs commands via your $SHELL with proper stdin/stdout/stderr passthrough.

🎯 Installation

Download Precompiled Binaries

Grab the latest release for Linux, macOS, or Windows:

Homebrew (macOS/Linux)

Install directly from the tap:

brew install chenasraf/tap/wand

Or tap and then install the package:

brew tap chenasraf/tap
brew install wand

From Source

git clone https://github.com/chenasraf/wand
cd wand
make build

Getting Started

Create a wand.yml in your project root:

main:
  description: run the main command
  cmd: echo hello from wand

build:
  description: build the project
  cmd: go build -o myapp

test:
  description: run tests
  cmd: go test -v ./...
  children:
    coverage:
      description: run tests with coverage
      cmd: go test -coverprofile=coverage.out ./...

Run a command

# run the main (default) command
wand

# run a named command
wand build

# run a nested subcommand
wand test coverage

# show help
wand --help
wand test --help

📁 Config Resolution

wand searches for wand.yml (or wand.yaml) in the following order:

  1. Current working directory (./wand.yml)
  2. Parent directories (searching upward to the filesystem root)
  3. Home directory (~/.wand.yml)
  4. Config directory (~/.config/wand.yml)

The first config file found is used.


📖 Config Reference

Each top-level key defines a command. The special key main becomes the root (no-argument) command.

Field Type Description
description string Short description shown in --help
cmd string Shell command to execute
children map[string]Command Nested subcommands (same structure)

🛠️ Contributing

I am developing this package on my free time, so any support, whether code, issues, or just stars is very helpful to sustaining its life. If you are feeling incredibly generous and would like to donate just a small amount to help sustain this project, I would be very very thankful!

Buy Me a Coffee at ko-fi.com

I welcome any issues or pull requests on GitHub. If you find a bug, or would like a new feature, don't hesitate to open an appropriate issue and I will do my best to reply promptly.


📜 License

wand is licensed under the CC0-1.0 License.

Description
YAML-driven command runner with nested subcommands
Readme MIT 67 KiB
Languages
Go 97.1%
Makefile 2.9%