Command-line tool
Installing pytrio provides the trio command for login configuration and for querying or managing models, checkpoints, files, and batch inference jobs. For full options and subcommand specifications, see the CLI reference in the API tab.
trio --help
trio --version-h is an alias for --help, and -V is an alias for --version. Running bare trio prints the current SDK version followed by root-command help.
Login and profiles
trio login
trio status
trio logout
trio profile list
trio profile show
trio profile use dev --base-url https://pytrio.com
trio profile remove devloginverifies credentials and saves them to the current profile after confirmation. Automation can use--api-keyand--yes.statusonly verifies current credentials and displays the user, workspace, and profile. It does not create a ServiceSession or print the API key.logoutremoves credentials saved in the current profile.profile useswitches to an existing profile or creates/updates a named profile.defaultand(default)select the default profile.profile listandprofile showonly inspect local configuration. Usestatusto verify that credentials remain valid.
trio auth login|logout|status|profile are the full forms of the corresponding top-level commands. v0.2.11 removes the old trio env command; use trio profile instead. Existing configuration, pytrio.configure(env=...), and PYTRIO_ENV continue to work.
For non-interactive login:
PYTRIO_API_KEY="$TRIO_KEY" trio login --yesIf input or confirmation is required without an interactive terminal, the command exits with status 2. Authentication, network, and server-operation failures exit with status 1.
Output formats
Query commands use tables by default. Select JSON or CSV before the subcommand (see trio for details):
trio --format json status
trio --format csv model list
trio --format json checkpoint listMachine-readable results go to stdout; diagnostics, notices, and pagination hints go to stderr. Action commands such as login, download, and delete use text output only.
Models
trio model list
trio model ls --name qwen
trio --format json modelsThe command lists models available in the current environment, their maximum context length, and training and sampling capabilities. model ls and models alias model list. --name performs a case-insensitive substring match on model IDs. The query verifies credentials and SDK compatibility without creating a ServiceSession. See trio model for full details.
Checkpoints
trio checkpoint list --limit 20
trio checkpoint list --run-id RUN_ID
trio checkpoint info CHECKPOINT_ID
trio checkpoint download CHECKPOINT_ID -o ./downloads/state.tar
trio checkpoint delete CHECKPOINT_ID --yescheckpoint can be shortened to ckpt, list to ls, and delete to rm.
listdisplays checkpoints grouped by training run for the current workspace.--limitaccepts 1–100 and--offsetdefaults to 0.inforeturns checkpoint details and a summary of the source training run.downloaddefaults to<CHECKPOINT_ID>.tar. If the destination exists, it appends an incrementing number and prints the actual path only after the full download is published.deleteremoves one checkpoint at a time. Non-interactive calls must pass--yesexplicitly.
See trio checkpoint for the full subcommand reference.
Files
trio file upload requests.jsonl
trio file list --limit 20
trio file list --all
trio file info FILE_ID
trio file download FILE_ID -o ./downloads/requests.jsonl
trio file delete FILE_ID --yesThe file_id returned after upload can be used for batch inference. Lists show up to 20 items by default; --all retrieves every page. Downloads append an incrementing number on name collisions and print the actual path. A file still used by a job cannot be deleted. See trio file for the full subcommand reference.
Batch inference
trio batch create FILE_ID
trio batch create --file requests.jsonl --completion-window 24h --description "nightly evaluation"
trio batch list --limit 20
trio batch list --all
trio batch info BATCH_ID
trio batch download BATCH_ID -o ./results
trio batch cancel BATCH_ID --yesbatch create FILE_ID uses a published file; --file uploads a local file before submitting the job. Use --completion-window to set the completion window and --description to add a description. batch download saves published output and error JSONL files to the selected directory. If one result download fails, files already saved remain in place. Cancellation asks for confirmation on an interactive terminal; non-interactive calls must pass --yes. See trio batch for the full subcommand reference.
For the corresponding Python file, batch, and checkpoint operations, see RestClient.