Gemini Collector
Detects Google Gemini CLI invocations in CI pipelines. Records command strings, versions, and flags for policy-level analysis. Writes to ai.native.gemini under the unified ai.* namespace.
gemini to your lunar-config.yml:uses: github://earthly/lunar-lib/collectors/gemini@v1.0.5
What This Integration Collects
This integration includes 2 collectors that gather metadata from your systems.
instruction-file
Discovers GEMINI.md instruction files across the repository. Records file path, line count, byte size, and whether it is a symlink to AGENTS.md. Writes to ai.native.gemini.instruction_file and appends to ai.instructions.all[] for normalized cross-tool access.
cicd
Detects Google Gemini CLI invocations in CI pipelines. Records the command string and version for policy-level flag analysis (dangerous flags like --yolo and -y).
How Collectors Fit into Lunar
Lunar watches your code and CI/CD systems to collect SDLC data from config files, test results, IaC, deployment configurations, security scans, and more.
Collectors are the automatic data-gathering layer. They extract structured metadata from your repositories and pipelines, feeding it into Lunar's centralized database where guardrails evaluate it to enforce your engineering standards.
Learn How Lunar Works →Example Collected Data
This collector writes structured metadata to the Component JSON. Here's an example of the data it produces:
{
"ai": {
"instructions": {
"all": [
{
"path": "GEMINI.md",
"dir": ".",
"filename": "GEMINI.md",
"lines": 60,
"bytes": 2400,
"is_symlink": false,
"symlink_target": null
}
]
},
"native": {
"gemini": {
"instruction_file": {
"exists": true,
"path": "GEMINI.md",
"lines": 60,
"bytes": 2400,
"is_symlink": false,
"symlink_target": null
},
"cicd": {
"cmds": [
{
"cmd": "gemini run --json 'review this PR'",
"tool": "gemini",
"version": "0.1.0"
}
]
}
}
}
}
}
Documentation
View on GitHubGemini Collector
Detect Google Gemini CLI usage, instruction files, and CI invocations.
Overview
This collector detects Google Gemini usage: discovers GEMINI.md instruction files and captures CLI invocations in CI pipelines. Writes to ai.native.gemini under the unified ai.* namespace.
Collected Data
This collector writes to the following Component JSON paths:
| Path | Type | Description |
|---|---|---|
.ai.instructions.all[] |
array append | GEMINI.md entry appended to the normalized instruction files array |
.ai.native.gemini.instruction_file |
object | GEMINI.md file: existence, path, line count, byte size, symlink status |
.ai.native.gemini.cicd.cmds[] |
array | Gemini CLI invocations in CI: command string, version, and flags |
Collectors
This integration provides the following collectors:
| Collector | Hook | Description |
|---|---|---|
instruction-file |
code |
Discovers GEMINI.md instruction files with metadata and symlink status |
cicd |
ci-after-command (binary: gemini) |
Captures Gemini CLI invocations in CI with flag extraction |
Installation
Add to your lunar-config.yml:
collectors:
- uses: github://earthly/lunar-lib/collectors/gemini@main
on: ["domain:your-domain"]
Open Source
This collector is open source and available on GitHub. Contribute improvements, report issues, or fork it for your own use.
Common Use Cases
Explore guardrails that use data from Gemini Collector.
Ready to Automate Your Standards?
See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 100+ built-in guardrails.