Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Getting Started with the CLI

Installing the Command Line Interface

The ursactl command line interface is part of the ursactl Python library. You can install the library using pip:

% pip install ursactl

Configuring the Command Line Interface

The command line interface and library look for an ursactl.conf file in a number of places:

  • ~/.config/ursactl/ursactl.conf
  • ./.ursactl.conf

In addition, all of the directories from your current directory to your home directory will be searched, assuming you’re using a Unix-like system and in a subdirectory of your home directory. For example, if you’re in ~/projects/ursa/, then ~/projects/ursa/.ursactl.conf, ~/projects/.ursactl.conf, and ~/.ursactl.conf will be loaded. The close the file is to your current directory, the higher priority it will have.

To access the platform, you need to configure the API key and secret. You can also configure a default project to use if you don’t want to provide one when invoking the command line client.

The command line client comes with the Python library. This library uses the same configuration as the client.

The contents of the file will look like the following:

[ursactl]
api_key = ...
api_secret = ...

You can create an API key and secret and copy them into the configuration file.

Setting a Default Project

Many of the platform capabilities require a project. You can set the default project in the configuration file to an existing project or create a new project. See the documentation on creating a project and listing projects for more information.

Once you have selected a project, set it as the default by adding the following to the configuration file (replacing USERNAME with your account username and PROJECT with the name of the project):

[ursactl]
project = USERNAME/PROJECT

Enterprise Editions

If you are using an Enterprise Edition of the platform, you will need to point the command line tool to where the platform is running. Use the platform key:

[ursactl]
platform = https://app.example.com/

The platform URL is the same URL that you use to access the platform dashboard.