Command line interface

A subset of the functionality of the Python API is made available via a command-line interface (CLI).

The CLI executable is called nom, and installed when you do pip install nominal.

1$ nom --version
2nom, version 1.28.0

Before using the CLI, ensure that it is authenticated with a recent token, which you can generate from your profile page:

1$ nom auth set-token -u https://api.gov.nominal.io/api -t eyJhbGciOiJSUzI1Ni...

Currently, the CLI has commands for manipulating attachments, datasets, and runs:

1$ nom --help
2Usage: nom [OPTIONS] COMMAND [ARGS]...
3
4Options:
5 --version Show the version and exit.
6 -h, --help Show this message and exit.
7
8Commands:
9 attachment
10 auth
11 dataset
12 run

To find out more about each command, run it with --help:

1$ nom attachment --help
2Usage: nom attachment [OPTIONS] COMMAND [ARGS]...
3
4Options:
5 -h, --help Show this message and exit.
6
7Commands:
8 download Download an attachment with the given RID to the specified...
9 get Get an attachment by its RID
10 upload Upload attachment from a local file with a given name and...
1$ nom attachment download --help
2Usage: nom attachment download [OPTIONS]
3
4 Download an attachment with the given RID to the specified location on disk.
5
6Options:
7 -r, --rid TEXT [required]
8 -o, --output TEXT full path to write the attachment to (not just the
9 directory) [required]
10 --trust-store-path FILE Path to a trust store CA root file to initiate SSL
11 connections.If not provided, defaults to certifi's
12 trust store.
13 --base-url TEXT Base URL of the Nominal API to hit. Useful for
14 hitting other clusters, e.g., staging for internal
15 users. [default: https://api.gov.nominal.io/api]
16 --token-path FILE Path to the yaml file containing the Nominal access
17 token for authenticating with the API [default:
18 /home/stefan/.nominal.yml]
19 --token TEXT API Access token to use when creating the nominal
20 client. If provided, takes precedence over --token-
21 path and --base-url
22 --no-color If provided, don't color terminal log output
23 -v, --verbose Verbosity to use within the CLI. Pass -v to allow
24 info-level logs, or -vv for debug-level. [default:
25 0]
26 -h, --help Show this message and exit.
Built with