CLI

This is the API Reference for using the dstack Command Line Tool.

Please make sure you have followed the Installation procedure before referring to the API.

You can find the complete open source implementation of the dstack CLI here -https://github.com/dstackai/dstack-py/tree/master/dstack/cli​

The dstack CLI has 2 optional arguments -

dstack --help- Show help message and exit

dstack --version- Show program's version number and exit

and it has 2 positional arguments -

dstack config- To manage the user profile configuration.

dstack server - To manage your local dstack server.

These positional arguments (Config and Server) are elaborated below.

Config

To manage your user profile configuration.

You can always use -h or --help to show the help message for all parameters.

1. add

To add a user profile

dstack config add [-h] [--token [TOKEN]] [--server [SERVER]]
[--user [USER]] [--no-verify] [--force] [--file FILE]
[PROFILE]
Optional Parameters
Positional Parameters
Optional Parameters

-h, --help - show this help message and exit

--token [TOKEN]- set token for selected profile

--server [SERVER] - set server to handle api requests

--user [USER]- set user name

--no-verify- do not verify SSL certificates

--force - don't ask for confirmation

--file FILE - use specific config file

Positional Parameters

[PROFILE]- Profile name, 'default' if missing

2. modify

dstack config modify [-h] [--token [TOKEN]] [--server [SERVER]]
[--user [USER]] [--no-verify] [--force] [--file FILE]
[PROFILE]
Optional Parameters
Positional Parameters
Optional Parameters

-h, --help - show this help message and exit

--token [TOKEN]- set token for selected profile

--server [SERVER] - set server to handle api requests

--user [USER]- set user name

--no-verify- do not verify SSL certificates

--force - don't ask for confirmation

--file FILE - use specific config file

Positional Parameters

[PROFILE]- Profile name, 'default' if missing

3. remove

Remove existing user profile

dstack config remove [-h] [--force] [--file FILE] [PROFILE]
Optional Parameters
Optional Parameters

-h, --help - show this help message and exit

--force - don't ask for confirmation

--file FILE - use specific config file

4. list

List all configured user profiles

dstack config list [-h] [--file FILE]
Optional Parameters
Optional Parameters

-h, --help - show this help message and exit

--file FILE - use specific config file

Server

To manage your dstack server.

You can use -h, --help to show the help message for all pameters.

1. start

Start a server

dstack server start [-h] [--port [PORT]] [--home [HOME]] [--skip]
[--no-verify]
Optional Parameters
Optional Parameters

--port [PORT] - use specific port

--home [HOME] - store server data in the specified directory

--skip - skip checking for updates

--no-verify - do not verify SSL certificates

2. version

Prints server version

dstack server version

3. update

Update server version

dstack server update