Skip to content

Features

github-actions[bot] edited this page Sep 9, 2026 · 1 revision

Features

Namespaces

Group related tasks using colon notation (namespace:task):

db:migrate:
    migrate -path ./migrations -database "$DATABASE_URL" up

db:seed:
    go run ./cmd/seed

db:fresh:
    dropdb --if-exists app_dev && createdb app_dev

docker:up:
    docker compose up -d

docker:down:
    docker compose down -v

Namespaces act like command groups:

# Discover tasks inside the 'db' namespace
rune db
# or
rune db --help
Namespace:
  db

Usage:
  rune db:<task> [arguments] [flags]

Available Tasks:
  fresh    Reset the database
  migrate  Run database migrations
  seed     Seed the database

Dependencies

Specify task dependencies on the signature line after the colon:

build:
    go build ./...

test: build
    go test ./...

release: build test
    ./release.sh

Dependency Guarantees

Guarantee Description
Deterministic Ordering Dependencies execute before their dependent task
Deduplication build runs only once even if multiple tasks depend on it
Cycle Detection Circular dependencies are detected before any command runs
Fail-Fast Non-zero exit code halts execution immediately
✗ Dependency cycle detected: A -> B -> A

Confirmation & Safety

Protect dangerous or destructive actions with #[confirm: message]:

#[Reset the database]
#[confirm: This will permanently delete all database data.]
db:fresh:
    dropdb --if-exists app_dev && createdb app_dev

When invoked interactively:

  WARN  This will permanently delete all database data.

  Continue?
  ❯ Yes    No
Key Action
/ , Tab, h / l Toggle selection
Enter or Space Execute selected choice
y Confirm immediately
n, Esc, Ctrl+C Cancel

Automated Fallback: In non-interactive environments (pipes, CI), Rune falls back to line-based Continue? [y/N] input.

Graph-Level Safety

Confirmation occurs before any task in the dependency graph executes. If deploy depends on db:fresh, the prompt appears upfront before any dependency runs.

Non-Interactive Bypass

rune --yes db:fresh
# or
rune -y db:fresh

Dry Run

Simulate execution and inspect the resolved command sequence without running anything:

rune --dry-run release
[dry-run] Execution plan for 'release':
  1. build
     $ go build ./...
  2. test
     $ go test ./...
  3. release
     $ ./release.sh
  • Displays the exact topological execution order.
  • Interpolates arguments and flags into command strings.
  • Bypasses confirmation prompts automatically.

Help & Discovery

Every task, namespace, and root command is self-documenting.

Root Help

rune
rune list
rune --help
  █▀█ █░█ █▄░█ █▀▀
  █▀▄ █▄█ █░▀█ ██▄  0.1.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command
  -v, --version         Display this application version
  -f, --file[=FILE]     Path to task file (default: Runefile)
      --dry-run         Simulate execution without running commands
  -y, --yes             Bypass confirmation prompts

Available commands:
  build                 Build the application binary
  test                  Run unit and integration tests
 db
  db:fresh              Reset the database schema

Task Help

rune build --help
# or
rune help build

Namespace Help

rune db --help
# or
rune db
# or
rune help db

Environment Handling

Variable Description
Auto .env loading Loaded automatically if .env exists beside the Runefile
RUNE_TASK Name of the active task (e.g. build)
RUNE_ARG_<NAME> & <NAME> Value of resolved positional arguments
RUNE_FLAG_<NAME> Set to 1 when the flag is enabled

Child processes also inherit the full system environment (os.Environ()).

Clone this wiki locally