Metadata-Version: 2.4
Name: ailab-cli
Version: 0.1.0
Summary: CLI for AI Image Labeling Tool — export annotations, manage projects
Project-URL: Homepage, https://github.com/XMV-Solutions-GmbH/ai-image-labeling-tool
Project-URL: Repository, https://github.com/XMV-Solutions-GmbH/ai-image-labeling-tool/tree/main/cli
Author: XMV Solutions GmbH
License-Expression: MIT
Keywords: annotation,cli,labeling,machine-learning
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25
Requires-Dist: inquirerpy>=0.3
Requires-Dist: rich>=13
Requires-Dist: typer<1,>=0.9
Provides-Extra: dev
Requires-Dist: pytest-mock>=3; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: respx>=0.20; extra == 'dev'
Description-Content-Type: text/markdown

# ailab-cli

CLI for the [AI Image Labeling Tool](https://github.com/XMV-Solutions-GmbH/ai-image-labeling-tool) — export annotations, browse projects and annotation runs.

## Installation

```bash
pip install ailab-cli
# or
pipx install ailab-cli
```

## Quick Start

```bash
# Log in to your AI Image Labeling Tool instance
ailab auth login --api-url https://lab.ai.xmv.de

# Or use the interactive TUI
ailab
```

## Usage

### Interactive Mode

Simply run `ailab` to start the interactive TUI:

```bash
ailab
```

Navigate with arrow keys, Enter to select, Esc to go back.

### Direct Commands

```bash
ailab auth login       # Authenticate via browser
ailab auth logout      # Remove local credentials
ailab auth status      # Show current auth status

ailab projects         # List accessible projects
ailab runs <projectId> # List annotation runs
ailab export -p <projectId> -r <runId> [-o export.json] [-f json|csv]
```

### Global Options

```bash
ailab --url https://other-instance.example.com projects  # Override API URL
```

## Configuration

Config is stored at `~/.config/ailab/config.json`.

You can also set the API URL via environment variable:

```bash
export AILAB_API_URL=https://lab.ai.xmv.de
```

## Publishing to PyPI

### Automated (GitHub Actions)

Tag a release to trigger the CI pipeline:

```bash
# Update version in pyproject.toml first
cd cli
git add pyproject.toml
git commit -m "chore: bump CLI version to X.Y.Z"
git tag cli-vX.Y.Z
git push origin main --tags
```

The GitHub Actions workflow builds, tests, and publishes to PyPI automatically.

**First-time setup:** Configure [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/) for the GitHub repository.

### Manual

```bash
cd cli
pip install build twine
python -m build
twine upload dist/*
```
