Production-grade interactive tool with enterprise features - Complete installation and usage guide
infra-guide is a production-grade, interactive terminal UI (TUI) tool for Terraform and OpenTofu that combines beginner-friendly guidance with enterprise-level features. Learn infrastructure-as-code while using professional tools like drift detection, policy validation, and CI/CD integration.
Automatically detects whether you have Terraform or OpenTofu installed
Detailed explanations for each command before execution
Rich, colorful interface with a modern dark theme
No cloud credentials, no network calls, no telemetry
Confirmation prompts and warnings before destructive operations
Best practices and common flags explained clearly
Automatically detect when infrastructure has drifted from state
Comprehensive checks before executing commands
Interactive browser for exploring state files with tree view
Easy management of multiple environments
Non-interactive pipeline mode for automation
View resources by type with detailed statistics
Before installing infra-guide, ensure you have:
python3 --versionNote: No cloud credentials, API keys, or additional setup needed!
pipx installs Python applications in isolated environments, preventing dependency conflicts.
Install pipx if you don't have it:
sudo apt update
sudo apt install pipxInstall infra-guide:
pipx install git+https://github.com/cloudgrains-git/infra-guide.gitRun the tool:
infra-guideFor development or to contribute to the project.
# Clone the repository
git clone https://github.com/cloudgrains-git/infra-guide.git
cd infra-guide
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install the package
pip install .pipx install infra-guideComing Soon: This option will be available once the package is published to PyPI.
Simply run the command from any directory containing Terraform/OpenTofu configuration files:
infra-guide| Command | Description | Risk Level | New in v0.2.0 |
|---|---|---|---|
init | Initialize working directory | π’ Low | - |
plan | Preview infrastructure changes | π’ Low | - |
apply | Create/update infrastructure | π‘ Medium | - |
destroy | Delete all infrastructure | π΄ High | - |
validate | Run pre-flight checks | π’ Low | β |
drift | Detect infrastructure drift | π’ Low | β |
state | Explore state file | π’ Low | β |
workspace | Manage workspaces | π‘ Medium | β |
cicd | Run CI/CD pipeline | π‘ Medium | β |
Automatically detects when your actual infrastructure has diverged from the state file. This happens when changes are made outside of Terraform/OpenTofu (manual changes, other tools, etc.).
# In infra-guide, select option 6
# Shows which resources have drifted and what changedRuns comprehensive checks before you execute commands:
Interactive browser for your state file:
Easily manage multiple environments:
Non-interactive mode perfect for automation:
We don't collect any data about your usage
Works completely offline
Only wraps Terraform/OpenTofu CLI
Fully transparent, auditable code
All commands run locally on your machine
# Clone the repository
git clone https://github.com/cloudgrains-git/infra-guide.git
cd infra-guide
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"pytestblack infra_guide/mypy infra_guide/infra-guide/
βββ infra_guide/
β βββ __init__.py # Package initialization
β βββ cli.py # Main CLI entry point
β βββ detector.py # Tool detection logic
β βββ ui.py # UI components using rich
β βββ runner.py # Command execution
β βββ guides/
β βββ __init__.py
β βββ init.py # Init command guide
β βββ plan.py # Plan command guide
β βββ apply.py # Apply command guide
β βββ destroy.py # Destroy command guide
βββ pyproject.toml # Project configuration
βββ README.md # Documentation
βββ LICENSE # MIT LicenseContributions are welcome! Here's how you can help:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by CloudGrains for the Infrastructure as Code community