Skip to content

Console UI

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

Console UI Components

Rune includes built-in console UI components styled after modern CLI frameworks (inspired by Laravel Console / Termwind). Use them directly from the shell or inside your Runefile task recipes.

Available Components

Command Badge Color Exit Code Purpose
rune info <msg> INFO Blue bg, white bold 0 Informational status updates
rune warn <msg> WARN Yellow bg, black bold 0 Warnings or cautionary alerts
rune done <msg> DONE Green bg, white bold 0 Successful completions (alias: rune success)
rune fail <msg> FAIL Red bg, white bold 1 Task or validation failure alerts
rune error <msg> ERROR Red bg, white bold 1 System error or fatal exception alerts

Example Usage in a Runefile

#[Deploy application to production]
#[confirm: Are you sure you want to deploy to production?]
deploy:
    rune info "Preparing deployment assets..."
    npm run build
    rune info "Syncing files to remote server..."
    rsync -avz ./dist/ user@example.com:/var/www/
    rune done "Deployment finished successfully!"

#[Verify system dependencies]
check:
    test -f .env || (rune error "Missing .env configuration file!" && exit 1)
    git diff --quiet || (rune fail "Working directory has unstaged changes!" && exit 1)
    rune done "All checks passed."

Output:

  INFO  Preparing deployment assets...

  DONE  Deployment finished successfully!

Task Precedence: If your Runefile explicitly defines a custom task named info, warn, error, fail, or done, your custom task definition takes precedence over the built-in component.

Clone this wiki locally