AI agent that reads Terraform, Helm, Kubernetes, and CI/CD files and auto-generates DevOps documentation.
Project description
๐๏ธ IaC-to-Docs
AI agent that reads your Terraform, Helm, Kubernetes, and CI/CD files โ and writes your DevOps documentation automatically.
The Problem
Every DevOps team has the same documentation debt:
- Terraform modules nobody can explain
- Helm charts with mystery values
- Kubernetes manifests that "just work" until they don't
- Zero onboarding docs for new engineers
Writing docs manually is slow and they go stale immediately. IaC-to-Docs solves this with one command.
Install & Run in 60 Seconds
# 1. Install
pip install iac-to-docs
# 2. Set your API key (get one free at https://aistudio.google.com)
export GOOGLE_API_KEY=your_key_here
# 3. Run against any repo
iac-to-docs --repo ./your-infra-repo
That's it. A complete DEVOPS_DOCS.md is written to your repo root.
What Gets Generated
Each run produces a structured DEVOPS_DOCS.md with:
| Section | What it contains |
|---|---|
| System Overview | What the system does, tech stack, environments |
| Architecture Diagram | Mermaid diagram of services and their relationships |
| Services & Components | Per-service: image, ports, env vars, health checks, resources |
| Infrastructure (IaC) | Terraform resources, state backend, variables, outputs |
| Deployment Instructions | Step-by-step deploy guide with real commands |
| CI/CD Workflow | Pipeline stages, triggers, promotion flow, secrets needed |
| Environment Setup | Required env vars, secrets, namespaces, RBAC |
| Operations Runbook | Scale, restart, rollback, log access, shell exec |
| Troubleshooting Guide | Common issues table + debug commands |
Anything inferred (not explicitly in files) is labelled [Assumed] so you always know what's fact vs inference.
Demo Output
๐ See a real generated DEVOPS_DOCS.md โ
Generated from the sample_repo/ in this repository, which contains:
- Terraform (EKS cluster + RDS + VPC)
- Kubernetes manifests (3 services)
- Helm chart
- GitHub Actions CI/CD pipeline
- Dockerfile
Usage
Basic
iac-to-docs --repo ./my-infra
Specify output location
iac-to-docs --repo ./my-infra --output ./docs/DEVOPS_DOCS.md
Point at a GitHub repo directly
iac-to-docs --repo https://github.com/org/infra-repo
Generate only specific sections
iac-to-docs --repo ./my-infra --sections deployment runbook troubleshooting
Use a faster/cheaper model
iac-to-docs --repo ./my-infra --model models/gemini-2.0-flash
Full options
iac-to-docs --help
options:
--repo, -r Path to local repo OR GitHub URL [required]
--output, -o Output path (default: <repo>/DEVOPS_DOCS.md)
--api-key, -k Gemini API key (or set GOOGLE_API_KEY env var)
--model, -m Gemini model (default: models/gemini-2.5-pro)
--sections, -s Generate specific sections only
--no-mermaid Skip architecture diagram
--verbose, -v Detailed progress output
Supported File Types
| Type | Files |
|---|---|
| Terraform | .tf, .tfvars |
| Kubernetes | .yaml, .yml in k8s/, manifests/, deploy/ |
| Helm | Chart.yaml, values.yaml, templates/*.yaml |
| Docker | Dockerfile, docker-compose.yml |
| CI/CD | GitHub Actions, Jenkinsfile, .gitlab-ci.yml, CircleCI |
| Scripts | .sh, .bash, .py |
| Config | .env.example, config.yaml, config.json |
Architecture
iac-to-docs --repo ./infra
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Smart File Loader โ
โ โข Walks repo, skips noise โ
โ โข Classifies by type โ
โ โข Truncates oversized files โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโผโโโโโโโโโ
โ Context Builderโ Groups files by type
โโโโโโโโโฌโโโโโโโโโ (terraform, k8s, cicd, full)
โ
โโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Multi-Section Agent โ
โ Each section gets a focused promptโ
โ + the most relevant context only โ
โ โ Gemini 2.5 Pro โ
โโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโผโโโโโโโโโ
โ Assembler โ Table of contents
โโโโโโโโโฌโโโโโโโโโ Metadata header
โ File index appendix
โผ
DEVOPS_DOCS.md
Development Setup
git clone https://github.com/lakra-sashank/IaC-to-Docs-An-AI-Agent-for-DevOps-Documentation
cd IaC-to-Docs-An-AI-Agent-for-DevOps-Documentation
pip install -e ".[dev]"
export GOOGLE_API_KEY=your_key
iac-to-docs --repo ./sample_repo --verbose
Built by
Sashank Lakra โ Senior Platform & DevOps Engineer
LinkedIn ยท GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iac_to_docs-0.1.0.tar.gz.
File metadata
- Download URL: iac_to_docs-0.1.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7ee59ee39e7dd6eadf4b579f1ea3b239b7bf0efb621835fb0f6d3fc97df177
|
|
| MD5 |
592a7188eba47f9c22fa32026afeda37
|
|
| BLAKE2b-256 |
d813eccd9ce99f928bd8abe6404dda3987bd645651cc7b69d02c488a1dfaca0c
|
File details
Details for the file iac_to_docs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iac_to_docs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49f272047dc551c3e884bf03277317c1beb24b0535ecd652b1a0dba310ba7db2
|
|
| MD5 |
b871b4600d25e810a4d733e2c6989d89
|
|
| BLAKE2b-256 |
6c2419ab752e15a507232eedeaac52e5c1723a6a46d9178fe7d37cb51842ea36
|