getop 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
getop-1.0.0/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.egg-info/
4
+ .claude/settings.local.json
5
+ dist/
6
+ getop/_build.py
@@ -0,0 +1,126 @@
1
+ # Changelog
2
+
3
+ ## [1.0.0](https://github.com/egen/geadm/compare/v0.7.0...v1.0.0) (2026-07-04)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * command and package are now getop.
9
+
10
+ ### Features
11
+
12
+ * rename project geadm → getop ([#41](https://github.com/egen/geadm/issues/41)) ([393abc6](https://github.com/egen/geadm/commit/393abc69d848e50a633f29cfc29f285ef51994ff))
13
+
14
+ ## [0.7.0](https://github.com/egen/geadm/compare/v0.6.0...v0.7.0) (2026-07-04)
15
+
16
+
17
+ ### Features
18
+
19
+ * **quota:** link quota names to the Cloud console ([#39](https://github.com/egen/geadm/issues/39)) ([f837cc8](https://github.com/egen/geadm/commit/f837cc88258abf196b3063dc06b3524698db19ed))
20
+
21
+ ## [0.6.0](https://github.com/egen/geadm/compare/v0.5.1...v0.6.0) (2026-07-04)
22
+
23
+
24
+ ### Features
25
+
26
+ * **cli:** armor --summary aggregates hits by filter ([#37](https://github.com/egen/geadm/issues/37)) ([d22367e](https://github.com/egen/geadm/commit/d22367e483c3cffac3dbb8ba26c618811b5c533f))
27
+
28
+ ## [0.5.1](https://github.com/egen/geadm/compare/v0.5.0...v0.5.1) (2026-07-03)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **cli:** clear update message on PyPI propagation lag ([#35](https://github.com/egen/geadm/issues/35)) ([d981393](https://github.com/egen/geadm/commit/d9813938dc860eb7529a27dcfaa84c7cf65953ba))
34
+
35
+
36
+ ### Documentation
37
+
38
+ * **readme:** add roles/modelarmor.viewer ([#33](https://github.com/egen/geadm/issues/33)) ([a6a5372](https://github.com/egen/geadm/commit/a6a53720d71831da519628b65a6ebba20098400c))
39
+
40
+ ## [0.5.0](https://github.com/egen/geadm/compare/v0.4.0...v0.5.0) (2026-07-03)
41
+
42
+
43
+ ### Features
44
+
45
+ * **cli:** armor --policy prints the Model Armor template ([#32](https://github.com/egen/geadm/issues/32)) ([430023f](https://github.com/egen/geadm/commit/430023f7a929254c90238c612cc8e3fa143f1f72))
46
+
47
+ ## [0.4.0](https://github.com/egen/geadm/compare/v0.3.2...v0.4.0) (2026-07-03)
48
+
49
+
50
+ ### Features
51
+
52
+ * **cli:** add armor command for Model Armor violations ([#30](https://github.com/egen/geadm/issues/30)) ([4245a8d](https://github.com/egen/geadm/commit/4245a8da03c46df414f522d70dc868b2af6e7451))
53
+
54
+ ## [0.3.2](https://github.com/egen/geadm/compare/v0.3.1...v0.3.2) (2026-07-03)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * **cli:** force fresh index in update to beat PyPI cache lag ([#28](https://github.com/egen/geadm/issues/28)) ([423b686](https://github.com/egen/geadm/commit/423b68610816b404521f900f4b44b0b6c2cf8b04))
60
+
61
+ ## [0.3.1](https://github.com/egen/geadm/compare/v0.3.0...v0.3.1) (2026-07-03)
62
+
63
+
64
+ ### Bug Fixes
65
+
66
+ * **cli:** tighten command help text ([#25](https://github.com/egen/geadm/issues/25)) ([371265a](https://github.com/egen/geadm/commit/371265a64e1d81da156f63e8d059292678030e8a))
67
+
68
+ ## [0.3.0](https://github.com/egen/geadm/compare/v0.2.2...v0.3.0) (2026-07-03)
69
+
70
+
71
+ ### Features
72
+
73
+ * **cli:** add update command ([#24](https://github.com/egen/geadm/issues/24)) ([9cc11e7](https://github.com/egen/geadm/commit/9cc11e73ef839eccc0c20d6cb60555d9a6ae117f))
74
+
75
+ ## [0.2.2](https://github.com/egen/geadm/compare/v0.2.1...v0.2.2) (2026-07-03)
76
+
77
+
78
+ ### Documentation
79
+
80
+ * **readme:** simpler install, two-engine hero demo ([#22](https://github.com/egen/geadm/issues/22)) ([ce01bbe](https://github.com/egen/geadm/commit/ce01bbeb28db8d25e407622c89bd47addeaad77e))
81
+
82
+ ## [0.2.1](https://github.com/egen/geadm/compare/v0.2.0...v0.2.1) (2026-07-03)
83
+
84
+
85
+ ### Documentation
86
+
87
+ * **readme:** add example output for every command ([#21](https://github.com/egen/geadm/issues/21)) ([e8fc35a](https://github.com/egen/geadm/commit/e8fc35a232c05c4ff10b307a09c254cecc7dea69))
88
+ * **readme:** pipx-first install, globals table, auth after commands ([#18](https://github.com/egen/geadm/issues/18)) ([b60c8bc](https://github.com/egen/geadm/commit/b60c8bc23fe5c4fe00501d4d808a40f6491c1d62))
89
+
90
+ ## [0.2.0](https://github.com/egen/geadm/compare/v0.1.1...v0.2.0) (2026-07-03)
91
+
92
+
93
+ ### Features
94
+
95
+ * **cli:** add version command with build commit ([#17](https://github.com/egen/geadm/issues/17)) ([737f0e5](https://github.com/egen/geadm/commit/737f0e5b8b0838b45b2c70d3df0a075941972a38))
96
+
97
+ ## [0.1.1](https://github.com/egen/geadm/compare/v0.1.0...v0.1.1) (2026-07-03)
98
+
99
+
100
+ ### Bug Fixes
101
+
102
+ * **ci:** harden for public release per BOFH review ([#13](https://github.com/egen/geadm/issues/13)) ([e3fadf0](https://github.com/egen/geadm/commit/e3fadf09a2bfd85d4b29a466e509095fc1cfc769))
103
+ * **cli:** concise help output ([#14](https://github.com/egen/geadm/issues/14)) ([c1f4ee6](https://github.com/egen/geadm/commit/c1f4ee6b68e8f31af8aaad744411a457605e04a7))
104
+
105
+ ## 0.1.0 (2026-07-03)
106
+
107
+
108
+ ### Features
109
+
110
+ * **info:** add project overview with per-engine cards ([#8](https://github.com/egen/geadm/issues/8)) ([49b92e2](https://github.com/egen/geadm/commit/49b92e27eff310ba33428bcdbe320c2006f35d6e))
111
+ * **info:** show engine feature toggles and app type on cards ([#10](https://github.com/egen/geadm/issues/10)) ([fad2b5b](https://github.com/egen/geadm/commit/fad2b5b8651a8915af34eb6ac0f7a230dcb9f8a6))
112
+ * **logs:** add gen_ai prompt/response content stream ([#4](https://github.com/egen/geadm/issues/4)) ([432c1c8](https://github.com/egen/geadm/commit/432c1c8bf01b613e72d84dbf81239dcda21b7f7e))
113
+ * **ls:** add user license inventory ([#3](https://github.com/egen/geadm/issues/3)) ([708c173](https://github.com/egen/geadm/commit/708c173af1fcf1a283bc1a49712317362f46a926))
114
+ * **release:** add MIT license, packaging metadata and release pipeline ([#11](https://github.com/egen/geadm/issues/11)) ([308fe11](https://github.com/egen/geadm/commit/308fe11abecafca8daae6d5d853b0323efff9f3e))
115
+
116
+
117
+ ### Bug Fixes
118
+
119
+ * **logs:** parse structured gen_ai content payloads ([#6](https://github.com/egen/geadm/issues/6)) ([fa2662c](https://github.com/egen/geadm/commit/fa2662c0b3ee2a6b96d71d938fec10142168c061))
120
+ * **logs:** use non-markup prefixes for gen_ai tool/thought parts ([#7](https://github.com/egen/geadm/issues/7)) ([e40ec55](https://github.com/egen/geadm/commit/e40ec556ac38befa94881276ecc24b3e97a1a519))
121
+
122
+
123
+ ### Documentation
124
+
125
+ * **agents:** adopt Conventional Commits ([#5](https://github.com/egen/geadm/issues/5)) ([514a710](https://github.com/egen/geadm/commit/514a710cf82fe863e254c7e223a6a3d15606efb6))
126
+ * **readme:** document geadm info ([#9](https://github.com/egen/geadm/issues/9)) ([4494f56](https://github.com/egen/geadm/commit/4494f5646ea323ca6f16d04d01eac38423c9e99a))
getop-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Egen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
getop-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,360 @@
1
+ Metadata-Version: 2.4
2
+ Name: getop
3
+ Version: 1.0.0
4
+ Summary: CLI for Google Gemini Enterprise
5
+ Project-URL: Homepage, https://github.com/egen/getop
6
+ Project-URL: Repository, https://github.com/egen/getop
7
+ Project-URL: Issues, https://github.com/egen/getop/issues
8
+ Project-URL: Changelog, https://github.com/egen/getop/blob/main/CHANGELOG.md
9
+ Author: Egen
10
+ Maintainer: Andrew McKinney
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: agentspace,cli,discovery-engine,gemini-enterprise,google-cloud,observability
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: System Administrators
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: System :: Monitoring
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: google-cloud-discoveryengine>=0.13
26
+ Requires-Dist: google-cloud-logging>=3.10
27
+ Requires-Dist: google-cloud-monitoring>=2.21
28
+ Requires-Dist: rich>=13.7
29
+ Requires-Dist: typer>=0.12
30
+ Description-Content-Type: text/markdown
31
+
32
+ # getop
33
+
34
+ [![Gemini Enterprise](https://img.shields.io/badge/Gemini%20Enterprise-Discovery%20Engine-4285F4?logo=googlecloud&logoColor=white)](https://cloud.google.com/gemini/enterprise)
35
+ [![PyPI](https://img.shields.io/pypi/v/getop)](https://pypi.org/project/getop/)
36
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
37
+ [![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
38
+
39
+ **getop** is a command-line companion for operating **Google Gemini Enterprise**.
40
+ It answers the questions that come up daily while running a deployment — What's
41
+ deployed? Are the connectors syncing? What are users asking, and what is Model
42
+ Armor flagging? How close are we to a quota ceiling? Is everything healthy? — in
43
+ one screen each, straight from your terminal.
44
+
45
+ ```console
46
+ $ getop info
47
+ Gemini Enterprise — acme-search-prod (global)
48
+
49
+ ╭─────── Engines ───────╮ ╭───── Data stores ─────╮ ╭────── Connectors ──────╮
50
+ │ 2 │ │ 9 │ │ 3/3 ACTIVE │
51
+ ╰───────────────────────╯ ╰───────────────────────╯ ╰────────────────────────╯
52
+ ╭─────── Agents ────────╮ ╭─────── Licenses ──────╮
53
+ │ 41 │ │ 27/500 (5.4%) │
54
+ ╰───────────────────────╯ │ 21/27 logged in │
55
+ │ 12 awaiting license │
56
+ ╰───────────────────────╯
57
+
58
+ ╭─────────────── Support Search ───────────────╮ ╭─────────────── Sandbox ──────────────╮
59
+ │ SEARCH · GENERIC · intranet · 2026-04-08 │ │ SEARCH · GENERIC · intranet · 2026-03-26│
60
+ │ Data stores (6) │ │ Data stores (3) │
61
+ │ • acme-sharepoint_1774543_file ← sharepoint│ │ • acme-sharepoint_1774543_file ← shar…│
62
+ │ • acme-sharepoint_1774543_page ← sharepoint│ │ • acme-onedrive_1775136_file ← onedrive│
63
+ │ • acme-onedrive_1775136_file ← onedrive │ │ • acme-gdrive_1778773_file ← google_dr…│
64
+ │ Agents (37 — 3 enabled, 34 user defaults) │ │ Agents (4 — 4 enabled, 0 user defaults)│
65
+ │ • Deep Research ENABLED │ │ • Security Reviewer ENABLED │
66
+ │ • Contract Analyst PRIVATE │ │ • Deep Research ENABLED │
67
+ │ • My Agent ×34 (user defaults, private) │ │ • Idea Generation ENABLED │
68
+ │ Features (16 on · 5 off) │ │ Features (14 on · 7 off) │
69
+ │ ✓ agent-gallery model-selector notebook-lm │ │ ✓ agent-gallery model-selector │
70
+ │ ✗ agent-sharing-without-admin-approval canvas│ │ ✗ session-sharing onedrive-upload │
71
+ ╰────────── support-search_1775663018 ─────────╯ ╰──────── sandbox_1774543712 ──────────╯
72
+ ```
73
+
74
+ Two engines side by side — spot the config drift at a glance: sandbox has
75
+ `session-sharing` and `onedrive-upload` disabled where prod allows them.
76
+
77
+ By design, the current release is strictly read-only — every command works with
78
+ viewer roles alone, so it can be handed to anyone on the team without
79
+ change-risk. It may grow administrative verbs (e.g. triggering connector syncs,
80
+ managing agents) in a future release.
81
+
82
+ Contributing with an AI coding agent? Read [AGENTS.md](AGENTS.md) — it maps the
83
+ project subagents, skills and hard constraints.
84
+
85
+ ## Install
86
+
87
+ ```sh
88
+ pipx install getop
89
+ ```
90
+
91
+ Also works with `uv tool install getop` or `pip install getop`. See
92
+ [Authentication](#authentication) for the one-time credential setup.
93
+
94
+ ## Commands
95
+
96
+ ### `getop info` — project overview
97
+
98
+ A whole-project dashboard: summary tiles (engines, data stores, connector
99
+ health, agents, and license seats / activation / unmet demand) plus a card per
100
+ engine showing its data stores with their connector sources, its agents ("My
101
+ Agent" user defaults collapsed into a single ×N line), and its feature toggles.
102
+ Diffing two environments' cards is the fastest way to spot config drift. Output
103
+ is shown at the top of this page.
104
+
105
+ ### `getop ls` — inventory
106
+
107
+ ```sh
108
+ getop ls engines|datastores|connectors|agents|licenses
109
+ ```
110
+
111
+ Lists resources across the collection hierarchy: engines and data stores under
112
+ `default_collection`, data connectors across *all* collections (each
113
+ connector-backed source lives in its own), agents per engine, and user licenses.
114
+
115
+ ```console
116
+ $ getop ls connectors
117
+ Data Connectors
118
+ ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
119
+ ┃ Collection ┃ Data Source ┃ State ┃ Refresh Interval ┃ Entities ┃
120
+ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
121
+ │ acme-sharepoint_1774 │ sharepoint │ ACTIVE │ 86400s │ 5 │
122
+ │ acme-onedrive_1775 │ onedrive │ ACTIVE │ 86400s │ 1 │
123
+ └──────────────────────┴─────────────┴────────┴──────────────────┴──────────┘
124
+
125
+ $ getop ls licenses
126
+ User Licenses
127
+ ┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
128
+ ┃ User ┃ State ┃ Config ┃ Last Login ┃
129
+ ┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
130
+ │ alice@example.com │ ASSIGNED │ enterprise │ 2026-07-03T12:47:25 │
131
+ │ bob@example.com │ ASSIGNED │ enterprise │ 2026-07-03T11:25:22 │
132
+ └───────────────────┴──────────┴─────────────┴─────────────────────┘
133
+ ```
134
+
135
+ ### `getop logs` — view and tail logs
136
+
137
+ ```sh
138
+ getop logs connector [--datastore ID] [--severity ERROR] [--since 1h]
139
+ getop logs user [email] [--since 24h] [--follow]
140
+ getop logs ai [--since 24h] [--follow]
141
+ ```
142
+
143
+ `connector` shows data-connector sync activity. `user` shows end-user activity —
144
+ prompts, assistant replies, searches, and Model Armor screening events — for one
145
+ user, or all users when the email is omitted. `ai` streams the raw
146
+ `gen_ai.user.message` / `gen_ai.choice` content logs (no identity field, so it
147
+ can't be scoped per user — use `logs user` for that). `--follow`/`-f` tails
148
+ either stream live. When a log is empty, getop tells you whether logging simply
149
+ isn't enabled on the project or nothing matched your filter.
150
+
151
+ ```console
152
+ $ getop logs user --since 24h
153
+ ╭──────────────────────────────── SENSITIVE ─────────────────────────────────╮
154
+ │ ⚠ Output may include end-user prompt/response content if prompt/response │
155
+ │ logging is enabled on this project. │
156
+ ╰─────────────────────────────────────────────────────────────────────────────╯
157
+ User activity: all users (24h)
158
+ ┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
159
+ ┃ Time ┃ Severity ┃ User ┃ Message ┃ Reply (truncated) ┃
160
+ ┡━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
161
+ │ 16:57:06 │ INFO │ alice@example.… │ StreamAssist: What's │ Your travel policy │
162
+ │ │ │ │ our travel policy? │ allows economy fa… │
163
+ │ 12:49:04 │ WARNING │ bob@example.com │ ModelArmorAudit: │ │
164
+ │ │ │ │ Ignore all previous… │ │
165
+ └──────────┴──────────┴─────────────────┴───────────────────────┴─────────────────────┘
166
+ ```
167
+
168
+ The `WARNING` row is Model Armor flagging a prompt-injection attempt. Tail it
169
+ live with `getop logs user -f`, or pull full transcripts with `--json`.
170
+
171
+ ### `getop armor` — Model Armor violations
172
+
173
+ ```sh
174
+ getop armor [--since 24h] [--all]
175
+ ```
176
+
177
+ Surfaces prompts and responses that Model Armor flagged, with the filters
178
+ that tripped and their confidence (jailbreak, RAI categories, CSAM,
179
+ malicious URIs). Violations only by default; `--all` includes clean
180
+ screenings. Carries no user identity — pair with `getop logs user`.
181
+
182
+ Add `--summary` for a per-filter rollup — hit counts, last seen, and an example
183
+ input per category — instead of the event-by-event list:
184
+
185
+ ```console
186
+ $ getop armor --summary --since 7d
187
+ Model Armor hits by filter (7d)
188
+ ┏━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
189
+ ┃ Filter ┃ Hits ┃ Last seen ┃ Example input ┃
190
+ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
191
+ │ pi_and_jailbreak │ 3 │ 2026-07-03T12:49:03 │ Ignore all previou… │
192
+ │ malicious_uris │ 2 │ 2026-07-03T09:14:00 │ http://testsafebro… │
193
+ └──────────────────┴──────┴─────────────────────┴─────────────────────┘
194
+ ```
195
+
196
+ Add `--policy` to print the configured Model Armor template(s) instead — the
197
+ filters that are enabled and at what confidence:
198
+
199
+ ```console
200
+ $ getop armor --policy
201
+ Model Armor policy — ge-default-amer (us)
202
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
203
+ ┃ Filter ┃ Enforcement ┃ Confidence ┃
204
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
205
+ │ Prompt injection & jailbreak │ ENABLED │ HIGH │
206
+ │ Responsible AI: DANGEROUS │ ENABLED │ MEDIUM_AND_ABOVE │
207
+ │ Malicious URIs │ ENABLED │ │
208
+ └───────────────────────────────────┴─────────────┴──────────────────┘
209
+ ```
210
+
211
+ ```console
212
+ $ getop armor --since 7d
213
+ Model Armor violations (7d)
214
+ ┏━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
215
+ ┃ Time ┃ Direction ┃ Match ┃ Filters ┃ Content ┃
216
+ ┡━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
217
+ │ 12:49:03 │ prompt │ MATCH_FOUND │ pi_and_jailbreak(HIGH), │ Ignore all │
218
+ │ │ │ │ rai:dangerous(HIGH) │ previous inst… │
219
+ └──────────┴───────────┴─────────────┴───────────────────────────┴────────────────┘
220
+ ```
221
+
222
+ ### `getop stats` — metrics
223
+
224
+ ```sh
225
+ getop stats [--engine ID] [--since 24h]
226
+ ```
227
+
228
+ Discovers the project's `discoveryengine.googleapis.com` metrics at runtime and
229
+ summarises query volume, latency and connector sync freshness over the window.
230
+
231
+ ```console
232
+ $ getop stats --since 24h
233
+ Discovery Engine metrics — acme-search-prod (global)
234
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
235
+ ┃ Metric type ┃ Category ┃ Points ┃ Aggregate ┃
236
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
237
+ │ …/serving/search_request_count │ volume │ 288 │ 1,204 (sum) │
238
+ │ …/serving/search_latencies │ latency │ 288 │ 342 (p95) │
239
+ │ …/dataconnector/synced_doc_count │ connector │ 24 │ 48,102 (sum) │
240
+ └───────────────────────────────────┴───────────┴────────┴─────────────────────┘
241
+ ```
242
+
243
+ ### `getop quota` — quota usage
244
+
245
+ ```sh
246
+ getop quota [--since 24h]
247
+ ```
248
+
249
+ Pairs each Discovery Engine quota's latest usage with its limit per location:
250
+ percent used (highlighted at ≥75% / ≥90%), byte quotas in human units, and
251
+ counts of quota-exceeded events over the window — the quickest way to spot the
252
+ next capacity ceiling before ingestion hits it. On terminals that support
253
+ hyperlinks, each quota name links to the project's Cloud console quotas page.
254
+
255
+ ```console
256
+ $ getop quota
257
+ Discovery Engine quotas — acme-search-prod (global)
258
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━┓
259
+ ┃ Quota ┃ Location ┃ Usage ┃ Limit ┃ Used ┃ Exceeded ┃
260
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━┩
261
+ │ document_size_tier_st… │ global │ 85.6 MiB │ 1.0 GiB │ 8.4% │ │
262
+ │ data_stores_regional │ global │ 8 │ 100 │ 8.0% │ │
263
+ │ documents_regional │ global │ 76 │ 10,000,000 │ 0.0% │ │
264
+ └────────────────────────┴──────────┴───────────┴────────────┴──────┴──────────┘
265
+ ```
266
+
267
+ ### `getop doctor` — health check
268
+
269
+ ```sh
270
+ getop doctor [--since 24h]
271
+ ```
272
+
273
+ Runs the whole suite concurrently and renders a live PASS/WARN/FAIL table across
274
+ inventory reachability, connector states and sync freshness, connector/API error
275
+ logs, and metric availability. Exits non-zero if any check fails, so it drops
276
+ straight into CI or cron.
277
+
278
+ ```console
279
+ $ getop doctor
280
+ getop doctor — acme-search-prod (global)
281
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
282
+ ┃ Check ┃ Status ┃ Detail ┃
283
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
284
+ │ engines │ OK │ 1 engine(s): support-search │
285
+ │ datastores │ OK │ 6 data store(s) │
286
+ │ data connectors │ OK │ 2 connector(s), all ACTIVE, synced <24h │
287
+ │ agents │ OK │ 37 agent(s) across 1 engine(s) │
288
+ │ connector errors (24h) │ OK │ no connector ERROR logs since 24h │
289
+ │ API errors (24h) │ OK │ no discoveryengine API ERROR logs │
290
+ │ monitoring metrics │ OK │ 369 metric type(s) discovered │
291
+ └────────────────────────┴────────┴───────────────────────────────────────────┘
292
+ ```
293
+
294
+ ### `getop version`
295
+
296
+ ```console
297
+ $ getop version
298
+ getop 0.2.2 (v0.2.2, commit a1854e8)
299
+ ```
300
+
301
+ Prints the release, tag and the git commit the package was built from.
302
+
303
+ ### `getop update`
304
+
305
+ ```console
306
+ $ getop update
307
+ Update available: 0.2.2 → 0.3.0
308
+ $ pipx upgrade getop
309
+ ```
310
+
311
+ Checks PyPI for a newer release and upgrades in place, detecting whether you
312
+ installed via pipx, uv or pip. Use `--check` to only report.
313
+
314
+ ### Global options
315
+
316
+ Available on every command:
317
+
318
+ | Switch | Meaning |
319
+ |---|---|
320
+ | `--project` / `-p` | Target GCP project. Defaults to the ADC project; also reads `GOOGLE_CLOUD_PROJECT`. |
321
+ | `--location` / `-l` | Gemini Enterprise location (default `global`). Regional values route to `{location}-discoveryengine.googleapis.com`. |
322
+ | `--quota-project` | Project to bill API quota against when you lack `serviceusage.services.use` on the target; also reads `GOOGLE_CLOUD_QUOTA_PROJECT`. |
323
+ | `--json` | Machine-readable output on every command (newline-delimited JSON in `--follow` mode). |
324
+ | `--since` | Look-back window on time-based commands: `30m`, `1h`, `24h`, `7d`. |
325
+
326
+ Every table above is also available as JSON — pipe it straight into `jq`:
327
+
328
+ ```sh
329
+ getop quota --json | jq '.[] | select(.percent_used > 75)'
330
+ getop ls licenses --json | jq '[.[] | select(.last_login_time == null)] | length'
331
+ ```
332
+
333
+ ## Authentication
334
+
335
+ Authenticate once with Application Default Credentials:
336
+
337
+ ```sh
338
+ gcloud auth application-default login
339
+ ```
340
+
341
+ getop never reads or writes key files. Each command needs only a viewer role:
342
+
343
+ | Role | Used by |
344
+ |---|---|
345
+ | `roles/discoveryengine.viewer` | `getop ls …`, `getop info`, `getop doctor` |
346
+ | `roles/logging.viewer` | `getop logs …`, `getop doctor` |
347
+ | `roles/monitoring.viewer` | `getop stats`, `getop quota`, `getop doctor` |
348
+ | `roles/modelarmor.viewer` | `getop armor --policy` |
349
+
350
+ User credentials (as opposed to service accounts) also need a quota project:
351
+ getop uses the target project automatically, which requires
352
+ `serviceusage.services.use` there. If you don't have it, use `--quota-project`.
353
+
354
+ Enabling connector/observability *logging* on a project is a one-time setup
355
+ step requiring `roles/discoveryengine.agentspaceAdmin`; getop only ever reads
356
+ what's there.
357
+
358
+ ## License
359
+
360
+ MIT © Egen — see [LICENSE](LICENSE).