Metadata-Version: 2.4
Name: terraform-ingest
Version: 0.1.4
Summary: A terraform multi-repo module AI RAG ingestion engine that accepts a YAML file of terraform git repository sources, downloads them locally using existing credentials, creates JSON summaries of their purpose, inputs, outputs, and providers on the main and git tag branches for ingestion via a RAG pipeline into a vector database.
Author-email: Zachary Loeber <zloeber@gmail.com>
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: click>=8.3.0
Requires-Dist: fastapi>=0.119.0
Requires-Dist: fastmcp>=0.5.0
Requires-Dist: gitpython>=3.1.45
Requires-Dist: httpx>=0.28.1
Requires-Dist: loguru>=0.7.3
Requires-Dist: packaging>=24.0
Requires-Dist: pydantic>=2.12.2
Requires-Dist: python-hcl2>=7.3.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: urllib3>=2.5.0
Requires-Dist: uvicorn>=0.37.0
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mdtoc; extra == 'docs'
Requires-Dist: mkdocs; extra == 'docs'
Requires-Dist: mkdocs-click; extra == 'docs'
Requires-Dist: mkdocs-llmstxt; extra == 'docs'
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocs-mermaid2-plugin; extra == 'docs'
Requires-Dist: mkdocstrings; extra == 'docs'
Provides-Extra: embeddings
Requires-Dist: chromadb>=1.2.1; extra == 'embeddings'
Requires-Dist: openai>=1.0.0; extra == 'embeddings'
Requires-Dist: sentence-transformers>=5.1.2; extra == 'embeddings'
Requires-Dist: voyageai>=0.2.0; extra == 'embeddings'
Provides-Extra: format
Requires-Dist: black; extra == 'format'
Requires-Dist: isort; extra == 'format'
Provides-Extra: lint
Requires-Dist: black; extra == 'lint'
Requires-Dist: isort; extra == 'lint'
Requires-Dist: mypy; extra == 'lint'
Requires-Dist: ruff; extra == 'lint'
Provides-Extra: standard
Provides-Extra: test
Requires-Dist: black; extra == 'test'
Requires-Dist: httpx; extra == 'test'
Requires-Dist: mypy; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Provides-Extra: typecheck
Requires-Dist: mypy; extra == 'typecheck'
Description-Content-Type: text/markdown

# terraform-ingest

A terraform multi-repo module AI RAG ingestion engine that accepts a YAML file of terraform git repository sources, downloads them locally using existing credentials, creates JSON summaries of their purpose, inputs, outputs, and providers for branches or tagged releases you specify for ingestion via a RAG pipeline into a vector database. Includes an easy to use cli, API, or MCP server.

## Features

- 📥 **Multi-Repository Ingestion**: Process multiple Terraform repositories from a single YAML configuration
- 🔍 **Comprehensive Analysis**: Extracts variables, outputs, providers, modules, and descriptions
- 🏷️ **Branch & Tag Support**: Analyzes both branches and git tags
- 🔌 **Dual Interface**: Use as a CLI tool (Click) or as a REST API service (FastAPI)
- 🤖 **MCP Integration**: FastMCP service for AI agent access to ingested modules
- 📊 **JSON Output**: Generates structured JSON summaries ready for RAG ingestion
- 🔐 **Credential Support**: Uses existing git credentials for private repositories
- 🧠 **Vector Database Embeddings**: Semantic search with ChromaDB, OpenAI, Claude, or sentence-transformers

Further documentation found [here](https://zloeber.github.io/terraform-ingest/)

Or, if you just want the goods on using this as an MCP server along with some examples check [this](./docs/mcp_use_examples.md) out.

## Installation

This application can be run locally as a CLI, API service, or MCP server using uv or docker.

```bash
# simple pip install
pip install terraform-ingest

## UV (preferred)
# Create a config
uv run terraform-ingest init config.yaml

# Update your config.yaml file to include your terraform module information and mcp config then preform the initial ingestion
uv run terraform-ingest ingest

# Run a quick cli search to test things out
uv run terraform-ingest search "vpc module for aws"
```

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
