CLI usage¶
Similar to the Python API client, the CLI client provides the following capabilities:
- cuiman list-processes: list existing processes,
- cuiman get-process: get the details about a process,
- cuiman validate-request: validate a given process execution request,
- cuiman execute-process: execute a given process execution request,
- cuiman list-jobs: list the jobs resulting from process executions, and finally
- cuiman get-job: get a job's details,
- cuiman get-job-results: get a successful job's results, and finally
- cuiman dismiss-job: cancel a successful job.
In the following, we visit all the features by example.
The client expects a running server that conforms to the OGC API - Process: Part 1, Version 1.0. If you don't have one available, you can also run the project's server with a test configuration:
wraptile run -- wraptile.services.local.testing:service
In [1]:
Copied!
 !cuiman --help
 !cuiman --help
                                                                               
 Usage: cuiman [OPTIONS] COMMAND [ARGS]...                                     
                                                                               
 The command-line interface `cuiman` is the shell client for servers           
 compliant with OGC API - Processes.                                           
                                                                               
 The tool can be used to get the available processes, get process details,     
 execute processes, and manage the jobs originating from the latter.  It       
 herewith resembles the functionality of the OGC API Processes - Part 1.       
 You can use shorter command name aliases, e.g., use command name `vr` for     
 `validate-request`, or `lp` for `list-processes`.                             
 The tool's exit codes are as follows:                                         
 - `0` - normal exit - `1` - user errors, argument errors - `2` - remote API   
 errors  - `3` - local network transport errors                                
 If the --traceback flag is set, the original Python exception traceback will  
 be shown and the exit code will always be `1`.  Otherwise, only the error     
 message is shown.                                                             
                                                                               
+- Options -------------------------------------------------------------------+
| --version                     Show version and exit.                        |
| --traceback,--tb              Show server exception traceback, if any.      |
| --install-completion          Install completion for the current shell.     |
| --show-completion             Show completion for the current shell, to     |
|                               copy it or customize the installation.        |
| --help                        Show this message and exit.                   |
+-----------------------------------------------------------------------------+
+- Commands ------------------------------------------------------------------+
| configure          Configure the client tool.                               |
| list-processes     List available processes.                                |
| get-process        Get process details.                                     |
| create-request     Create an execution request (template) for a given       |
|                    process.                                                 |
| validate-request   Validate a process execution request.                    |
| execute-process    Execute a process in asynchronous mode.                  |
| list-jobs          List all jobs.                                           |
| get-job            Get job details.                                         |
| dismiss-job        Cancel a running or delete a finished job.               |
| get-job-results    Get job results.                                         |
+-----------------------------------------------------------------------------+
In [2]:
Copied!
 !cuiman configure -s http://127.0.0.1:8008 -u bibo -t 1234
 !cuiman configure -s http://127.0.0.1:8008 -u bibo -t 1234
Client configuration written to C:\Users\Clara\.eozilla\config
In [3]:
Copied!
!cuiman list-processes
!cuiman list-processes
links:
- href: http://127.0.0.1:8008/processes
  hreflang: en
  rel: self
  title: get_processes
  type: application/json
processes:
- description: Sleeps for `duration` seconds. Fails on purpose if `fail` is `True`.
    Returns the effective amount of sleep in seconds.
  id: sleep_a_while
  title: Sleep Processor
  version: 0.0.0
- description: Returns the list of prime numbers between a `min_val` and `max_val`.
  id: primes_between
  title: Prime Processor
  version: 0.0.0
- description: Simulate a set scene images slices for testing. Creates an xarray dataset
    with `periodicity` time slices and writes it as Zarr into a temporary location.
    Requires installed `dask`, `xarray`, and `zarr` packages.
  id: simulate_scene
  title: Generate scene for testing
  version: 0.0.0
- id: return_base_model
  title: BaseModel Test
  version: 0.0.0
In [4]:
Copied!
!cuiman get-process primes_between
!cuiman get-process primes_between
description: Returns the list of prime numbers between a `min_val` and `max_val`.
id: primes_between
inputs:
  max_val:
    minOccurs: 0
    schema:
      default: 100
      maximum: 100.0
      type: integer
    title: Max Val
  min_val:
    minOccurs: 0
    schema:
      default: 0
      minimum: 0.0
      type: integer
    title: Min Val
outputs:
  return_value:
    schema:
      items:
        type: integer
      type: array
    title: Return Value
title: Prime Processor
version: 0.0.0
In [5]:
Copied!
!cuiman execute-process primes_between -i min_val=10 -i max_val=80
!cuiman execute-process primes_between -i min_val=10 -i max_val=80
created: '2025-10-24T14:08:25.482651Z' finished: '2025-10-24T14:08:25.483976Z' jobID: job_0 message: Done processID: primes_between started: '2025-10-24T14:08:25.483831Z' status: successful type: process updated: '2025-10-24T14:08:25.483966Z'
In [6]:
Copied!
!cuiman list-jobs
!cuiman list-jobs
jobs: - created: '2025-10-24T14:08:25.482651Z' finished: '2025-10-24T14:08:25.483976Z' jobID: job_0 message: Done processID: primes_between started: '2025-10-24T14:08:25.483831Z' status: successful type: process updated: '2025-10-24T14:08:25.483966Z' links: - href: http://127.0.0.1:8008/jobs hreflang: en rel: self title: get_jobs type: application/json
In [7]:
Copied!
!cuiman get-job job_0
!cuiman get-job job_0
created: '2025-10-24T14:08:25.482651Z' finished: '2025-10-24T14:08:25.483976Z' jobID: job_0 message: Done processID: primes_between started: '2025-10-24T14:08:25.483831Z' status: successful type: process updated: '2025-10-24T14:08:25.483966Z'
In [8]:
Copied!
!cuiman get-job-results job_0
!cuiman get-job-results job_0
return_value: - 11 - 13 - 17 - 19 - 23 - 29 - 31 - 37 - 41 - 43 - 47 - 53 - 59 - 61 - 67 - 71 - 73 - 79
In [ ]:
Copied!