Skip to content

CLI Reference

This page provides documentation for our command line tools.

app

Usage:

 [OPTIONS] COMMAND [ARGS]...

artifacts

Manage artifacts

Usage:

 artifacts [OPTIONS] COMMAND [ARGS]...

download

Download an artifact to cache

Usage:

 artifacts download [OPTIONS] ARTIFACT_NAME

Options:

  ARTIFACT_NAME                   [required]
  -i, --index TEXT                Artifact index path (default set via env var
                                  DEEPSEARCH_ARTIFACT_INDEX, else current
                                  working dir).
  -c, --cache TEXT                Artifact cache path (default set via env var
                                  DEEPSEARCH_ARTIFACT_CACHE, else platform-
                                  specific).
  -s, --hit-strategy [raise|pass|overwrite]
                                  How to handle case of artifact being already
                                  in cache.  [default: overwrite]
  --unpack / --no-unpack          [default: unpack]
  --progress-bar / --no-progress-bar
                                  [default: progress-bar]

download-all

Download all artifacts to cache

Usage:

 artifacts download-all [OPTIONS]

Options:

  -i, --index TEXT                Artifact index path (default set via env var
                                  DEEPSEARCH_ARTIFACT_INDEX, else current
                                  working dir).
  -c, --cache TEXT                Artifact cache path (default set via env var
                                  DEEPSEARCH_ARTIFACT_CACHE, else platform-
                                  specific).
  -s, --hit-strategy [raise|pass|overwrite]
                                  How to handle case of artifact being already
                                  in cache.  [default: overwrite]
  --unpack / --no-unpack          [default: unpack]
  --progress-bar / --no-progress-bar
                                  [default: progress-bar]

list-cache

List artifacts in cache

Usage:

 artifacts list-cache [OPTIONS]

Options:

  -c, --cache TEXT  Artifact cache path (default set via env var
                    DEEPSEARCH_ARTIFACT_CACHE, else platform-specific).

list-index

List artifacts in index

Usage:

 artifacts list-index [OPTIONS]

Options:

  -i, --index TEXT  Artifact index path (default set via env var
                    DEEPSEARCH_ARTIFACT_INDEX, else current working dir).

locate-cached-artifact

Show path of a cached artifact

Usage:

 artifacts locate-cached-artifact [OPTIONS] ARTIFACT_NAME

Options:

  ARTIFACT_NAME     [required]
  -c, --cache TEXT  Artifact cache path (default set via env var
                    DEEPSEARCH_ARTIFACT_CACHE, else platform-specific).

locate-default-cache

Show cache path

Usage:

 artifacts locate-default-cache [OPTIONS]

cps

Interact with DeepSearch CPS component

Usage:

 cps [OPTIONS] COMMAND [ARGS]...

data-indices

Manage CPS data indices

Usage:

 cps data-indices [OPTIONS] COMMAND [ARGS]...

add-attachment

Add attachment to a index item

Usage:

 cps data-indices add-attachment [OPTIONS]

Options:

  -p, --proj-key TEXT         Provide project key  [required]
  -x, --index-key TEXT        index_key of data index  [required]
  -d, --index_item_id TEXT    Index item ID  [required]
  -i, --attachment-file PATH  Provide absolute path to local file.  [required]
  -k, --attachment_key TEXT   Attachment key to put in index item  [default:
                              usr_attachments]

create

Create data index in project

Usage:

 cps data-indices create [OPTIONS]

Options:

  -p, --proj-key TEXT             Provide project key  [required]
  -n, --name TEXT                 Name of data index  [required]
  -d, -desc TEXT                  Describe your data index
  --type [Document|DB Record|Generic|Experiment]
                                  Type of Data Index  [default: Document]

delete

Delete data index in a project

Usage:

 cps data-indices delete [OPTIONS]

Options:

  -p, --proj-key TEXT   Provide project key  [required]
  -x, --index-key TEXT  index_key of data index  [required]

list

List data indices in project

Usage:

 cps data-indices list [OPTIONS]

Options:

  -p, --proj-key TEXT        Provide project key  [required]
  -o, --output [table|json]  Output format  [default: table]

upload

Upload files/urls to index

Usage:

 cps data-indices upload [OPTIONS]

Options:

  -p, --proj-key TEXT          Provide project key  [required]
  -u, --url TEXT               Provide single url or absolute path to file
                               containing  multiple urls separated by empty
                               lines.
  -i, --input-file PATH        Provide absolute path to local file or
                               directory containing pdf documents, zip files,
                               or both.
  -x, --index-key TEXT         index_key of data index  [required]
  -c, --coordinates-file PATH  Provide absolute path to local json file
                               containing coordinates of COS.
  --conv-settings TEXT         Provide conversion settings to be used on local
                               file upload
  --target-settings TEXT       Provide target conversion settings to be used
                               on local file upload

elastic-data

Manage Elastic data collections

Usage:

 cps elastic-data [OPTIONS] COMMAND [ARGS]...

list

List Elastic Data Collections

Usage:

 cps elastic-data list [OPTIONS]

Options:

  --domain TEXT              [default: all]
  -o, --output [table|json]  Output format  [default: table]

kgs

Manage CPS KGs

Usage:

 cps kgs [OPTIONS] COMMAND [ARGS]...

download

Download KG

Usage:

 cps kgs download [OPTIONS]

Options:

  -p, --proj-key TEXT        Provide project key  [required]
  -k, --kg-key TEXT          Knowledge Graph  [required]
  -o, --output [table|json]  Output format  [default: table]

list

List KGs

Usage:

 cps kgs list [OPTIONS]

