Metadata-Version: 2.4
Name: jetstan-cli
Version: 0.1.0
Summary: Engineer-facing CLI for Jetstan fleet operations. Standalone PyPI package (own console script: `jetstan`) that talks to the Control Plane over HTTP - never to PostgreSQL or MQTT directly. Also home to jetstan_deploy.py, the working release tool (relocated here from scripts/), which remains independent of the `jetstan` command surface.
Project-URL: Repository, https://github.com/PICODE-Labs/JETSTAN-PICODE
Keywords: ota,cli,automotive,fleet
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: typer==0.27.1
Requires-Dist: httpx==0.28.1
Requires-Dist: python-dotenv==1.2.2
Requires-Dist: paho-mqtt==2.1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
Provides-Extra: deploy
Requires-Dist: build>=1.0.0; extra == "deploy"
Requires-Dist: twine>=5.0.0; extra == "deploy"

# jetstan-cli

Engineer-facing CLI for Jetstan fleet operations. Installs its own
console script, `jetstan`, independently of `jetstan-agent` — this is
a standalone PyPI package, not a submodule of the OTA agent.

`jetstan` talks to the Control Plane (`cloud-logics`) over HTTP only.
It never talks to PostgreSQL or MQTT directly (see the repo root
`TECHNICAL.md` for the full architecture).

## Phase 2.1 status

Exactly three commands exist:

```
jetstan --help
jetstan --version
jetstan health
```

Nothing else. `jetstan_cli/commands/*.py` are documented placeholders
for future subcommands (`publish`, `deployment-group`, `deployment`,
`release`) — not wired into the CLI yet, since the Control Plane has
no business logic to back them.

`jetstan_deploy.py`, the working release tool relocated here from the
old top-level `scripts/`, is unrelated to the `jetstan` command and
still runs via `python -m jetstan_cli.jetstan_deploy`.

## Installing

```bash
cd jetstan-cli
pip install -e .
```

Or, once published:

```bash
pip install jetstan-cli
```

Either way, this registers the `jetstan` console script.

## Configuration

`jetstan health` needs to know where the Control Plane is. Set
`JETSTAN_API` — there is no hardcoded default:

```bash
cp .env.example .env
# edit .env: JETSTAN_API=http://127.0.0.1:8123
```

`jetstan_cli/config.py` reads this from the environment (or from
`jetstan-cli/.env` for local development, the same convention every
other package in this repo already uses).

## Usage

```bash
jetstan --help
jetstan --version

jetstan health
# ✓ Control Plane Healthy      (exit code 0)
# or
# ✗ Control Plane Unreachable  (exit code 1)
```

## Testing

```bash
pip install -e ".[dev]"
pytest
```
