Skip to main content

Generate Terraform READMEs and inline comments using Claude

Project description

terraformreviewer: AI-Powered Terraform Documentation and Comment Generator

terraformreviewer is a command-line tool that uses Anthropic’s Claude AI to automatically generate production-ready documentation (README.md) and add clear, helpful inline comments to your Terraform (.tf) files. This makes your infrastructure-as-code projects easier to understand, maintain, and onboard new team members.


Features

  • Automatic README Generation: Produces a comprehensive, human-readable README.md for your Terraform project.
  • Inline Comments: Adds concise, informative comments to all .tf files, explaining resources, blocks, and configuration.
  • Powered by Claude AI: Leverages Anthropic’s Claude for high-quality, context-aware documentation and code explanations.

Installation

Install the tool directly from PyPI:

pip install terraformreviewer

Or, if you want the latest development version:

git clone https://github.com/Zayan-ahmed953/Terraform_Reviewer_AI_Tool.git
cd Terraform_AI_Reviewer
pip install -e .

Setup

Before using the tool, you must set your Anthropic API key as an environment variable:

export ANTHROPIC_API_KEY=<your valueapi key>

You can obtain an API key from Anthropic.


Usage

Run the tool from your terminal, pointing it to your Terraform project directory:

terraformreviewer /path/to/your/terraform/project

This will:

  • Generate a README.md describing your infrastructure.
  • Add helpful inline comments to all .tf files in the project.

Example:

terraformreviewer /home/zayan/Desktop/My-Projects/AI-Generated-sample-terraform/

Notes

  • If you rerun the tool without changing your Terraform files, it will skip regeneration for efficiency.
  • Ensure your API key is valid and you have internet access.

Troubleshooting

  • No .tf files found: Make sure you provide the path to a directory containing Terraform files.
  • API key error: Double-check that ANTHROPIC_API_KEY is set in your environment.
  • Other errors: Please open an issue with the error message and steps to reproduce.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terraformreviewer-0.1.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terraformreviewer-0.1.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file terraformreviewer-0.1.3.tar.gz.

File metadata

  • Download URL: terraformreviewer-0.1.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for terraformreviewer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 27ca376e161e1f075a5c96c37dc9257199273442209976382f676a3605c77661
MD5 432b0a4ae56af155f2867ac45ec41d46
BLAKE2b-256 54ac8208c5ea359ff5b7c20a71842e76a413c73a77b2580f91d1b6484125e0aa

See more details on using hashes here.

File details

Details for the file terraformreviewer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for terraformreviewer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e27bb89f56cf742bbb31a859a66b3602e78bfed3ab8c4f8578149146cebcab4
MD5 3cdcdebb33482ff3b95d2735557fc340
BLAKE2b-256 6b01400517ab9794c754a4f1a65a29f156322018cc64b91a1ed828201656d0b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page