Command-line guide
Use sen4cap-client in a terminal to inspect processes, submit work, and manage
jobs. Follow the installation instructions first.
The same saved configuration is used by the Python API and the App.
The commands below are included from cli.sh. Copy individual sections into your terminal; the file is a collection of recipes and exits without running them when invoked as a script. Run file-based examples from the repository root. The commands shown also work in PowerShell; Bash is not required.
Configure the client
sen4cap-client --help
sen4cap-client configure
sen4cap-client login
The built-in defaults point to the default Sen4CAP processing service.
Accept the defaults, or enter the service URLs supplied for another deployment.
configure saves public settings and may offer to log in.
login obtains credentials and saves them in the OS keyring; if you already
logged in during configuration, the separate login command is optional.
See configuration for profiles and authentication options.
Use --help after any command to inspect its arguments and options.
Inspect a process
sen4cap-client list-processes
sen4cap-client get-process 218
Process 218 is the example used in the API guide. If your service
uses different process IDs, select one from list-processes. Inspect its input
and output definitions before preparing a request.
Prepare and validate a request
To start with a template for the selected process:
sen4cap-client create-request 218 --format json
Copy the printed JSON into a UTF-8 file named request.json and edit it;
generated defaults are only a starting point. Saving explicitly as UTF-8 also
avoids Windows PowerShell 5.1's UTF-16 redirection default.
For process 218, the repository also provides the
NDVI example request. Validate that request:
sen4cap-client validate-request 218 --request examples/guides/ndvi-request.json
validate-request checks the execution request's structure locally. It does not
guarantee that the selected service will accept every process-specific value.
To use your edited template, replace the example path with request.json in
the validation and submission commands.
Submit a job
sen4cap-client execute-process 218 --request examples/guides/ndvi-request.json
The command submits work asynchronously and prints job information. Save the
returned job ID. Replace YOUR_JOB_ID in the commands below with that value.
Monitor and retrieve results
sen4cap-client list-jobs
sen4cap-client get-job YOUR_JOB_ID
Repeat get-job while the job is accepted or running. Once its status is
successful, retrieve the result references:
sen4cap-client get-job-results YOUR_JOB_ID
Use the Python API to open and plot raster assets.
Cancel or delete a job
The following command cancels a running job or deletes a finished job. Run it only for a job you intend to dismiss:
sen4cap-client dismiss-job YOUR_JOB_ID
Open the App
sen4cap-client show-app
Keep the terminal running while using the App; press Ctrl+C when finished. See the App guide for the visual workflow and the CLI reference for the full command list.
The original CLI notebook remains available separately.