Getting started
Manage jobs, logs, and outputs in one place
- A web UI for every run. Follow job status, browse logs, and inspect artifacts in one place.
- Logs stay organized and easy to find. Logs are kept with each workspace, without choosing a log path for every job, and runs can be explored across workspaces.
- Retry only what needs work. Rerun failed or unfinished jobs while keeping successful results.
- Easily switch execution backends. Run jobs locally, over SSH, or on Slurm and other schedulers.
- Know when jobs finish. Get browser notifications or send updates to Slack.
- Follow outputs from command to artifact. Rotari detects likely artifacts from job commands and lets you inspect their contents in the Web UI.
- For people and AI agents. Submit jobs, follow logs, and inspect outputs with rotari.
How is rotari different?
Rotari covers a narrow need, and other tools may fit yours better: GNU Parallel for one command over many inputs, pueue or task-spooler for a personal queue on one machine, and a workflow engine such as Snakemake, Nextflow, Dagu, or Airflow for a pipeline you share, rerun on new data, or run on a schedule. Comparison with other tools explains what each one does and how rotari differs.
Installation
Prebuilt binaries for Linux and macOS are on the GitHub Releases page; Go is not required:
curl -fsSL https://raw.githubusercontent.com/rotari-dev/rotari/main/scripts/install.sh | sh
This downloads the release binary matching your OS/architecture into
~/.local/bin. Set ROTARI_INSTALL_DIR to override the destination or
ROTARI_VERSION to pin a version.
Other options:
brew install rotari-dev/tap/rotari
# bundles the rotari executable with the Python package
python3 -m pip install --index-url https://rotari-dev.github.io/rotari/simple/ rotari
# With go installed
go install github.com/rotari-dev/rotari/cmd/rotari@latest
Run rotari version to check the installed version. Use
rotari completion install for Bash, Zsh, or Fish; see
Shell completion.
Docker
For the published image, persistent state, and runtime requirements, see the Docker guide.
Choose how to submit jobs
All three approaches use the same rotari queue, run history, and status tools. Choose one way to define jobs; these are alternatives, not steps to complete in sequence:
| Approach | Start here | Best for |
|---|---|---|
| Shell (recommended starting point) | Shell quick start | Adding commands interactively or keeping a batch in a shell script. No new workflow format needed. |
| Manifest | Manifest quick start | Keeping a batch in an editable YAML file, or exporting a run to revise and import later. |
| Python | Python quick start | Submitting jobs from Python code and reading results as Python objects. Jobs still run as commands, not Python functions. |
You can switch approaches later: for example, export a run created from shell commands as a manifest, or import a manifest with the Python client.
Optional workspace setup
To use the same location defaults with any of the three approaches above, run
rotari init from this directory:
# Use the default basedir (.rotari-state) and the default project ("default")
rotari init
# Set a basedir explicitly and the default project ("default")
# rotari init .rotari-state
# Set both the basedir and the default project.
# rotari init .rotari-state sweep
This writes .rotari.toml; the state directory and project are created when
you add jobs. Defaults apply only in this directory, and CLI options or
environment variables override them. See Workspace defaults
for details.
Quick start: Shell
Use rotari add to put commands in the workspace's default project queue.
You can add several variants of a command, as in this example, then use
rotari run to execute the queued jobs and wait for the run to finish.
rotari add python train.py --lr 0.1
rotari add python train.py --lr 0.01
rotari add python train.py --lr 0.001
rotari run
Jobs use the local executor by default. Choose another executor when adding a
job with -e / --executor; for example, submit a job to Slurm and pass a
partition option:
rotari add -e slurm --executor-option="--partition=gpu" python train.py --lr 0.1
rotari run
You can instead set a default for jobs that do not already have an executor
with rotari run -e slurm. See Executors and schedulers for
SSH and scheduler setup and backend-specific options.
rotari run and rotari retry inherit the caller's environment by default;
pass --env=NONE to suppress it while retaining job --env and rotari
metadata.
To check the workspace and see what is queued or running, use rotari info,
rotari jobs, and rotari show:
rotari info
rotari jobs
rotari show
info summarizes the current locations, project, and run status.
jobs gives a compact status overview across projects.
show provides details for a project, run, or job, including captured output
logs and saved results.
Use rotari projects to list projects, rotari runs to list runs, and
rotari basedirs to list registered state directories. rotari show inspects
the selected project, run, job, or attempt; when project selection is
ambiguous, it points to rotari projects.
If you want a run to continue in the background, start it asynchronously:
rotari run --async
If a run has failed jobs, inspect their logs and retry failed or unfinished work; successful jobs are reused:
# Show logs for failed jobs in the selected project.
rotari show -p sweep --failed-logs
# Start a new run for failed and unfinished jobs; successful jobs are reused.
rotari retry -p sweep
Some options have a short form: -p is equivalent to --project-name. This
guide uses either form. For options available to each command, see the
short option list in the CLI reference.
Use --depends-on NAME to run a job only after a prerequisite job or stage
succeeds:
rotari add --job-name prepare ./prepare.sh
rotari add --job-name train --depends-on prepare ./train.sh
Use --depends-on-finished NAME for aggregation or cleanup jobs that should
run once the prerequisite finishes, whatever its result. See
Dependencies and stages for stages and
multiple prerequisites.
See Projects, queues, runs, and state for project selection and state layout, Inspect for status and logs, Recovering failed runs for retries, Running and controlling jobs for starting and waiting for runs, Executors and schedulers for execution backends, and Array and matrix jobs for task expansion and matrix combinations.
Quick start: Manifest
If you prefer a file you can review and edit, save this as experiment.yaml:
version: 1
jobs:
- name: train-small
command: [python, train.py, --lr, "0.1"]
- name: train-large
command: [python, train.py, --lr, "0.01"]
Import the file into a project queue and run it:
rotari import -p sweep experiment.yaml
rotari run -p sweep
rotari show -p sweep
Use rotari export --template for a starter file, or export an existing run
to edit and re-import it. See Workflow manifests for
export, import options, and result reuse.
Quick start: Python
Install the Python client, which includes the rotari executable on supported platforms. It submits command argument lists through the CLI:
from rotari import Rotari
rotari = Rotari(project="sweep")
rotari.add(["python", "train.py", "--lr", "0.1"])
rotari.run()
result = rotari.show()
The client can also exchange manifests as dictionaries. See the Python API reference for available methods and options.
Examples
Start with the basic example for direct commands,
sh -c, and command options:
./examples/basic.sh
The examples guide has independent, no-argument
scripts for job dependencies, artifact candidates, arrays, retrying failed
work, async runs, Slurm, workflow manifests, and diagnosis. All examples use
rotari's normally resolved state directory and switch projects rather than
creating a basedir for each example. Slurm needs a configured cluster. To fix
a failed job and accept another job's result in an exported workflow, run
./examples/workflow-reconcile.sh. See
Workflow manifests for the details.
Local web UI
Start the local web status UI separately from the job runner:
rotari web
rotari web --allow-exec
rotari web --allow-terminal
rotari web --allow-exec --allow-terminal # recommended
--allow-exec also lets the UI launch TensorBoard, Jupyter, and other
registered commands against artifacts; see
Launching commands.
--allow-terminal adds a terminal panel beside your jobs, with a tab for each
shell of the project you are viewing; see Terminal. Anyone
who can sign in gets a shell as you, so it always requires a token.
Both options require authentication and sign in only on a direct loopback
connection (or over HTTPS). To view a server on a remote machine, forward its
port from the machine running the browser, then open http://127.0.0.1:8787:
# on the remote machine
rotari web --allow-exec --allow-terminal
# on your machine
ssh -L 8787:127.0.0.1:8787 user@remote
See the web demo for a read-only UI using generated example data. For remote access, authentication, and read-only mode, see the Web UI guide, the FAQ, and Security model.