CloudGrains logo
Open Sourcev0.2.0MIT LicenseFree Forever

infra-guideFree Terraform & OpenTofu Interactive Infrastructure Guide

A production-grade CLI and interactive command center for Terraform and OpenTofu. Doctor diagnostics, built-in policy checks, a web UI, drift detection, cost insights, 5 themes, and 20+ commands — works equally well for learning and day-to-day operations.

Install in 10 seconds

$pip install infra-guidePython 3.8+

Requires Terraform or OpenTofu in PATH. No API keys, no telemetry, no cloud credentials.

Quick start

$infra-guideopen interactive TUI
$infra-guide doctorworkspace health check
$infra-guide policysecurity policy scan
$infra-guide webbrowser command center

Built by CloudGrains · Kolhapur, India

infra-guide — aurora theme
v0.2.0
$ infra-guide doctor
⚕ Workspace Health
Terraform v1.6.0detected
Backend configuredS3
Providers locked.terraform.lock.hcl
Variables set10 / 10
Drift detected2 resources changed
Policy Check
✔ no-public-s3pass
✔ no-public-ingresspass
⚠ require-tagswarn
Run infra-guide web to open browser UI ›

What is infra guide?

infra guide (written as infra-guide) is a free, open-source CLI and interactive command center for Terraform and OpenTofu, built by CloudGrains. It blends a guided TUI for learners with direct subcommands for production workflows — both backed by the same engine.

The tool introduces three capabilities you don't get from raw Terraform: a Doctor mode that audits workspace health and flags issues before you run anything; a built-in policy engine that checks your plan against security rules like no-public-S3 and open security groups; and a web command center that gives you a browser UI powered by the same backend as the terminal.

On top of that, infra guide adds cost insight (AWS cost hints from plan JSON before apply), drift detection, state file exploration, workspace management, CI/CD pipeline mode, shell completion for bash/zsh/fish, command history with favorites, and five visual themes — all offline, with no telemetry or credential handling.

infra guide is available on PyPI. Install with pip install infra-guide and run infra-guide doctor to get started.

Who it's for

Terraform & OpenTofu users, beginner to advanced

How to install

pip install infra-guide (Python 3.8+)

License

MIT — free forever, open source

20+
CLI commands
6
Built-in security policies
5
Visual themes
Free
MIT license, no telemetry
Why infra guide

Why engineers choose infra guide for Terraform

infra guide goes beyond a menu wrapper — it adds diagnostics, security, visibility, and automation that raw Terraform doesn't provide out of the box.

Doctor Mode

Full workspace diagnostics — validates config, checks backend, counts variables, flags drift. Run before every apply to catch issues early.

Built-in Policy Engine

Six security policies out of the box: no public S3, open ingress, missing tags, missing encryption, S3 versioning, and default VPC usage.

Web Command Center

Run infra-guide web to open a browser UI at localhost:8765 powered by the same backend. Everything the TUI does, in a graphical interface.

Cost Insight

Before you apply, infra guide analyses your saved plan JSON and surfaces AWS cost-impact hints — so you know what a change will cost before it runs.

5 Visual Themes

aurora, sunset, forest, mono, and neon — persisted across sessions. Switch with infra-guide theme --set neon. Makes the terminal feel like yours.

Shell Completion & CI/CD

One-line shell completion setup for bash, zsh, and fish. Plus a dedicated cicd mode for pipeline-friendly init/validate/plan with exit codes.

All commands

20+ infra guide commands

Every command runs locally. No internet, no credentials, no telemetry.

CommandDescriptionRisk
infra-guideOpen interactive TUI dashboardLow
infra-guide doctorWorkspace health diagnostics + recommendationsLow
infra-guide doctor --with-driftHealth check + drift detectionLow
infra-guide statusFast workspace summary panelLow
infra-guide initInitialize providers, modules, backendLow
infra-guide plan --out tfplanPreview changes and save planLow
infra-guide apply --plan-file tfplan --yesApply with cost insightMedium
infra-guide destroy --yesDelete managed infrastructureHigh
infra-guide policyRun built-in security policy checksLow
infra-guide driftDetect infrastructure driftLow
infra-guide state --treeExplore state file (list / tree / detail)Low
infra-guide webLaunch local browser command centerLow
infra-guide workspace --listManage workspacesLow
infra-guide theme --set neonChange active theme (5 themes)Low
infra-guide cicdPipeline-friendly init/validate/plan flowMedium
infra-guide fmtFormat HCL filesLow
infra-guide outputShow infrastructure output valuesLow
infra-guide validatePre-flight validation checksLow
infra-guide historyRecent commands and favoritesLow
infra-guide completion bashShell completion (bash / zsh / fish)Low
FAQ

Frequently asked questions about infra guide

What is infra guide?

infra guide (written as infra-guide) is a free, open-source interactive terminal UI and direct CLI tool built by CloudGrains for Terraform and OpenTofu users. It provides a menu-driven interface, doctor diagnostics, built-in policy checks, a web command center, and 20+ direct subcommands — all without cloud credentials or telemetry. Install with pip install infra-guide.

How do I install infra guide?

Install infra guide with pip (pip install infra-guide) or pipx (pipx install infra-guide). Requires Python 3.8+ and Terraform or OpenTofu in your system PATH. Run infra-guide to open the interactive TUI, or infra-guide doctor for a quick workspace health check.

What does infra guide doctor do?

infra-guide doctor runs a full workspace health check — it validates your configuration, checks for common issues, and gives actionable recommendations. Add --with-drift to also detect infrastructure drift (differences between your Terraform state and actual cloud resources) in the same command.

Does infra guide have built-in security policy checks?

Yes. Run infra-guide policy to check your Terraform plan against six built-in security policies: no public S3 buckets, no open security group ingress, required tags, encryption enforcement, S3 versioning, and no default VPC usage. You can also pass a saved plan JSON with --plan-file.

What is infra guide web?

infra-guide web launches a local browser command center at http://localhost:8765 powered by the same backend as the TUI. It gives you a graphical interface for running Terraform commands without leaving your browser. Use --port to change the port or --no-browser to start the server only.

Is infra guide free to use?

Yes. infra guide is completely free and open source under the MIT License. There are no paid tiers, no telemetry, no API keys, and no cloud credentials required. The source code is on GitHub at github.com/cloudgrains/infra-guide.

Does infra guide work with OpenTofu?

Yes. infra guide automatically detects whether Terraform or OpenTofu is installed and uses the correct binary. All commands — doctor, plan, apply, policy, drift, state, workspace — work identically with both tools.

What themes does infra guide support?

infra guide ships with five themes: aurora (default), sunset, forest, mono, and neon. Change theme with infra-guide theme --set neon. Your selected theme persists across sessions.

Where can I download infra guide?

infra guide is on PyPI at pypi.org/project/infra-guide. Install with pip install infra-guide or pipx install infra-guide. Source code is at github.com/cloudgrains/infra-guide under the MIT License.

Start using infra guide in 10 seconds

Free, offline, open source. Doctor, policy, web UI — all included.

pip install infra-guide