Skip to content

Repository files navigation

prometheus-cli

CLI tool for querying Prometheus/Thanos, analyzing time-series data, and computing correlations. Designed for AI agent consumption.

Install

uv tool install -e .

Usage

# Query Prometheus and export data
prometheus-cli query --url http://localhost:9090 --query 'up' --interval 1h --csv data.csv --graph graph.png

# Analyze exported CSV
prometheus-cli analyze data.csv

# Correlate two datasets
prometheus-cli correlate file1.csv file2.csv --lag

Development

# First-time setup (installs Python, pre-commit hooks)
make bootstrap

# Run tests
make test

# Run all checks (ruff, ruff-format, bandit, gitleaks, trailing whitespace...)
make check-all

make test and make check-all are the preferred way to validate changes during development.

About

Simple tool to get data from Prometheus for automation or AI agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages