Concepts
chrs is now obsolete. It only works with outdated versions of ChRIS backend,
the latest supported version being 5.1.0.
These documentation remain as a design reference for the future development of
an updated ChRIS CLI client.
Inspirations
chrs behaves similarly, but not exactly, like a filesystem. The chrs command-line interface
is inspired by built-in shell commands and the design of kubectl.
Like a filesystem, you can run the cd command and ls commands:
chrs cd chris/feed_10/pl-dircopy_45/pl-unstack-folders_46/pl-dcm2niix_47
chrs ls
chrs ls ./data
chrs ls ..
chrs ls ../..
Unfortunately, path resolution is not fully implemented:
chrs ls '../DICOM to NIFTI simple'
Error: path not found
Like kubectl, resources should be prefixed by their resource type names, which can be abbreviated:
chrs describe 'plugin/pl-dcm2niix'
chrs describe 'pipeline/Fetal Reconstruction Pipeline'
chrs describe 'pp/Fetal Reconstruction Pipeline'
What's more is that chrs will try to guess what you mean if the resource type is not provided.
# assumed to be a plugin
chrs describe 'pl-dcm2niix'
# assumed to be a pipeline because plugin names don't usually contain spaces
chrs describe 'Fetal Reconstruction Pipeline'
Runnables
Runnables are involved in chrs run, chrs search, and chrs describe.
A runnable is one of:
Plugins
Plugins may be specified by any of:
- plugin name, e.g.
pl-dcm2niix,pl/pl-dcm2niix,plugin/pl-dcm2niix - plugin name and version, e.g.
pl-dcm2niix@1.0.0,pl/pl-dcm2niix@1.0.0,plugin/pl-dcm2niix@1.0.0(preferred) - plugin ID, e.g.
127,pl/127,plugin/127 - API URL, e.g.
https://cube.chrisproject.org/api/v1/plugins/127/
Pipelines
Pipelines may be specified by any of:
- pipeline name, e.g.
Fetal Brain Reconstruction,pp/Fetal Brain Reconstruction,pipeline/Fetal Brain Reconstruction - pipeline ID, e.g.
pp/12,pipeline/12 - API URL, e.g.
https://cube.chrisproject.org/api/v1/pipelines/12/
Data Nodes
Data nodes are involved in chrs run, chrs status, chrs list, chrs logs, chrs ls, and chrs download.
Data nodes are plugin instances, simply put. However, for flexibility they may be specified one of several ways:
- plugin instance title, e.g.
DICOM-to-NIFTI,pi/DICOM-to-NIFTI,plugininstance/DICOM-to-NIFTI - plugin instance ID, e.g.
42,pi/42,plugininstance/42 - relative path, e.g.
.,..,../.. - absolute* path, e.g.
rudolph/feed_130/pl-dircopy_543 - feed name, e.g.
feed/A tractography study - feed ID, e.g.
feed/80
*By convention, absolute paths do not start with /. Relative paths start with ./ or ...
Feeds as Data Nodes
Be aware that the different subcommands of chrs interpret feeds differently.
chrs download feed/Nwill download all files of a feedchrs status feed/Nwill show only the feed status, but no plugin instance statuseschrs run <runnable> feed/Nwill append the<runnable>to the most recent plugin instance infeed/N