Docs
CLI

CLI

The Trainwave CLI is a powerful yet simple command-line tool that allows you to interact with the Trainwave platform. Whether you're managing your jobs, checking logs, or configuring your setup, the CLI provides quick and easy access to all the core features of the API from your terminal.

Below is a list of available commands and how to use them.

Authentication Commands

Login

To get started, log in to the CLI using the following command. This will open a browser window where you can log in with your Trainwave account:

wave auth login

Whoami

Want to check which account you're logged in with? Use this command to display the current logged-in user:

wave auth whoami

Set Token

If you'd prefer not to log in through a browser, you can manually set an authentication token using this command:

wave auth set-token <token>

Configuration Command

The config command opens a web interface where you can visually configure your CLI settings. If no configuration file exists, this command will create one. Otherwise, it will update the existing configuration.

Config

wave config

Job commands

List Jobs

This command lists all training jobs available to you under the current project:

wave jobs list

Launch Job

To launch a new training job based on the parameters in your configuration file, use this command:

wave jobs launch

View Logs

You can view real-time logs for a specific job using the job ID:

wave jobs logs <job_id>

Check Status

To get the current status of a job, run:

wave jobs status <job_id>

Cancel Job

Need to stop a job? You can cancel a job using its job ID:

wave jobs cancel <job_id>

Secrets Commands

List Secret Variables

This command lists all secret variables available to you under the current project or organization:

wave secrets list

Set Secret Variable

To set a secret variable, use the following command:

wave secrets set VARIABLE_NAME=VALUE

You can also set multiple secret variables at once:

wave secrets set VARIABLE_NAME1=VALUE1 VARIABLE_NAME2=VALUE2

Unset/delete Secret Variable

To delete a secret variable, use the following command:

wave secrets unset VARIABLE_NAME