A lightweight, single-binary metrics server with a built-in Claude Code dashboard. Track token usage, costs, activity patterns, and code impact from your AI coding workflow. Zero-config startup. No external dependencies.
Install Now See the DashboardBuilt-in visualizations for Claude Code metrics, embedded directly in the binary. Point Claude Code's OTLP exporter at the server and open /dashboard/ to see your AI coding workflow at a glance.
The dashboard auto-refreshes every 30 seconds with configurable time ranges (24h, 7d, 30d, 90d). No Grafana setup required.
Input, output, cache read, and cache creation tokens with dollar cost over time by model.
Heatmaps showing when you code with Claude — by hour of day, day of week, and calendar view.
Track commits, pull requests created, and lines of code added or removed per session.
Active time, session counts, tool accept/reject rates, and language distribution.
# 1. Install lil-olt-metrics
curl -fsSL https://github.com/bobcob7/lil-olt-metrics/releases/download/v0.1.0/install.sh | sudo bash
# 2. Enable Claude Code telemetry export
# See: https://docs.anthropic.com/en/docs/claude-code/monitoring-usage
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
# 3. Open the dashboard
open http://localhost:9090/dashboard/
Built-in dashboard at /dashboard/ visualizes token usage, costs, activity patterns, and code impact from Claude Code sessions.
gRPC and HTTP endpoints accept all OTLP metric types: Gauge, Sum, Histogram, ExponentialHistogram, and Summary.
Full PromQL query engine. Drop-in Prometheus datasource for Grafana with instant, range, series, and label queries.
One static binary, no runtime dependencies. Runs anywhere: edge devices, dev machines, production servers.
Built-in filesystem engine with WAL and compaction. Optional remote backends: Prometheus remote write, VictoriaMetrics.
Sensible defaults for everything. Just run the binary and it works. Customize later via YAML or environment variables.
Automatic delta-to-cumulative temporality conversion for OTel metrics that use delta aggregation.
Install with a single command. The script downloads the latest release binary, installs it, and sets up a system service.
curl -fsSL https://github.com/bobcob7/lil-olt-metrics/releases/download/v0.1.0/install.sh | sudo bash
Installs the binary to /usr/local/bin, creates a lom system user, writes a default config, and starts a systemd service.
curl -fsSL https://github.com/bobcob7/lil-olt-metrics/releases/download/v0.1.0/install.sh | sudo bash
Installs the binary to /usr/local/bin, writes a default config, and registers a launchd daemon. The script auto-detects macOS.
# Download the binary directly (no service setup)
curl -fsSL https://github.com/bobcob7/lil-olt-metrics/releases/download/v0.1.0/install.sh | sudo bash -s -- --no-service
# Or download manually for your platform
curl -fsSL -o lil-olt-metrics \
https://github.com/bobcob7/lil-olt-metrics/releases/download/v0.1.0/lil-olt-metrics-linux-amd64
chmod +x lil-olt-metrics
./lil-olt-metrics
Available binaries: linux-amd64, linux-arm64, darwin-amd64, darwin-arm64.
curl -fsSL https://github.com/bobcob7/lil-olt-metrics/releases/download/v0.1.0/install.sh \ | sudo bash -s -- --version v0.1.0
OTLP metrics flow in via gRPC or HTTP, get translated to the Prometheus data model, and are stored in a pluggable backend. The Prometheus API serves PromQL queries to clients like Grafana.
| Stage | Package | Description |
|---|---|---|
| Ingestion | internal/ingest | gRPC and HTTP handlers for OTLP ExportMetricsServiceRequest |
| Translation | internal/ingest | OTLP to Prometheus sample conversion with label mapping and unit suffixes |
| Storage | internal/store | Appender interface with filesystem, Prometheus, and VictoriaMetrics backends |
| Query | internal/query | Prometheus HTTP API with embedded PromQL engine |
| Dashboard | internal/query | Embedded Vue.js dashboard for Claude Code metrics visualization |
Configuration is loaded in order of precedence: environment variables (LOM_ prefix), YAML config file, then built-in defaults.
| Port | Protocol | Description |
|---|---|---|
| 4317 | gRPC | OTLP metric ingestion |
| 4318 | HTTP | OTLP metric ingestion |
| 9090 | HTTP | Prometheus query API |
storage:
fs:
path: /var/lib/lil-olt-metrics
storage:
engine: prometheus
prometheus:
write_url: http://prometheus:9090/api/v1/write
read_url: http://prometheus:9090/api/v1/read
# Send test metrics telemetrygen metrics --otlp-insecure --duration 10s # Query via Prometheus API curl 'http://localhost:9090/api/v1/query?query=up' # List all metric names curl 'http://localhost:9090/api/v1/label/__name__/values'
| Feature | Status |
|---|---|
| Gauge | Supported |
| Sum (Counter) | Supported |
| Histogram | Supported |
| ExponentialHistogram | Supported |
| Summary | Supported |
| Delta-to-cumulative conversion | Supported |
| Resource attribute mapping | Supported |
| Protobuf content type | Supported |
| JSON content type | Supported |
| gzip compression | Supported |