CLI reference

solarian base ships in the solarian-base plugin (pip install solarian-base). It works on the project linked in the current directory, and every action takes --json.

solarian base <action> [args]
solarian base --help

Account

login

Sign in through the browser, or store an existing token.

solarian base login [--url URL] [--token TOKEN] [--no-browser]
FlagEffect
--url URLThe Base to log in to. Default: the stored one, else http://localhost:8000
--token TOKENStore a token from Settings → API tokens instead of approving in the browser
--no-browserPrint the approval link without opening it

logout

Forget the stored token: solarian base logout.

whoami

The signed-in user, the Base URL and the linked project: solarian base whoami.

Project

link

Link this directory to a Base project. Writes .solarian/project.json and gitignores .solarian/.

solarian base link [--project NAME|ID] [--create] [-y]
FlagEffect
--project NAME|IDThe project to link. Default: the directory's name
--createCreate the project when it does not exist
-y, --yesAnswer yes to the confirmation

deploy

Upload the code as a new deployment, unless it is unchanged, and wait for the build. A project with a conf/robot.yaml gets its robot registered on Base, named after the project; the build log links to its page.

solarian base deploy [--force] [--no-wait] [-m MESSAGE]
FlagEffect
--forceDeploy even when the code is unchanged
--no-waitReturn once the upload is accepted, without waiting for the build
-m, --messageA message shown with the deployment

manifest

What a deployment of this directory would contain, its trainers, train configs, servables (the confs Base can serve) and robot (conf/robot.yaml, which a deployment registers), without uploading anything.

solarian base manifest [--conf-path conf] [--root DIR]

env

Secrets set in the project's training jobs.

solarian base env ls
solarian base env add KEY [VALUE]    # prompts for the value when omitted
solarian base env rm KEY

Names starting with SOLARIAN_ or MODAL_ are reserved.

Training

train

Deploy when the code changed, start a training job on cloud GPUs, and follow its run.

solarian base train CONFIG [overrides...] [flags]
solarian base train --conf conf/training/NAME [overrides...] [flags]

CONFIG is a training file of the project, conf/training/CONFIG.yaml. Overrides are Hydra overrides, as for solarian train.

FlagEffect
--dataset KEY=IDTrain on a Base dataset: the same as ++KEY=base://datasets/ID. Repeatable
--gpu-type TOverride the config's modal.gpu_type
--gpus NOverride the config's modal.gpus
--no-deployUse the current deployment as it is
--no-followReturn once the job is queued
-m, --messageMessage for the deployment, if one is made

Ctrl-C while following leaves the job running and prints how to resume following it.

runs

solarian base runs ls [--all] [--state STATE] [--limit 20]
solarian base runs show RUN_ID
solarian base runs logs RUN_ID [-f] [--tail 200]
CommandFlags
runs ls--all: every project's runs. --state: queued, running, finished, failed, crashed or killed. --limit: how many (default 20)
runs show—
runs logs-f, --follow: keep printing until the run ends. --tail N: the last N lines first (default 200)

Serving

models

Checkpoints the project's training jobs wrote, with the endpoints serving each.

solarian base models ls [--all]

--all lists every project's. The first column is the job's id prefix, which endpoints start --checkpoint takes.

endpoints

Services and policies of the project, running on Modal GPUs. See Services, Policies & Models.

solarian base endpoints ls [--all] [--kind service|policy] [--status S]
solarian base endpoints start SERVABLE [--checkpoint JOB[:PATH]] [flags] [-- server args]
solarian base endpoints stop ENDPOINT_ID
solarian base endpoints logs ENDPOINT_ID

SERVABLE is a conf with a server: block, conf/services/NAME.yaml or conf/skills/NAME.yaml. start deploys when the code changed and follows the deploy until the endpoint is up.

FlagEffect
--checkpoint JOB[:PATH]For a policy: a training job's id or prefix, and optionally the file (default: its latest.ckpt)
--gpu-type TT4 by default; none for CPU
--min-containers NContainers kept warm (default 0: scale to zero)
--scaledown SSeconds idle before scaling to zero (default 300)
--no-deployUse the current deployment as it is
--no-waitReturn once the endpoint is queued
-m, --messageMessage for the deployment, if one is made
-- ARGSAppended to the conf's server.args

endpoints ls --status takes starting, running, stopped or failed, comma-separated.

For scripts and agents

Every action takes --json and prints the API's own objects. Errors print {"error": ..., "status": ...} and exit with code 1.

solarian base train umi --dataset task.dataset_mix.0.path=3f2a9c1e --no-follow --json
solarian base runs show "$RUN" --json | jq .summary
solarian base endpoints start umi_target --checkpoint "$JOB" --json | jq -r .url

The plugin ships a deploy-and-train skill (solarian_base/skills/deploy-and-train/SKILL.md) that walks a coding agent through linking, deploying, training on a Base dataset, reading the run and serving the checkpoint. The REST API behind these commands is documented at /api/docs/ on your Base.

Environment

VariableReplaces
SOLARIAN_BASE_URLThe URL stored by login
SOLARIAN_TOKENThe token stored by login
SOLARIAN_PROJECT_IDThe project from link
SOLARIAN_HOMEWhere auth.json lives (default ~/.solarian)

Other commands that talk to Base

CommandWhat it does with Base
solarian run-robot -d solarian_baseConnects the robot to its managed relay, and its skills to the project's endpoints; see Robots & Controller
solarian train, solarian modal-trainLog their runs to Base: solarian_base is the default tracking backend; see Experiment tracking

See also

Was this page helpful?