Introduction

Anatomy of Hatcher Commands

The Hatcher CLI is built around a hierarchy of commands. The top-level command specified the type of object with which the user wishes to interact. Each level of command narrows down the interaction until the final command specifies the actual interaction the user wishes to perform. In most cases there are only two levels of commands: The object type and the interaction. For example, if the user wishes to create a new Enthought Deployment Server API token:

$ hatcher api-tokens create hatcher-tutorial

The api-tokens command specifies that the user is interacting with API tokens, followed by the create sub-command to create a new token. Following the create sub-command is the only required argument for this command, the name of the new token.

Note

The api-tokens command is not available for use with the on-site Enthought Deployment Server.

Getting help

For information on a specific command, the --help option can be provided at any level:

$ hatcher --help
Usage: hatcher [OPTIONS] COMMAND [ARGS]...

  A command-line interface to Enthought Deployment Server (EDS).

Options:
  -u, --url TEXT       The URL of EDS.  [required]
  -U, --username TEXT  Username for authentication.
  -p, --password TEXT  Password for authentication. If --username is given but
                       password is omitted, hatcher will prompt for a
                       password.
  -t, --token TEXT     EDS API token for authentication. (Not applicable to
                       on-site EDS.)
  -k, --insecure       Disable SSL certificate verification
  -d, --debug          Show traceback on error
  --api-version [0|1]
  --command-tree       Print the full hatcher command tree.
  --version            Show the version and exit.
  -h, --help           Show this message and exit.

Commands:
  api-tokens     Perform token actions (NA to on-site EDS).
  bundles        Perform operations on bundles.
  eggs           Perform operations on eggs.
  export         Export artefacts from EDS.
  import         Import exported artefacts into EDS.
  organizations  Perform operations on organizations.
  platforms      Perform operations on platforms.
  python-tags    Perform operations on PEP425 Python tags.
  repositories   Perform operations on repositories.
  runtimes       Perform operations on runtimes.
  user           Information about currently logged-in user.
  users          Perform administrative operations on users.

Or for getting help on a sub-command:

$ hatcher eggs list --help
Usage: hatcher eggs list [OPTIONS] ORGANIZATION REPOSITORY PLATFORM PYTHON_TAG

  List all eggs in a repository

Options:
  -h, --help  Show this message and exit.

For a quick overview of all commands supported by Hatcher, the --command-tree option can be used. This simply prints the tree of commands understood by Hatcher, along with the command’s argument specification:

$ hatcher --command-tree
hatcher
    api-tokens
        create         [OPTIONS] NAME
        delete         [OPTIONS] NAME
        list           [OPTIONS]
    apps
        list           [OPTIONS] ORGANIZATION REPOSITORY PLATFORM
        metadata       [OPTIONS] ORGANIZATION REPOSITORY PLATFORM PYTHON_TAG APP_ID VERSION
        upload         [OPTIONS] ORGANIZATION REPOSITORY FILENAME
    eggs
        batch-upload   [OPTIONS] ORGANIZATION REPOSITORY PLATFORM [EGGS]...
        delete         [OPTIONS] ORGANIZATION REPOSITORY PLATFORM PYTHON_TAG NAME VERSION
        download       [OPTIONS] ORGANIZATION REPOSITORY PLATFORM PYTHON_TAG NAME VERSION [DESTINATION]
        list           [OPTIONS] ORGANIZATION REPOSITORY PLATFORM PYTHON_TAG
        metadata       [OPTIONS] ORGANIZATION REPOSITORY PLATFORM PYTHON_TAG NAME VERSION
        update-index   [OPTIONS] ORGANIZATION REPOSITORY PLATFORM [EGGS]...
        upload         [OPTIONS] ORGANIZATION REPOSITORY PLATFORM FILENAME
...