An interactive TUI for Terraform and OpenTofu beginners with enterprise-grade features
Project description
infra-guide
infra-guide is a product-style CLI and interactive command center for Terraform and OpenTofu. It blends guide-first workflows, direct subcommands, workspace diagnostics, and automation-friendly commands so the tool works for both learning and day-to-day operations.
Features
- Real CLI surface with working
--help, subcommands, and passthrough args - Interactive dashboard with readiness, backend, lock file, workspace, and state signals
doctormode for project health checks and actionable recommendations- Guide mode for
init,plan,apply, anddestroy - Direct support for
init,plan,apply,destroy,fmt,state,workspace, andcicd - Drift detection, validation, state exploration, and workspace management
- Local-only execution with no telemetry and no cloud credentials required
Demo
infra-guide Command Center v0.3.0
Tool: tofu (OpenTofu v1.11.5)
Workspace: default
Directory: ./envs/dev
Environment Project Signals Next Step
Workspace: dev Config files: 8 Ready to operate
Readiness: READY Backend: YES Recommended flow:
Lock file: YES doctor -> plan -> apply
Command Palette
1 doctor Workspace health check with guidance LOW
2 init Initialize providers and backend LOW
3 plan Preview infrastructure changes LOW
4 apply Apply changes to infrastructure MEDIUM
5 destroy Remove managed infrastructure HIGH
Installation
pipx
pipx install infra-guide
infra-guide --help
From source
git clone https://github.com/iamtejas23/infra-guide.git
cd infra-guide
python3 -m venv venv
source venv/bin/activate
pip install .
infra-guide
Usage
Interactive mode
infra-guide
Direct CLI mode
infra-guide status
infra-guide doctor --with-drift
infra-guide guide plan
infra-guide init --upgrade
infra-guide plan --out tfplan
infra-guide apply --plan-file tfplan --yes
infra-guide workspace --select staging
infra-guide fmt --check
Passing through raw flags
infra-guide plan -- --target=module.network
infra-guide init -- --backend-config=env/dev.backend.hcl
infra-guide destroy -- --target=aws_instance.temporary
Suggested workflow
- Run
infra-guide doctorto understand workspace readiness. - Run
infra-guide initif the directory has not been initialized. - Run
infra-guide plan --out tfplanto preview and save changes. - Run
infra-guide apply --plan-file tfplan --yeswhen ready to execute.
Commands
| Command | Description | Risk |
|---|---|---|
status |
Show a fast workspace summary | Low |
doctor |
Run health diagnostics and recommendations | Low |
guide <command> |
Show best practices and examples for a command | Low |
init |
Initialize providers, modules, and backend | Low |
plan |
Preview infrastructure changes | Low |
apply |
Create or update infrastructure | Medium |
destroy |
Delete managed infrastructure | High |
validate |
Run pre-flight checks | Low |
drift |
Detect infrastructure drift | Low |
state |
Show state overview, list, tree, or resource detail | Low |
workspace |
List, create, select, or delete workspaces | Medium |
fmt |
Format Terraform/OpenTofu files | Low |
cicd |
Run a pipeline-friendly init/validate/plan flow | Medium |
Feature notes
Doctor and status
infra-guide status
infra-guide doctor
infra-guide doctor --with-drift
status is lightweight. doctor adds validation and exits non-zero when critical checks fail.
State explorer
infra-guide state
infra-guide state --list
infra-guide state --tree
infra-guide state --detail aws_instance.web
Workspace management
infra-guide workspace --list
infra-guide workspace --create dev
infra-guide workspace --select prod
infra-guide workspace --delete staging
CI/CD mode
infra-guide cicd
infra-guide cicd --skip-init
infra-guide cicd --skip-validation
Security and privacy
- No telemetry
- No network calls beyond your Terraform/OpenTofu usage
- No credential handling inside infra-guide
- Local execution only
- Open source and auditable
Development
git clone https://github.com/iamtejas23/infra-guide.git
cd infra-guide
python3 -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
pytest
black infra_guide/
mypy infra_guide/
Project structure
infra-guide/
├── infra_guide/
│ ├── cli.py
│ ├── project_inspector.py
│ ├── runner.py
│ ├── ui.py
│ ├── validators.py
│ ├── drift_detector.py
│ ├── state_explorer.py
│ ├── workspace_manager.py
│ ├── cicd.py
│ └── guides/
├── pyproject.toml
└── README.md
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
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 infra_guide-0.3.0.tar.gz.
File metadata
- Download URL: infra_guide-0.3.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
907c2cae2b1ffd9f1adbde680f40501cabfde1acfd792d4525159e8d7dd50531
|
|
| MD5 |
23360aec53c0241c40b9b70f4ab3f5b9
|
|
| BLAKE2b-256 |
7c8fcabfdba48e9356e8a2fab438b565fd2dd6ad90303f8ebf9d303efc8fb869
|
File details
Details for the file infra_guide-0.3.0-py3-none-any.whl.
File metadata
- Download URL: infra_guide-0.3.0-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d0b47cff9c7aa699cdea377840a6820bd5c47c61343ccd8bcbc5a1f253b7ce1
|
|
| MD5 |
da3984a279cd0df5b2c89710fd9515c3
|
|
| BLAKE2b-256 |
77c46b0799245ee95f7c7e972366ee6ffe11d3e9743392e3a907cd0638144c77
|