Skip to main content

CLI for Google Gemini Enterprise

Project description

geadm

Gemini Enterprise uv Python

geadm is a command-line companion for operating Google Gemini Enterprise. It gives platform teams fast answers to the questions that come up daily while running a Gemini Enterprise deployment: What's deployed? Are the connectors syncing? What are users asking, and what is Model Armor flagging? How close are we to a quota ceiling? Is everything healthy?

It inventories engines, data stores, connectors and agents; inspects and tails the platform's Cloud Logging streams; summarises Cloud Monitoring metrics and quota utilisation; and runs a one-shot health check across all of it.

By design, the current release is strictly read-only — every command works with viewer roles alone, so it can be handed to anyone on the team without change-risk. It may grow administrative verbs (e.g. triggering connector syncs, managing agents) in a future release.

Contributing with an AI coding agent? Read AGENTS.md — it maps the project subagents, skills and hard constraints.

Install

uv tool install geadm      # or: pipx install geadm / pip install geadm

From a checkout:

uv tool install .
# or for development:
uv sync && uv run geadm --help

Authentication & roles

geadm uses Application Default Credentials (gcloud auth application-default login); it never reads or writes key files.

Role Used by
roles/discoveryengine.viewer geadm ls …, geadm doctor
roles/logging.viewer geadm logs …, geadm doctor
roles/monitoring.viewer geadm stats, geadm quota, geadm doctor

User credentials (as opposed to service accounts) also need a quota project: geadm uses the target project automatically, which requires serviceusage.services.use there. If you don't have it, pass --quota-project <other-project> (or set GOOGLE_CLOUD_QUOTA_PROJECT) to bill a project you can use.

Enabling connector/observability logging on a project is a one-time setup step requiring roles/discoveryengine.agentspaceAdmin; geadm only ever reads what's there.

Commands

Global options: --project (defaults to the ADC project), --location (default global; regional locations are routed to {location}-discoveryengine.googleapis.com). Every command supports --json for machine-readable output, and time-windowed commands take --since (30m, 1h, 24h, 7d).

Overview — geadm info

geadm info

Project-wide dashboard: summary tiles (engines, data stores, connector health, agents, license seats/activation/unmet demand) plus a card per engine showing its data stores with their connector sources and its agents ("My Agent" user defaults are grouped into a single ×N line).

Inventory — geadm ls

geadm ls engines|datastores|connectors|agents|licenses

Walks the collection hierarchy: engines and data stores under default_collection, data connectors across all collections (each connector-backed source lives in its own), agents per engine, and user licenses in the project's default_user_store.

Logs — geadm logs

geadm logs connector [--datastore ID] [--severity ERROR] [--since 1h]
geadm logs user [email] [--since 24h] [--follow]
geadm logs ai [--since 24h] [--follow]

logs connector shows data-connector sync activity. logs user shows end-user Gemini Enterprise activity — prompts, assistant replies, searches and Model Armor screening events — for one user, or all users when the email is omitted. logs ai streams the raw gen_ai.user.message/gen_ai.choice content logs (prompt and reply text with no identity field, so it cannot be scoped per user — use logs user for that). --follow/-f tails either stream live (newline-delimited JSON with --json). When a log turns out to be empty, geadm tells you whether logging simply isn't enabled on the project or nothing matched your filter.

Sensitive output: geadm logs user and geadm logs ai can surface end-user prompt and response content when prompt/response logging is enabled on the project, and print a warning banner before any output.

Metrics — geadm stats

geadm stats [--engine ID] [--since 24h]

Discovers the project's discoveryengine.googleapis.com metrics at runtime and summarises query volume, latency and connector sync freshness over the window.

Quotas — geadm quota

geadm quota [--since 24h]

Pairs each Discovery Engine quota's latest usage with its limit per location: percent used (highlighted at ≥75% / ≥90%), byte quotas in human units, and counts of quota-exceeded events over the window — the quickest way to spot the next capacity ceiling before ingestion hits it.

Health check — geadm doctor

geadm doctor [--since 24h]

Runs the whole suite concurrently — inventory reachability, connector states and sync freshness, connector/API error logs, metric availability — and renders a live PASS/WARN/FAIL table. Exits non-zero if any check fails, so it drops straight into CI or cron.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geadm-0.1.1.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geadm-0.1.1-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file geadm-0.1.1.tar.gz.

File metadata

  • Download URL: geadm-0.1.1.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for geadm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5ea9fbc7e3e00fae51d81d67593d9dc9153f0d5156598fac5eb2e619bf3f309e
MD5 f0cffe13ae0666fccf53b54ff10def75
BLAKE2b-256 26b7bc5be44bd68d784b2906606a30f269d4bc7b2bb4202d059ae435bc3c10d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for geadm-0.1.1.tar.gz:

Publisher: release.yml on egen/geadm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geadm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: geadm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for geadm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1e78fe1677b987efb02d2abbb74e5a2980ba5bf2c89f371c8d760ecc1f174e2
MD5 70553b582a928d771a8132359245c118
BLAKE2b-256 9a0c917675c4d948928bf1570af3c66cbd6b16ee9e6aea756ee07d25170ea778

See more details on using hashes here.

Provenance

The following attestation bundles were made for geadm-0.1.1-py3-none-any.whl:

Publisher: release.yml on egen/geadm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page