One Onlyfile. Same behavior everywhere.
only is a small task runner for projects that need to work the same on macOS, Linux, and Windows.
Write this once:
# Start small.
serve(port="3000", host="127.0.0.1"):
echo "Serving on {{host}}:{{port}}"
check():
cargo check
test():
cargo test
ci() & check & test:
echo "done"
Run it like this:
only
only serve
only serve 8080
only --set host=0.0.0.0 serve 8080
only ciThat is the core idea: a readable task file, parameters when you need them, dependencies when tasks grow, and no per-platform shell surprises.
| Tool | Good for | Tradeoff |
|---|---|---|
just |
simple command aliases | still depends a lot on the user's shell |
taskfile |
bigger YAML workflows | more config than many projects need |
only |
small tasks that may grow into tooling | a real task syntax instead of plain shell or YAML |
From the latest GitHub release:
curl -fsSL https://raw.githubusercontent.com/KercyDing/only/master/install.sh | shOn Windows PowerShell:
irm https://raw.githubusercontent.com/KercyDing/only/master/install.ps1 | iexFrom crates.io:
cargo install onlyFrom GitHub:
cargo install --git https://github.com/KercyDing/only onlyonly --upgrade
# or: only --updateThe Onlyfile extension provides syntax highlighting and only-lsp integration for diagnostics, hover, document symbols, and folding.
See a complete example: examples/Onlyfile.
See the full guide: docs/usage.md.