One Onlyfile. Same behavior everywhere.
only is a small cross-platform task runner for macOS, Linux, and Windows.
Dependencies, parallelism, environment-specific variants, namespaces, and common shell behavior all stay in one readable Onlyfile.
# Start development.
dev(port="3000"):
pnpm dev --port {{ port }}
# Check the project.
check():
cargo check
# Prefer nextest when available.
test() ? @has("cargo-nextest"):
cargo nextest run
test():
cargo test
# Run checks and tests in parallel.
ci() & (check, test):
echo "CI complete"
Run it:
only
only dev
only dev 8080
only ciOr inspect the execution plan first:
only --dry-run ciDry run: ci()
├─ stage 1 (parallel)
│ ├─ check
│ └─ test
└─ stage 2
└─ ci
Dependencies, parallel execution, parameters, and environment-specific task variants stay in the task definition instead of shell control flow.
For a larger frontend + Rust workflow, see the usage guide.
- Cross-platform by default — common commands behave consistently across macOS, Linux, and Windows.
- Task dependencies — describe ordering directly in the task signature.
- Parallel stages — group independent dependencies with
(a, b). - Guards — select implementations with
@has,@os,@arch, and@env. - Namespaces — organize larger projects with
[front],[back],[version], etc. - Parameters — use function-style task signatures and
{{ value }}interpolation. - Private helpers — tasks beginning with
_stay out of the normal task list. - Dry run — inspect the resolved execution plan before running it.
- Shell escape hatch — request
bash,sh,pwsh, or PowerShell when needed.
| Tool | Good for | Tradeoff |
|---|---|---|
just |
shell-oriented command recipes | workflow behavior still depends heavily on the host shell |
Task |
YAML-based automation | more configuration for projects that want a compact task language |
only |
structured project workflows | introduces a small dedicated task syntax |
only aims to stay close to the simplicity of a command runner while making workflow structure explicit.
curl -fsSL https://raw.githubusercontent.com/KercyDing/only/master/install.sh | shirm https://raw.githubusercontent.com/KercyDing/only/master/install.ps1 | iexcargo install onlyparu -S only-binFor the latest Git version:
paru -S only-gitcargo install --git https://github.com/KercyDing/only onlyonly --upgradeor:
only --updateThe Onlyfile VS Code extension provides syntax highlighting and only-lsp integration for diagnostics, hover, document symbols, and folding.