Metadata-Version: 2.4
Name: acugis
Version: 0.2.0
Summary: Command-line interface for the AcuGIS geospatial platform
License: MIT
Project-URL: Homepage, https://acugis.com
Project-URL: Repository, https://github.com/acugis/federation
Keywords: gis,geospatial,cli,acugis,qgis
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Dynamic: license-file

# ACUGIS CLI

Command-line interface for the [AcuGIS](https://acugis.com) geospatial platform. Manage datasets, maps, dashboards, reports, databases, ETL pipelines, and synchronization projects from the terminal.

Authentication uses Central username/password login and persists the shared `acugis_session` cookie — the same model as the browser.

## Installation

### Development install

```bash
cd cli
python3 -m venv .venv

# Linux / macOS
source .venv/bin/activate

# Windows
.venv\Scripts\activate

pip install -e .
```

This installs the `acugis` command into your virtual environment.

### Verify

```bash
acugis version
acugis --help
```

## Quick start

```bash
acugis login https://app.acugis.cloud
acugis whoami
acugis catalog
acugis datasets list
acugis datasets preview bees
```

## Configuration

Login writes local session files under `~/.config/acugis/`:

| File | Purpose |
|------|---------|
| `config.json` | Platform base URL |
| `cookies.txt` | Central session cookies (`acugis_session`) |

Example `config.json`:

```json
{
  "base_url": "https://app.acugis.cloud"
}
```

Session cookies are reused across CLI restarts until they expire or you run `acugis logout`.

## Shell completion

Typer provides shell completion for Bash, Zsh, Fish, and PowerShell.

Install completion for your shell:

```bash
acugis --install-completion
```

Show the completion script without installing:

```bash
acugis --show-completion
```

Restart your shell after installing completion.

## Command reference

### Authentication

| Command | Description |
|---------|-------------|
| `acugis login <url>` | Log in with Central username and password |
| `acugis logout` | Remove local config and session cookies |
| `acugis whoami` | Show the current authenticated user |

```bash
acugis login https://app.acugis.cloud
acugis whoami
acugis whoami --json
acugis logout
```

### Catalog

| Command | Description |
|---------|-------------|
| `acugis catalog` | List datasets, maps, dashboards, and reports |

```bash
acugis catalog
acugis catalog --json
```

### Datasets (Geovault)

| Command | Description |
|---------|-------------|
| `acugis datasets list` | List datasets from the platform catalog |
| `acugis datasets preview <name>` | Preview dataset records (GeoJSON) |
| `acugis datasets info` | Show dataset metadata *(placeholder)* |
| `acugis datasets upload` | Upload a dataset *(placeholder)* |
| `acugis datasets download` | Download a dataset *(placeholder)* |
| `acugis datasets publish` | Publish a dataset *(placeholder)* |
| `acugis datasets versions` | List dataset versions *(placeholder)* |

```bash
acugis datasets list
acugis datasets list --json
acugis datasets preview bees
acugis datasets preview bees --version 2
acugis datasets preview bees --json
```

### Maps (QGIS Publish Service)

| Command | Description |
|---------|-------------|
| `acugis maps list` | List published maps from the platform catalog |
| `acugis maps info <map>` | Show map metadata (layers, reports, versions) |
| `acugis maps open <map>` | Open the map viewer URL in a browser |
| `acugis maps versions <map>` | List map versions/snapshots |
| `acugis maps publish` | Publish a map *(placeholder)* |
| `acugis maps delete` | Delete a map *(placeholder)* |

```bash
acugis maps list
acugis maps list --json
acugis maps info nyc
acugis maps open nyc
acugis maps versions nyc
```

### Dashboards (Dashboard Service)

| Command | Description |
|---------|-------------|
| `acugis dashboards list` | List dashboards *(placeholder)* |
| `acugis dashboards open` | Open a dashboard *(placeholder)* |
| `acugis dashboards publish` | Publish a dashboard *(placeholder)* |

### Reports (Jasper)

| Command | Description |
|---------|-------------|
| `acugis reports list` | List reports *(placeholder)* |
| `acugis reports run` | Run a report *(placeholder)* |
| `acugis reports schedule` | Schedule a report *(placeholder)* |
| `acugis reports info` | Show report metadata *(placeholder)* |

### Databases (PostGIS Service)

| Command | Description |
|---------|-------------|
| `acugis db list` | List databases *(placeholder)* |
| `acugis db create` | Create a database *(placeholder)* |
| `acugis db clone` | Clone a database *(placeholder)* |
| `acugis db backup` | Back up a database *(placeholder)* |
| `acugis db restore` | Restore a database *(placeholder)* |
| `acugis db delete` | Delete a database *(placeholder)* |

### GeoETL

| Command | Description |
|---------|-------------|
| `acugis etl pipelines` | List ETL pipelines *(placeholder)* |
| `acugis etl run` | Run an ETL pipeline *(placeholder)* |
| `acugis etl import` | Import data via ETL *(placeholder)* |
| `acugis etl status` | Show ETL job status *(placeholder)* |

### Sync (GeoSync)

| Command | Description |
|---------|-------------|
| `acugis sync projects` | List sync projects *(placeholder)* |
| `acugis sync servers` | List sync servers *(placeholder)* |
| `acugis sync status` | Show sync status *(placeholder)* |
| `acugis sync publish` | Publish a sync project *(placeholder)* |

### Version

```bash
acugis version
```

## JSON output

Commands that return data support `--json` for machine-readable output:

```bash
acugis whoami --json
acugis catalog --json
acugis datasets list --json
acugis datasets preview bees --json
acugis maps list --json
acugis maps info nyc --json
```

## Project layout

```
acugis/
  cli.py              Main application entry point
  auth.py             Login, logout, whoami
  catalog.py          Platform catalog
  session.py          Config, cookies, HTTP helpers
  util.py             Output formatting
  services/           Per-service command groups
pyproject.toml        Package metadata and entry points
README.md
LICENSE
```

## License

MIT — see [LICENSE](LICENSE).
