Skip to main content

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

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 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.

city login                    # opens a link; sign in to City Hall → ~/.config/city/teams/<roster>/ (session, controller key, llm.vk)
city init agent demo          # creates ./demo/ with the template (no secrets inside)
# edit demo/card.yaml role if needed (booking_centre|facility|gp|b2b)
city card validate --root demo
city deploy demo              # from the parent folder; always promotes on PASS
city status agent:demo        # team filled from city login; agent:t07/demo still works

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:

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

JSON for scripting:

city --json status agent: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).

city --api-url local init agent demo
cd demo
city --api-url local dev
city dev --serve                 # loopback harness; POST /dev/invoke stays local
city --api-url local conform --profile fast

The harness writes public diagnostic logs as one redacted JSON object per line on stdout when CITY_ENV=cloud, which Cloud Logging ingests. A local city dev --serve prints the same record as a short block instead. city dev --serve --json keeps the JSON lines. Uvicorn and FastAPI use the same formatter. Reputation and transactions stay on city-events.

Commands (overview)

Command Purpose
city login Like gcloud auth login: the CLI listens on 127.0.0.1, opens a City Hall link, and the browser redirects back once you are signed in — no code to confirm (ADR-029, PKCE). The roster team comes from the browser. Also downloads the team City LLM Gateway virtual key to llm.vk (ADR-031; lazy-ensured if the team predated the feature). --no-browser prints a code to approve on another device. Optional --team only asserts a private expectation (mismatch never names the other team). --api-url local requires --team and self-approves.
city keys init Escape hatch: regenerate controller key + register public key
city init agent <name> Create <name>/ from a starter template (--template booking_centre|facility|gp|specialist|family_counseling|b2b); injects the logged-in team into card.yaml / city.yaml; 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, or --serve a loopback harness with POST /dev/invoke
city conform Conformance suite (--profile full|fast, or --url)
city deploy <name> Upload + pipeline from <name>/ under --root; always promotes on PASS (--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

City LLM Gateway (team virtual keys)

After city login, the team gateway VK is at ~/.config/city/teams/<team>/llm.vk. Local brains read CITY_LLM_VIRTUAL_KEY / CITY_LLM_GATEWAY_URL (default https://llm.projectnandaitaly.ai) via city_sdk.gateway_env.

Ops checklist (gateway active)

  • Cloud Run service llm healthy on llm.projectnandaitaly.ai
  • CITY_VERTEX_PROJECT (and optional CITY_VERTEX_LOCATION) set on the LLM service so city-default uses Vertex AI Gemini; otherwise the shared Gemini handle fallback stays active
  • Vertex AI API enabled for the LLM service account; Redis VK index reachable (CITY_REDIS_URL)
  • After rollout: POST /v1/admin/teams/llm-keys/ensure once (CSRF), then spot-check that an existing team’s city login writes llm.vk

License

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

Metadata

Release files for city-cli 0.9.87

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for city-cli 0.9.87
File Size Uploaded Provenance Actions
city_cli-0.9.87.tar.gz 100.3 kB Without provenance Details for city_cli-0.9.87.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for city-cli 0.9.87
File Interpreter ABI Platform Actions
city_cli-0.9.87-py3-none-any.whl Python 3 none any Details for city_cli-0.9.87-py3-none-any.whl

Total release size: 234.7 kB

Release files / city_cli-0.9.87.tar.gz

Download URL city_cli-0.9.87.tar.gz
Size 100.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d77c7ab34a1d9f108a8320db3a838f8d03cfc4fcc04f9adc9eceae4a4fd33ada
BLAKE2b-256 checksum
How to use checksums
5befd2fe2a47747d71a93916db6810aab131949f6e06bc12c7a2719a9e208a03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / city_cli-0.9.87-py3-none-any.whl

Download URL city_cli-0.9.87-py3-none-any.whl
Size 134.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40bca24cb3f9ed7055fb193d19604a3bbf4b4748bee71a0acf347c54bc13ff51
BLAKE2b-256 checksum
How to use checksums
bc5ae44a95b025292e7359e58545c5fbdb34d587656ef883ba4c91a667fe8ef3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for city-cli 0.9.87

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.87 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page