OCLI
The newest addition to OptOSS AI suite is TSAR AI developed specifically for processing of Copernicus Earth Observations Data. This repository contains the Open Source elements of TSAR AI only and is provided for intended audiences of researches and scientists in the field of remote sensing.
This open source version of TSAR AI platform makes human analysts aware of changes to water bodies and on the surface. TSAR AI combines Earth observation data from multiple bands and then AI produces delineation maps. With growing fleet of Earth observation satellites which use Synthetic Aperture Radar antenna (SAR) as a remote sensing tool more frequent revisit times allow for almost daily reports with valuable insights being generated automatically in fraction of the time when compared with human analysts.
This open source version relies on the ESA Sentinel Toolbox SNAP for processing of the satellite imagery with provided graph via GTP. See the Readme file for more information.
TSAR AI won the 2018 EC Copernicus Masters Emergency Management Challenge and was further developed by combining public and private money, e.g. EC Copernicus Incubation grant and angel investor funding.
TSAR AI project is developed and maintained by OPT/NET BV (http://opt-net.eu) – a Dutch startup who makes and markets the high performance and high precision commercial modules for TSAR AI platform as well, with multiple mapping modules produced for emergency management and smart agriculture application areas.
Documentation
How to set up environment
The easiest and fastest way to start using OCLI - use Dev Container
Build OCLI Docker image
Please see Build OCLI Docker image and run in container
OCLI environment structure
Init Environment cript creates required files and folders.
These should be in a user folder
~/.tsarrc~/.ocli-history
Logging Configuration in .tsarrc
You can configure log verbosity by adding log_level to your ~/.tsarrc (or project .tsarrc):
log_level: INFO # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
Default: If
log_levelis omitted or empty,INFOis used.Fallback: If an invalid value is provided, a warning is logged and
INFOis used.CLI Override: Passing
--verbose/-v(e.g.ocli -v DEBUG repl) takes highest precedence over.tsarrc.
OCLI_HOME could be anywhere. By default, OCLI_HOME will be located in user folder $HOME/OCLI/*.
OCLI environment init script
OCLI_HOME="~/OCLI_HOME"
./scripts/init_environment.sh $OCLI_HOME
ocli create -n default -y
ocli activate default
You can also use OCLI command
ocli init -y
Start OCLI REPL
python ocli/cli/cli.py repl
Prerequisites
Python >= 3.11.9
GDAL => 3.9.0
Install Requirements
pip install -e .
Get OCLI sources
Clone OCLI repository
mkdir ~/ocli-install
cd ~/ocli-install
git clone git@github.com:Opt-OSS/GoldenRAM.git
Command tree (tree)
The tree command prints the command hierarchy of OCLI. It is available at the root and under every sub‑group.
Usage examples:
From your shell:
ocli tree
ocli roi tree
ocli tree -d 1
From the REPL:
tsar> tree
tsar> roi tree
tsar> roi tree –depth 2
Notes:
Use –depth/-d to limit how many levels are displayed (0 prints only the current node; 1 includes its children, etc.).
The tree shows commands under the current group (so roi tree prints only the ROI subtree).
Hidden commands are not shown. Options and arguments for each command are listed under the node.
Example (truncated):
ocli - CLI for GOLDEN AI processing
├── roi - manage Regions of Interest
│ ├── add
│ ├── list
│ └── tree - show the command tree of your CLI or the current sub-command tree
├── task - task management
│ ├── create
│ └── list
└── aikp - AI knowledge packs
└── list - List available knowledge packs from ocli and ocli-pro.
If ocli-pro is installed, its commands will also appear in the tree.
AI Knowledge Packs list (aikp list)
The aikp list command discovers and lists available AI knowledge packs.
Rules and discovery:
Searches in both ocli.aikp and ocli.pro.aikp namespaces.
Includes both top-level packs and one-level sub‑packs (e.g., pack/satellite).
A folder is considered a knowledge pack only if it contains assemble_recipe.py defining a function assemble_kernel.
Run:
From your shell: ocli aikp list
From the REPL: tsar> aikp list
Output columns:
Name: pack or pack/subpack
Origin: ocli or ocli-pro
Template name: the import-like dotted path you can pass to task create
Example output (truncated):
--------------------------- -------- ----------------------------------------------
Name Origin Template name
composite_single/sentinel_2 ocli ocli.aikp.composite_single.sentinel_2
marine/sentinel_1 ocli-pro ocli.pro.aikp.marine.sentinel_1
Use the Template name to create a task:
ocli task create \
--template ocli.pro.aikp.composite_single.sentinel_2 \
--roi <roi_name> -n <task_name> --activate
Region of Interest (ROI)
OCLI tasks can be constrained to a Region of Interest defined from a vector file (GeoJSON, Shapefile) or an inline Well-Known Text (WKT) string with optional CRS reprojection:
# Add ROI from WKT (EPSG:4326)
ocli roi add -n roi125 -wkt "MULTIPOLYGON (((37.770546843 44.753689936, 37.831089263 44.7409286, 37.81317474 44.697787217, 37.752673375 44.710539167, 37.770546843 44.753689936)))"
# Add ROI with custom CRS
ocli roi add -n roi_utm -wkt "POLYGON ((...))" --crs "EPSG:32637"
For full details on ROI management, vector formats, and task workflows, see ROI Documentation.
S3 / Cloud Object Storage Direct Streaming
Satellite products can be processed directly from S3 or MinIO buckets without downloading into local storage:
# Standard S3 archive URL (master auto-derived as SLH_3126479.zip)
ocli task set master_path="s3://bucket/SLH_3126479.zip"
# Or setting via master
ocli task set master=s3://staging/SLH_3126479.zip
# Local filesystem path (backward compatible)
ocli task set master=/root/OCLI_HOME/EODATA/SLH_3126479.zip
Composite Archive URIs (zip://)
When an archive in S3 contains a specific inner product directory (e.g., ICEYE scene folder inside a zip), specify a composite URI:
ocli task set master_path="zip://<inner_path>::<source_url>"
# Example:
ocli task set master_path="zip://SLH_3126479::s3://staging/SLH_3126479.zip"
# Or:
ocli task set master="zip://SLH_3126479::s3://staging/SLH_3126479.zip"
Features:
Auto-derivation: The
masterattribute is automatically derived from<inner_path>(e.g.,SLH_3126479), whilemaster_pathstores the full composite URI.GDAL VSI Translation: GDAL-compatible virtual filesystem paths are transparently generated (e.g.,
/vsizip//vsis3/staging/SLH_3126479.zip/SLH_3126479).Validation: Verifies remote S3 object existence via MinIO/S3 boto3 without requiring local file downloads.
For full details on S3 paths, credentials, and virtual filesystem streaming, see Finders and Data Sources.