Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

CLI command overview

Krzysztof (Chris) Bernat edited this page Feb 23, 2017 · 27 revisions

This page describes a list of all CLI command that we intend to implement.

The basic CLI commands are:

cate ds list [--query QUERY_EXPR]
cate ds sync DS_ID [--time DATE1[,DATE2]]
cate ds info DS_ID 

cate op list [--query QUERY_EXPR]
cate op info OP_NAME

cate pi list [--query QUERY_EXPR] 

cate run {--load DS_NAME=DS_ID[,DATE1[,DATE2]]} {--read INP_NAME=FILE[,FORMAT]} {--write [OUT_NAME=]FILE[,FORMAT]} OP_NAME [OP_ARGS...] 

cate gui

Note that OP_NAME above may also refer to a workflow JSON file path. QUERY_EXPR may be a simple wildcard string, or a dictionary comprising FIELD_NAME:PATTERN elements separated by comma. See also query syntax used by the ESGF Search RESTful API.

Additional commands require a current Workspace which is a current working directory containing a sub-directory .cate-workspace. (This is similar to the git tool, whose sub-commands expect that the current working directory is a repository, i.e. a directory containing a .git sub-directory.).

The following commands manage workspaces:

cate ws init WS_NAME
cate ws status

The following commands require a current workspace and manage workspace resources, which are the return values of former operation calls. Workspace resources can be of any (Python) data type:

cate res set RES_NAME OP_NAME [OP_ARGS...] 
cate res del RES_NAME 
cate res load RES_NAME DATA_SOURCE_NAME [--time TIME] 
cate res read RES_NAME FILE[,FORMAT[,READER_ARGS...]]
cate res write RES_NAME {[OUT_NAME=]FILE[,FORMAT[,WRITER_ARGS...]]}
cate res write-all  :)
cate res rename OLD_RES_NAME NEW_RES_NAME 
cate res status RES_NAME 

The following commands are used to manage the cate WebAPI service:

cate webapi start
cate webapi stop
cate webapi status