Metadata-Version: 2.4
Name: zicon-cli
Version: 0.1.0
Summary: Command line interface for the ZiCON Cloud API, built on the zicon-cloud SDK.
Project-URL: Homepage, https://zicon.cloud
Author: ZiCON
License: MIT
Requires-Python: >=3.8
Requires-Dist: click>=8.0
Requires-Dist: zicon-cloud>=0.2.0
Description-Content-Type: text/markdown

# zicon-cli

A command line interface for the [ZiCON Cloud API](https://zicon.cloud), built on top of the
[`zicon-cloud`](https://pypi.org/project/zicon-cloud/) Python SDK.

## Install

```bash
pip install zicon-cli
```

This installs a `zicon` command on your `PATH`.

## Authentication

Dataset, tool, and endpoint discovery commands work without any credentials. Project
management commands require a ZiCON API key.

Set it as an environment variable:

```bash
export ZICON_API_KEY="your-api-key"
```

or pass it per-command with `--api-key`:

```bash
zicon projects list --api-key your-api-key
```

If a command needs an API key and neither the environment variable nor `--api-key` is
provided, `zicon` prints an error explaining how to fix it and exits.

## Usage

### Datasets

List all available datasets:

```bash
zicon datasets list
```

Get full details for a single dataset:

```bash
zicon datasets get <dataset-id>
```

Get the download URL for a dataset's file:

```bash
zicon datasets download <dataset-id>
```

### Tools

List tools available in the ZiCON ecosystem (name, language, install command):

```bash
zicon tools list
```

### Endpoints

List the ZiCON Cloud API's HTTP endpoints (method, path, description):

```bash
zicon endpoints list
```

### Projects (requires an API key)

List your projects:

```bash
zicon projects list
```

List the files belonging to a project:

```bash
zicon projects files <project-id>
```

Delete a project (prompts for confirmation before deleting):

```bash
zicon projects delete <project-id>
```

## Errors

`zicon` catches the errors raised by the `zicon-cloud` SDK and prints a clean message
instead of a Python traceback:

- `ZiconAuthError` — missing or invalid credentials
- `ZiconPermissionError` — credentials are valid but not permitted to perform the action
- `ZiconNotFoundError` — the requested resource does not exist
- `ZiconServerError` — the ZiCON Cloud API returned a server error

## License

MIT
