Repository navigation
Getting Started
balakrishnagatla edited this page Nov 29, 2026
·
1 revision
git clone https://github.com/balakrishnagatla/infralens && cd infralens
pip install -e ".[aws]"
infralens scanThis scans a built-in demo environment ("Acme Shop" on a Monday morning) and prints the daily discoveries report: idle resources, a payment-api incident linked to the deploy that caused it, and untagged resources.
docker compose up --build -d # simulated AWS (moto) + seeded resources + MCP server on localhost:8080
python demo/mcp_client_demo.py http://localhost:8080/mcp change-me-local-demo
docker compose run --rm infralens scan
docker compose downmcp_client_demo.py talks to the server exactly the way an AI client does: it lists tools, calls scan, find_cost_savings and what_changed.
pip install "infralens-mcp[aws,k8s] @ git+https://github.com/balakrishnagatla/infralens"
INFRALENS_PROVIDERS=aws INFRALENS_REGIONS=us-east-1 infralens scan # your AWS credentials or AWS_PROFILE
infralens -p kubernetes scan # your current kubeconfig contextUse credentials that can only read. For AWS, attach the shipped read-only IAM policy; for Kubernetes, the read-only ClusterRole.
| Extra | Adds |
|---|---|
aws |
boto3 for the AWS provider |
azure |
Azure SDKs (beta provider) |
k8s |
Kubernetes client |
ai |
LiteLLM for AI summaries in Watch Mode |
dev |
pytest, ruff, moto |
| Command | What it does |
|---|---|
infralens scan |
Scan and print the report (what's new and resolved since last time) |
infralens findings |
List tracked findings and their status |
infralens savings |
Cost savings captured so far and still available |
infralens serve |
Run the MCP server (stdio; --http for Streamable HTTP) |
infralens daily |
Watch Mode: scan, AI summary, publish |
Global options: --policy infralens.yaml, -p/--provider (repeatable).
Next: MCP Tools and Clients