CLI¶
The eocube command-line tool is installed with the cli extra
(pip install "eocube[cli]"). Every command and sub-command supports --help;
this page is an overview of the command tree.
Global options¶
| Option | Meaning |
|---|---|
--context <name> |
Use a specific context; defaults to context.primary. |
--log-level <level> |
DEBUG, INFO, WARNING (default), ERROR, CRITICAL. |
--version |
Print the version and build commit, then exit. |
eocube --context=eocube.ro services stac collection list
eocube setup¶
Initialise and edit the configuration file (see Configuration).
| Command | Description |
|---|---|
setup init [--force] |
Reset the config to the built-in ROCS defaults. |
setup auth add --name <n> oidc --discovery-url <url> |
Add an OIDC authentication source. |
setup storage add --name <n> --endpoint <url> [--auth-ref <name> \| --auth-oidc] |
Add a storage definition. |
setup stac add --name <n> --endpoint <url> [--auth <ref>] |
Add a STAC endpoint. |
setup context add --name <n> --auth <a> --stac <s> [--storage <s>] [--user-storage <s>] [--primary] |
Add a context. |
eocube auth¶
Authentication and credential helpers.
| Command | Description |
|---|---|
auth login [--device-flow] |
Log in (browser by default, or OAuth device flow). |
auth logout |
Revoke and clear the stored tokens. |
auth info |
Show the decoded claims of the current token. |
auth get-access-token |
Print a valid OIDC access token to stdout. |
auth get-storage-credentials [--endpoint <url>] [--duration <s>] [--as-json] |
Obtain temporary S3 credentials via STS. |
auth get-storage-credentials-with-token --token <jwt> [--endpoint <url>] |
The same, using a token you supply. |
auth login writes your refresh token into the active context in
eocube.yml; subsequent commands re-mint access tokens from it automatically.
In containers / CI, set the environment variables
instead of logging in.
eocube services¶
services stac¶
CRUD, search, and endpoint management for the STAC catalog. See STAC Catalog Authorization for the ownership and visibility rules that apply when you publish.
| Command | Description |
|---|---|
stac collection create \| list \| get \| update \| delete |
Manage collections. |
stac item add \| get \| update \| delete |
Manage items within a collection. |
stac search |
Search the catalog (by collection, bbox, datetime, …). |
stac endpoint get-default \| set-default |
Show or set the default STAC endpoint. |
stac endpoint alias add \| remove \| list |
Manage STAC endpoint aliases. |
services geospatialorg¶
Look up Romanian administrative units and counties from geo-spatial.org.
| Command | Description |
|---|---|
geospatialorg get-county-by-name --name <name> |
County by name. |
geospatialorg get-county-by-mnemonic --name <code> |
County by mnemonic (e.g. TM). |
geospatialorg get-administrative-unit-by-name --name <name> |
Administrative unit by name. |
geospatialorg get-administrative-unit-by-code --code <siruta> |
Administrative unit by SIRUTA code. |
Requires the services extra
These commands need geopandas / owslib. Install them with
pip install "eocube[services]". A command run without them fails with a
clear hint rather than crashing the CLI.
services proxy¶
Run a local authenticating reverse proxy to an EOCube service. It injects your
OIDC token into every forwarded request, so a tool that can't speak OIDC (a
browser, curl, QGIS, a notebook) can reach the service through the local URL.
eocube services proxy --endpoint https://stac.eocube.ro --port 9112
curl http://127.0.0.1:9112/collections
| Option | Default | Meaning |
|---|---|---|
--endpoint <url> |
(required) | Upstream service to proxy to. |
--port <n> |
9112 |
Local port. |
--bind <addr> |
127.0.0.1 |
Local bind address (see the security note in --help). |
--anonymous |
off | Do not inject a token. |
eocube mcp serve¶
Run a Model Context Protocol (MCP) server that exposes the EOCube toolset to LLM
agents. Runs over stdio by default, or streamable HTTP with --http.
Defaults (host, port, stateless, allow-destructive) come from the mcp
section of the configuration; flags override them. Needs the mcp extra.
eocube mcp serve # stdio
eocube mcp serve --http --host 0.0.0.0 --port 8002
eocube tools¶
Offline helpers that need no API access — for example
tools stac create-item, which builds a STAC Item from raster files.