Metadata-Version: 2.4
Name: xoople-cli
Version: 0.1.0
Summary: Command-line interface for the Xoople Products API.
License-Expression: LicenseRef-Xoople-Proprietary
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: xoople-sdk>=0.2.0
Requires-Dist: cyclopts>=4.18,<5
Requires-Dist: rich>=13.7
Requires-Dist: xoople-sdk[entra]>=0.1.0 ; extra == 'entra'
Requires-Python: >=3.12
Project-URL: Homepage, https://xoople.com
Provides-Extra: entra
Description-Content-Type: text/markdown

# xoople-cli

Command-line interface for the Xoople Products API, over [`xoople-sdk`](../xoople-sdk).

```console
$ uv tool install xoople-cli
$ export XOOPLE_API_URL=https://api.xoople.com XOOPLE_TOKEN=...
$ xoople analyses list
```

Every command reads `--api-url` and `--token` from `XOOPLE_API_URL` and
`XOOPLE_TOKEN`. `--json` prints the API response verbatim instead of a table, so
output pipes into `jq`.

## Commands

| Group | Commands |
| --- | --- |
| `analyses` | `list` `get` `create` `update` `cancel` `estimate` |
| `runs` | `list` `get` |
| `outputs` | `list` `get` `access-url` |
| `schedules` | `list` `get` `create` `pause` `resume` `cancel` `run` `estimate-run` |
| `events` | `list` `get` |
| `usage` | `history` `limits` |
| `catalog` | `products` `measures` `designs` |
| `access` | `me` `token` `features` |

## Submitting an analysis

The product spec is deeply nested and differs per product, so `create` and
`estimate` take it as JSON rather than as flags:

```console
$ xoople catalog designs --json | jq '.designs[0].spec_fragment' > spec.json
$ # fill in period and aoi, then:
$ xoople analyses create -f spec.json --display-name "South Wales NDVI" --wait
```

The file holds either the bare spec or a whole create request (anything with a
`spec` key). `-f -` reads stdin. `--wait` polls the initial run and exits
non-zero if it does not reach `COMPLETE`.

## Exit codes

`0` success · `1` unexpected CLI error · `2` usage error · `3` unauthenticated · `4` forbidden ·
`5` not found · `6` bad request or validation · `7` conflict · `8` rate limited ·
`9` server error · `10` connection failure · `11` unreadable response ·
`12` run finished in a non-`COMPLETE` state · `13` `--wait` timed out.
