CLI reference
rite [flags...] [task...] [KEY=value...]Runs the named task(s), passing any KEY=value pairs as CLI-tier vars (tier 2). With no task, runs default.
Most-used flags
| Flag | What it does |
|---|---|
-i, --init | Write a starter Ritefile.yml in the current dir |
-l, --list | List tasks with descriptions |
-a, --list-all | List all tasks (including undescribed) |
-j, --json | JSON output for --list/--list-all |
-w, --watch | Rerun the task when its sources: change |
-v, --verbose | Log var resolution, execution steps, etc. |
-s, --silent | Suppress command echo |
-f, --force | Force the task to run even if sources are unchanged |
-d, --dir DIR | Set the Ritefile's working directory |
-t, --taskfile FILE | Point at an explicit Ritefile |
--set KEY=value | Explicit form of the positional KEY=value |
--dry | Show what would run, don't execute |
--status | Non-zero exit if any named task is not up-to-date |
--migrate [FILE] | Convert a go-task Taskfile to a Ritefile. See Migration |
--completion SHELL | Print completion script (bash, zsh, fish, powershell) |
--experiments | List experiment flags |
--version | Print version |
Full list: rite --help.
Listing and inspecting tasks
--list and --list-all produce a per-task summary suitable for grep-ing or piping to a fuzzy-finder.
$ rite --list
task: Available tasks for this project:
* build: Build the binary
* test: Run the test suite
* lint: golangci-lint--list shows only tasks with a desc: field. --list-all includes everything — even internal-by-convention _helper style tasks (but not tasks marked internal: true; those are hidden from both).
JSON form for tooling:
rite --list --json
rite --list-all --jsonThe JSON is stable enough to script against — task name, description, aliases, location.
--summary for a single task
--summary <task> prints the long description (the task's summary: field, falling back to desc: if no summary: is set), plus its declared dependencies:
$ rite --summary deploy
task: deploy
Deploy the current build to the named environment. Requires
ENV=staging|prod. Runs build and test as deps before deploying.
dependencies:
- build
- testUse summary: for tasks where the user really needs to know what's about to happen before they invoke. Use desc: for the one-line listing.
Tab completion
rite --completion bash > /etc/bash_completion.d/rite (or zsh/fish/powershell) installs a completion script that knows your task names and flags. The script reads tasks at completion-time, so changes to the Ritefile show up immediately without re-installing.
Passing variables
Three ways, in precedence order:
FOO=bar rite build # 1. Shell env — tier 1 (wins over everything)
rite build FOO=bar # 2. CLI positional — tier 2
rite --set FOO=bar build # 3. CLI flag form — same as tier 2Passing args to the task itself
Anything after -- is available in the task as CLI_ARGS:
rite run -- --dry-run --verbosetasks:
run:
cmds:
- myprogram {{.CLI_ARGS}}CLI_ARGS (and the other CLI_* specials) are marked non-export, so they're visible inside Ritefile templating but don't leak into the process environ of cmd shells.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic error (task failed, typo, etc.) |
100-115 | Ritefile-parse / format errors (see errors/errors.go) |
200-201 | Task-runtime errors (exit is the wrapped cmd's code + 200) |
Pass -x / --exit-code to have rite exit with the failing cmd's exact code instead of the 200+ wrapped form.
Environment variables rite reads
| Var | Purpose |
|---|---|
RITE_COLOR_RESET | Disable ANSI color output |
RITE_TEMP_DIR | Override the .rite cache directory |
RITE_X_* | Enable experiment flags (e.g. RITE_X_GENTLE_FORCE=1) |
NO_COLOR | Same as RITE_COLOR_RESET |
Task-declared variables reach cmd shells through the process environ by default (see syntax §Non-exported).