The GeoSpock CLI

The management of the GeoSpock database is done using the GeoSpock CLI, a command line tool that enables you to:

  • create and manage GeoSpock database user accounts; see Managing users for more information
  • manage the data in your GeoSpock database; see Using datasets for more information
  • manage access to your datasets; see Managing data access for more information

Installing the GeoSpock CLI from pip

Make sure you have pip installed and then run the following commands:

$ python -m pip install geospock-cli

Getting started with the GeoSpock CLI

To start using the GeoSpock CLI, you need to configure some settings for your database deployment using the init command.

The necessary CLI init command is provided as an output string from the datalake_core Terraspock endpoint. This can be obtained at any time after a successful terraform apply by running the following commands:

$ terraform workspace select <terraform-workspace>
$ terraform output cli_init_command

This returns the init command that you should run, for example:

geospock init --clientid abcdefgh1234 --audience --auth0url 

Setting up profiles

If you have multiple GeoSpock database deployments, you can use the --profile {profileID} argument to set up a configuration for a specific deployment. You can then use the profile ID with the GeoSpock CLI commands to specify which deployment you want to run those commands on.

Authenticating your credentials

To authenticate the GeoSpock CLI to use your GeoSpock database account credentials, use the following command: 

geospock get-credentials [--profile {profileID} --no-browser]

Use the --no-browser flag if you do not have access to a web browser. The CLI returns a URL which you can paste into a web browser on another machine so that you can enter your GeoSpock database account and password.

Running the GeoSpock CLI

You can activate the GeoSpock CLI at the command line as follows:

geospock COMMAND ... [--profile {profileID}]

To show a list of commands use the following command

geospock help [--profile {profileID}] 

To get further information on the input types of each command, use the following:

geospock help COMMAND [--profile {profileID}]

CLI commands

The GeoSpock CLI has the following commands:

Accounts Datasets Data access General


  • account-invite
  • account-resend-invite


  • account-list


  • account-update-role


  • account-delete


  • dataset-create


  • dataset-list


  • dataset-status
  • dataset-operations
  • dataset-schema
  • bootstrap-schema


  • dataset-add-data
  • dataset-permission-grant
  • dataset-permission-revoke


  • dataset-delete


  • group-create


  • group-list


  • group-add-user
  • group-remove-user
  • group-all-remove-user


  • group-delete


  • init
  • get-credentials


  • profile-list


  • help

Geospock database user CLI access

Geospock database user roles have the following levels of access to the GeoSpock CLI:

  • ADMINISTRATOR: can access all the commands in the GeoSpock CLI
  • USER: can access the General commands, and has limited access to the other commands, including the ability to:
    • get the status of a dataset (dataset-status)
    • get the history of a dataset (dataset-operations)
    • list the datasets (dataset-list)
    • create a data source description for your dataset (data-source-description)