What’s tracked
- Code generation — AI-generated code from Gemini CLI sessions
- Usage metrics — How often Gemini CLI is used across your team
- Token usage — input, output, and cached tokens per model
Prerequisites
- Gemini CLI installed
- Admin access to your Weave organization
Setup
Gemini CLI connects via a settings file and environment variables deployed to each developer’s machine. Gemini CLI collector mode is not offered yet. Its currenttelemetry.otlpEndpoint is an exact URL
used for both logs and metrics, while a standard OTLP/HTTP collector expects separate /v1/logs
and /v1/metrics paths. The Weave-generated settings use a signal-detecting ingest endpoint.
Changing only its host to a stock collector could lose one or both signals. Keep the generated
direct configuration until a Gemini version with per-signal endpoints or a tested demultiplexing
adapter can preserve both signals and user attribution after redaction.
1
Create an API key in Weave
Go to Data → Gemini, select In the terminal under How does your team use Gemini?, click Set up API keys on the Gemini CLI card, and then click Create API key. Save the settings JSON and environment variables. You will only see the full key once.
2
Install the settings file
Download or copy
settings.json and place it at one of these locations:3
Set environment variables
Set the required environment variables by either:
- Creating a
.envfile in the same folder as the settings file, or - Adding them to your shell profile (
~/.zshrc,~/.bashrc) and runningsource ~/.zshrc
4
Verify connection
Use Gemini CLI and check that activity appears in Weave after a few minutes
Metrics enabled
Once connected, you can track:- AI code LOC — Lines generated by Gemini CLI
- AI output percentage — Portion of output from Gemini CLI
- AI efficiency index — Impact on productivity
Cost tracking
Gemini CLI does not expose cost data. Its OpenTelemetry stream reports token counts (input, output, cached) and model names but no dollar amount, and Google does not offer a per-developer cost-attribution API for Gemini CLI the way Anthropic and Cursor do. As a result, Weave captures Gemini CLI token usage but does not produce a per-engineer dollar cost from it. Settings → Financial → Tool subscription costs has no Gemini CLI entry, so Gemini CLI spend isn’t included in Weave’s cost reporting. For exact spend, use your Google Cloud billing console. Gemini CLI usage on a Gemini API key or Vertex AI is billed there, but it isn’t attributable to individual engineers.Data privacy
Weave syncs usage metadata and prompt content from Gemini CLI:- Code generation statistics
- Token usage per model
- Tool usage decisions
- User prompt text (used for activity classification; system messages are excluded)
- Source code content or diffs
- Gemini’s responses
- File paths or project structure
Related integrations
- Claude Code — CLI-based AI assistant
- Cline — VS Code extension for AI coding
- Cursor — AI IDE
