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

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