Skip to main content

Apply OpenAI gpt changes to an entire Terraform project directory

Project description

Terrafai: Supercharge Your Terraform Projects with GPT-4

Terrafai is an open-source CLI tool that utilizes OpenAI's GPT-4 to intelligently manage and manipulate your Terraform project directories. Save time, reduce errors, and make sweeping changes to your Terraform like never before!

Features

🤖 GPT-4 Integration: Utilize the power of OpenAI's GPT-4 to manipulate your Terraform configurations.
⚙️ Automated Checks: Option to run 'terraform init' and 'terraform validate' before processing.
🔄 Diff Output: Visualize changes before they're made.
🛠️ Multiple Operations: Extensible framework to apply a variety of operations like "optimize", "cleanup", "document" etc.
🚀 Dry Run Mode: Preview the changes without making actual API calls.

All changes will be placed into a timestamped subdirectory of your current project.

Prerequisites

  • OpenAI API Key: To access GPT-4 services
  • Terraform installed: The CLI tool interacts with Terraform project directories

Installation

pip install terrafai

Finally, add your OpenAI API Key to your environment variables:

export OPENAI_API_KEY='your-api-key-here'

Usage

Basic usage:

terrafai -op "Append '-demo' to all resources."

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a pull request

Acknowledgements

I'd like to thank Harrison Chase for writing Langchain and Matt Deutsch for introducing me to it. Thanks guys!!!

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

terrafai-0.1.5.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

terrafai-0.1.5-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file terrafai-0.1.5.tar.gz.

File metadata

  • Download URL: terrafai-0.1.5.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for terrafai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0f5886b535ee6eb17adbf673d8fbeb5c03bc003a9d01f529cfcfd07a65a837e9
MD5 dd56fd680b62a1f7cb604b430f790e88
BLAKE2b-256 0556eefee82ddf0a43e8750a44066dbb33aa466a8fbac9ea99f769a59d6cbd49

See more details on using hashes here.

File details

Details for the file terrafai-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: terrafai-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for terrafai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 886b9af41fdf953b744710de0ac6327ed9203a1fddb43d9d50257daedace13f3
MD5 e9dcbfb352237145f7129425889a19be
BLAKE2b-256 bd51097b6638559488d20adb463db59a1e25327152e695747389e98f436933f2

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