CLI Reference

This topic is a full reference of the Dis.co CLI commands and flags.

For instructions on downloading and installing the CLI, see Getting Started with the Dis.co Command Line Interface (CLI).

Run disco or disco --help to list available commands.

$ disco
Usage: disco [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
cluster Manage clusters.
job Manage jobs.
login Loin to Dis.co.
logout Logout of Dis.co.
version Show the installed Dis.co CLI version.

The CLI provides the following commands:

login [options]

$ disco login -h
Usage: disco login [OPTIONS]
Login to Dis.co.
$ disco login -u <email> -p <passwordF>
Options:
-u, --user TEXT User email to log in with.
-p, --password TEXT User password to log in with.
-h, --help Show this message and exit.

logout

$ disco logout -h
Usage: disco logout [OPTIONS]
Logout of Dis.co.
$ disco logout
Options:
-h, --help Show this message and exit.

Job

Run disco job or disco job --help to list available commands for job.

$ disco job -h
Usage: disco job [OPTIONS] COMMAND [ARGS]...
Manage jobs.
Options:
-h, --help Show this message and exit.
Commands:
archive Archive a specific job.
create Create a new job.
download-results Download results of a job.
list List all jobs and their status.
start Start an existing job.
stop Stop a running job.
view View specific job's details.

create [options]

$ disco job create -h
Usage: disco job create [OPTIONS]
Create a new job that can be launched immediately, or later.
$ disco job create —n <job’s name> -s <script file path> -i <input file path> --run
Options:
-s, --script PATH Local path to the script file to run.
-i, --input TEXT Local comma-separated path to the input
file(s) for the script, (wildcards allowed).
-c, --constants TEXT Local path to the constants file that will be
sent to each task.
-n, --name TEXT Job name.
-r, --run Create and run the job.
-w, --wait Wait for the job to finish.
-cit, --instance-type [s|m|l] Cluster instance type, options are: -s (small
- default), -m (meduim), -l (large).
-cid, --cluster-id TEXT Cluster id to run the job on. You can use the
‘cluster list’ command to view your clusters.
In case no cluster-id specified, Dis.co runs
the job on the default Dis.co cluster.
-e, --repository TEXT Repository name.
-h, --help Show this message and exit.

The -i and -c (input and constant files) can receive a comma separated list (without spaces) in which every item can be one of three options: * A path to a file * A path to a folder in which case all files in the folder will be sent * A path that includes a wildcard e.g. ~/inputs/input-*

Each option can be used only once in a command (you cannot enter -c <path/to/file> -c <path/to/another/file>

start [options]

$ disco job start -h
Usage: disco job start [OPTIONS] <JOB_ID>
Start an existing job.
$ disco job start <job_id>
You may use ‘job list’ command to get the job id.
Options:
-h, --help Show this message and exit.

stop [options]

$ disco job stop -h
Usage: disco job stop [OPTIONS] <JOB_ID>
Stop a running job.
$ disco job stop <job_id>
You may use ‘job list’ command to get the job id.
Options:
-h, --help Show this message and exit.

view [options]

$ disco job view -h
Usage: disco job view [OPTIONS] <JOB_ID>
View specific job's details.
$ disco job view <job_id>
You may use ‘job list’ command to get the job id.
Options:
-h, --help Show this message and exit.

archive [options]

$ disco job archive -h
Usage: disco job archive [OPTIONS] <JOB_ID>
Archive a specific job.
disco job archive <job_id>
You may use ‘job list’ command to get the job id.
Options:
-h, --help Show this message and exit.

download-results [options]

$ disco job download-results -h
Usage: disco job download-results [OPTIONS] <JOB_ID>
Download results of a job.
$ disco job download-results <job_id> -d <results files path>
You may use ‘job list’ command to get the job id.
Options:
-d, --destination TEXT The destination path to download the result files
to.
-h, --help Show this message and exit.

list [options]

$ disco job list -h
Usage: disco job list [OPTIONS]
List all jobs and their status.
$ disco job list
Status Decription:
Deleted The job failed
Done The job is done
Failed The job failed
Listed The job is queued
Stopped The job has stopped
Unknown The job has no status
Working The job is working
Options:
-h, --help Show this message and exit.

Cluster

Run disco cluster or disco cluster --help to list available commands for cluster.

$ disco cluster -h
Usage: disco_cli cluster [OPTIONS] COMMAND [ARGS]...
Manage clusters.
Options:
-h, --help Show this message and exit.
Commands:
list List available clusters for the current user.

list

$ disco cluster list -h
Usage: disco cluster list [OPTIONS]
List available clusters for the current user.
$ disco cluster list
Options:
-h, --help Show this message and exit.

version

$ disco version -h
Usage: disco version [OPTIONS]
Show the installed Dis.co CLI version.
$ disco version
Options:
-h, --help Show this message and exit.