Using the CLI

This topic describes how to download, install and get acquainted with the Dis.co command-line interface (CLI). A full description of the Dis.co commands is provided in the CLI Reference. If you have not yet set up an account, please read the Quick Start Guide.

Install CLI

Install the Dis.co CLI from your terminal.

Mac/Linux

Run the following command in a terminal:

curl https://s3.us-west-2.amazonaws.com/disco.cli/install.sh | sh

Windows

  1. Navigate to https://app.dis.co/cli/download/windows.

    This will download an executable - it's not an installer. Feel free to rename it to disco.exe.

  2. Launch the executable from a terminal or CMD window.

Login to disco

disco login --user YOUR_EMAIL --password YOUR_PASSWORD

After successful login, you can add and run a new job.

Add and run a new job

disco add --name YOUR_JOB_NAME --script YOUR_SCRIPT_FILE_PATH --run

Now you will see the job status as it is submitted and starts running.

Viewing the jobs status

To follow the job's status, run the view command

disco view

All the jobs in the system are listed in a human-readable format. To view command output as an input to another script you can use the -m (or --machine) flag to get a machine-readable format, so:

disco view -m

Checking jobs summary

A summary of all jobs for the current user can be viewed using the jobSummary command:

disco jobSummary

The result is always in a machine-friendly format and should look like this:

Unknown:0,Listed:41,Working:8,Stopped:0,Done:135,Failed:116,Deleted:0