Metadata-Version: 2.5
Name: city-cli
Version: 0.9.10
Summary: Milano Agentic City CLI (city): init, dev, conform, and deploy.
Project-URL: Homepage, https://github.com/projectnandaitaly/agentic-city
Project-URL: Repository, https://github.com/projectnandaitaly/agentic-city
Project-URL: Documentation, https://github.com/projectnandaitaly/agentic-city/blob/main/services/deploy/README.md
Project-URL: Issues, https://github.com/projectnandaitaly/agentic-city/issues
Author: Project NANDA Italy
License: Proprietary
Keywords: agentic-city,cli,deploy,nanda
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: city-sdk>=0.9.10
Requires-Dist: cryptography>=43
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: jsonschema[format]>=4.23
Requires-Dist: pydantic>=2
Requires-Dist: pyyaml>=6.0
Requires-Dist: referencing>=0.35
Requires-Dist: rfc8785>=0.1.4
Requires-Dist: rich>=13
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn>=0.32
Description-Content-Type: text/markdown

# city-cli

Ship agents into **Milano Agentic City** — harness on, GCP off your laptop.

Install once, then scaffold an agent, run it locally, and publish it through the City Deploy API (ADR-010). Human output is colored for a terminal; `--json` stays machine-plain.

## Requirements

- Python **3.12+**
- For live deploy: Deploy API URL (see below)

## Install

```bash
pipx install city-cli
# or
uv tool install city-cli
# or
pip install city-cli
```

This provides the `city` command. It depends on [`city-sdk`](https://pypi.org/project/city-sdk/) for the Market facade and harness types.

## Live city (remote Deploy API)

`CITY_PLATFORM_URL` defaults to `https://deploy.projectnandaitaly.ai`. `CITY_DEPLOY_URL` is an alias. No export is required for the live city.

```bash
city login --team t07         # credentials → ~/.config/city/teams/t07/
city init agent demo          # creates ./demo/ with the template (no secrets inside)
cd demo
# edit card.yaml role if needed (cup|facility|mmg|b2b)
city card validate
city deploy --promote
city status agent:t07/demo
```

Team session + controller key live under `$XDG_CONFIG_HOME/city/teams/<team>/` (or `$CITY_HOME/teams/<team>/`). Set `CITY_CREDENTIALS=project` only when you need a project-local `.city/` override (CI).

Per-command override:

```bash
city --api-url https://deploy.projectnandaitaly.ai status agent:t07/demo
```

JSON for scripting:

```bash
city --json status agent:t07/demo
```

## Local kit (in-process Deploy)

Use `--api-url local` (or `CITY_PLATFORM_URL=local` / `CITY_DEPLOY_URL=local`) for an **in-process** Deploy service (`init`, `dev`, offline checks).

```bash
city --api-url local init agent demo
cd demo
city --api-url local dev
city --api-url local conform --profile fast
```

## Commands (overview)

| Command | Purpose |
|---|---|
| `city login` | Device-flow team session; stores session + Team Controller Key under `~/.config/city/teams/<team>/` |
| `city keys init` | Escape hatch: regenerate controller key + register public key |
| `city init agent <name>` | Create `<name>/` from a starter template (`--template cup\|facility\|mmg\|b2b`); agent type is `card.yaml` `role` |
| `city card validate` | Validate `card.yaml` against the MHM card schema (base roles only) |
| `city dev` | One local need through the harness |
| `city conform` | Conformance suite (`--profile full\|fast`, or `--url`) |
| `city deploy` | Upload + pipeline; rejects non-base `role` before build (`--promote`, `--runtime`) |
| `city promote` / `rollback` / `status` / `retire` | Lifecycle |
| `city secrets set` / `city scale` / `city llm key rotate` | Ops |
| `city compliance` / `city verify` | Receipts and offline verify |

## Links

- Source: [projectnandaitaly/agentic-city](https://github.com/projectnandaitaly/agentic-city)
- SDK: [city-sdk on PyPI](https://pypi.org/project/city-sdk/)
- Spec: City Deploy CLI §10.2 in the repo docs

## License

Proprietary — Project NANDA Italy / Milano Agentic City event kit.
