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.2.0.tar.gz (42.6 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.2.0-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for geadm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f8915e20dca0c2ad7a3640b2d101b917bc8a4c1a1993784593c9019631b9aaa4
MD5 f3683e52bdb9292cadca29400bab4588
BLAKE2b-256 1401a5e5fec82caaca93ccd70f4bcbf397e9f188f3a995a9c3455319fdfc5fb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for geadm-0.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: geadm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 37.2 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34eba65c0617cf9573f63dc7c3c7769bdaa188485a55acb2a7b1bc75f8bf26bc
MD5 4b7e04ab9c8157d6daa6f372fd06dfb4
BLAKE2b-256 71aaf667ffd576316358d38af28134ba5255368a244f6f4cd6a13e45b5dc6a98

See more details on using hashes here.

Provenance

The following attestation bundles were made for geadm-0.2.0-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