Skip to main content

Usage

cassian run <command>
cassian run "python train.py --epochs 50"
cassian run --keep "python eval.py"
Provisions an instance (if not already running), syncs your files, runs the command, then tears down the instance. Exit code is passed through.

Options

FlagDescriptionDefault
--keepKeep instance running after command finishesfalse

Behavior

cassian run "python train.py"
  → cassian up (if needed)
  → sync files to /workspace
  → run command
  → cassian down (always, even on failure)
If an instance is already running (from a previous cassian up), it reuses it and does NOT tear it down afterward.

Use cases

# Overnight training auto-stops when done
cassian run "python train.py --epochs 500"

# CI/CD pipeline
cassian run "pytest tests/"

# Quick one-off
cassian run "python -c 'import torch; print(torch.cuda.get_device_name())'"

# Keep instance for debugging after run
cassian run --keep "python train.py"

Exit codes

The exit code from your command is passed through. If your script exits with code 1, cassian run exits with code 1.