Options:

  -p, --proj-key TEXT        Provide project key  [required]
  -o, --output [table|json]  Output format  [default: table]

list-flavours

List KG flavours for a project

Usage:

 cps kgs list-flavours [OPTIONS]

Options:

  -p, --proj-key TEXT        Provide project key  [required]
  -o, --output [table|json]  Output format  [default: table]

save-snapshot

Save a snapshot from an assembled Data Set

Usage:

 cps kgs save-snapshot [OPTIONS]

Options:

  -p, --proj-key TEXT     Provide project key  [required]
  -k, --kg-key TEXT       Knowledge Graph  [required]
  -w, --wait              Wait for the operation to finish
  --flavour TEXT          Name of the Flavour/Capacity of the snapshot. Use
                          'list-flavours' to get a list  [required]
  --load-after-assembled  [default: True]
  --snapshot-name TEXT

projects

Manage CPS projects

Usage:

 cps projects [OPTIONS] COMMAND [ARGS]...

assign

Assign a user to a project

Usage:

 cps projects assign [OPTIONS] PROJ_KEY USERNAME [ROLE]:[viewer|editor|owner]

Options:

  PROJ_KEY                      [required]
  USERNAME                      [required]
  [ROLE]:[viewer|editor|owner]  [default: viewer]

create

Create a project

Usage:

 cps projects create [OPTIONS] PROJ_NAME

Options:

  PROJ_NAME                  [required]
  -o, --output [table|json]  Output format  [default: table]

list

List projects

Usage:

 cps projects list [OPTIONS]

Options:

  -o, --output [table|json]  Output format  [default: table]

remove

Remove a project

Usage:

 cps projects remove [OPTIONS] PROJ_KEY

Options:

  PROJ_KEY  [required]

documents

Interact with DeepSearch Document Conversion component

Usage:

 documents [OPTIONS] COMMAND [ARGS]...

convert

Convert pdf documents using Deep Search Technology

Usage:

 documents convert [OPTIONS]

Options:

  -p, --proj-key TEXT           Provide project key  [required]
  -u, --url TEXT                Provide single url or absolute path to file
                                containing  multiple urls separated by empty
                                lines.
  -i, --input-file PATH         Provide absolute path to local file or
                                directory containing pdf documents, zip files,
                                or both.
  -pbar, --progress-bar         Show progress bar  [default: True]
  -r, --report                  Generate report after document conversion
  --export-md / --no-export-md  [default: no-export-md]

get-report

Generate report of document conversion

Usage:

 documents get-report [OPTIONS]

Options:

  -p, --proj-key TEXT  Provide project key  [required]
  -t, --task-ids PATH  Provide path to file containing task ids generated
                       during document conversion.

login

Authentication is now done via profiles; to set up one check deepsearch profile config --help

Usage:

 login [OPTIONS] COMMAND [ARGS]...

Options:

  --host TEXT
  --email TEXT
  --api-key TEXT
  --verify-ssl / --no-verify-ssl  [default: verify-ssl]
  --output TEXT

profile

Manage profile configuration

Usage:

 profile [OPTIONS] COMMAND [ARGS]...

config

Add or update a profile.

Usage:

 profile config [OPTIONS]

Options:

  --host TEXT                     [required]
  --username TEXT                 [required]
  --api-key TEXT                  [required]
  --verify-ssl / --no-verify-ssl  [default: verify-ssl]
  --profile-name TEXT             If not set, the active profile will be
                                  updated or, if no profile available, a new
                                  profile with a predetermined name will be
                                  created.
  --activate-profile / --no-activate-profile
                                  [default: activate-profile]

list

List all profiles.

Usage:

 profile list [OPTIONS]

remove

Remove a profile.

Usage:

 profile remove [OPTIONS] PROFILE_NAME

Options:

  PROFILE_NAME  [required]

show

Display a profile.

Usage:

 profile show [OPTIONS] [PROFILE_NAME]

Options:

  [PROFILE_NAME]  If not set, the active profile will be displayed.

use

Activate a profile.

Usage:

 profile use [OPTIONS] PROFILE_NAME

Options:

  PROFILE_NAME  [required]

query

Interact with DeepSearch Query component

Usage:

 query [OPTIONS] COMMAND [ARGS]...

data-query

Launch a DeepSearch data query

Usage:

 query data-query [OPTIONS] SEARCH_QUERY

Options:

  SEARCH_QUERY               [required]
  -s, --source TEXT
  -p, --proj-key TEXT        Provide project key  [required]
  -e, --instance TEXT
  -x, --index-key TEXT       index_key of data index  [required]
  -o, --output [table|json]  Output format  [default: table]

kg-fts

Launch a KG Full Text Search

Usage:

 query kg-fts [OPTIONS] SEARCH_QUERY

Options:

  SEARCH_QUERY               [required]
  -p, --proj-key TEXT        Provide project key  [required]
  -k, --kg-key TEXT          [required]
  -c, --collection TEXT      [required]
  -o, --output [table|json]  Output format  [default: table]

query-flow

Launch a raw flow query

Usage:

 query query-flow [OPTIONS]

Options:

  -i, --input-file PATH      [required]
  -o, --output [table|json]  Output format  [default: table]

wf

Launch a CPS KG Worflow query

Usage:

 query wf [OPTIONS]

Options:

  -i, --input-file PATH      JSON Workflow file, as generated by the CPS KG UI
                             [required]
  -p, --proj-key TEXT        Provide project key  [required]
  -k, --kg-key TEXT          [required]
  -o, --output [table|json]  Output format  [default: table]

version

Print the client and server version

Usage:

 version [OPTIONS]