An all-in-one local interface for navigating, operating, and understanding your Terraform infrastructure
Project description
inframate
A CLI tool for managing Terraform infrastructure. Browse resources, apply changes, detect drift, view costs, and fix errors with AI — all from your terminal.
Install
# uv (recommended)
uv tool install inframate
# Homebrew
brew install inframate
# pip / pipx
pip install inframate
Usage
cd my-terraform-project
inframate # interactive resource browser (TUI)
inframate --no-cloud # skip AWS cloud scan (faster)
inframate --service s3 # filter by service
inframate --json # output as JSON
inframate serve # start web UI at http://localhost:8000
Running inframate in a Terraform project directory will:
- Read the Terraform graph and plan
- Scan AWS resources for drift and unmanaged resources
- Open an interactive TUI for browsing, applying, and destroying resources
- If the plan fails and AI is configured, offer AI-assisted diagnosis and fixes
Resource statuses
| Status | Meaning |
|---|---|
| Managed | In Terraform state and code, no pending changes |
| Pending | In code but not yet applied (create/update/destroy/replace planned) |
| Drift | Applied but actual cloud state differs from Terraform state |
| Unmanaged | Exists in AWS but not in any Terraform configuration |
| Orphaned | In Terraform state but the resource no longer exists in cloud |
Each resource also shows three indicators: S (in state), C (in code), W (in cloud).
TUI keybindings
Navigation & search
| Key | Action |
|---|---|
Up/Down |
Navigate resources |
Left/Right |
Collapse/expand tree node |
/ |
Search resources by name, type, or service |
Escape |
Clear search |
e |
Expand all tree nodes |
c |
Collapse all tree nodes |
Filters
| Key | Action |
|---|---|
a |
Show all resources |
m |
Filter: managed |
p |
Filter: pending |
d |
Filter: drift |
u |
Filter: unmanaged |
o |
Filter: orphaned |
1 |
Filter action: create |
2 |
Filter action: update |
3 |
Filter action: destroy |
4 |
Filter action: replace |
0 |
Clear action filter |
Actions
| Key | Action |
|---|---|
Enter |
Show resource detail (attributes, changes, tags) |
Space |
Toggle resource selection |
r |
Apply (all planned changes, or selected only) |
x |
Destroy selected resources |
s |
AI plan summary (prioritized change overview) |
$ |
Load and display AWS costs |
F5 |
Refresh (re-read terraform + cloud data) |
q |
Quit |
When apply or destroy fails, inframate streams AI diagnosis, suggests file changes and commands (e.g. terraform import, terraform state rm), and offers to apply fixes — in a loop until the issue is resolved.
AI plan summary
Press s in the TUI (or click Summarize in the web UI) to get an AI-generated summary of all planned changes, ranked from most critical (destroys, replacements) to least (creates, minor updates). Requires AI to be configured.
Configuration
Project config lives in .inframate/config.yml inside your Terraform project. Global defaults in ~/.inframate/config.yml are merged underneath (project wins).
# .inframate/config.yml
ai:
provider: openai # openai | anthropic | ollama | groq | deepseek
api_token: sk-...
# model: gpt-4o # optional, defaults per provider
# Or use a custom endpoint:
# ai:
# endpoint: http://localhost:11434/v1
# api_token: ollama
# model: llama3
# Custom var-file and backend config (applied automatically)
terraform:
var_file: env/dev/terraform.tfvars # used in plan, apply, destroy
backend_config: env/dev/backend.hcl # used in init
The .inframate/ directory also stores plan cache and temporary plan files. You may want to add .inframate/ to your .gitignore.
Provider defaults:
| Provider | Endpoint | Default model |
|---|---|---|
openai |
api.openai.com/v1 |
gpt-4o |
anthropic |
api.anthropic.com/v1 |
claude-sonnet-4-20250514 |
ollama |
localhost:11434/v1 |
llama3 |
groq |
api.groq.com/openai/v1 |
llama-3.3-70b-versatile |
deepseek |
api.deepseek.com/v1 |
deepseek-chat |
Environment variables (OPENAI_API_KEY, OPENAI_API_BASE, OPENAI_MODEL) also work and take precedence over the config file.
Web UI
inframate serve
inframate serve --port 9000
inframate serve --no-browser
The web UI provides a browser-based interface with file editing, AI chat sidebar, and interactive resource management.
Development
Prerequisites
Setup
task install # install all dependencies
task api:dev # start API server (terminal 1)
task ui:dev # start UI dev server (terminal 2)
Build
task build # build UI + Python package
task run # run the built CLI
Project structure
services/
api/ Python 3.13 / FastAPI backend
ui/ Svelte 5 / TailwindCSS frontend
Project details
Release history Release notifications | RSS feed
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 inframate-0.2.3.tar.gz.
File metadata
- Download URL: inframate-0.2.3.tar.gz
- Upload date:
- Size: 963.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47353df79f1569707e3ef47f625cc245ff439cc0746d8fe5a7158a9db5c8c789
|
|
| MD5 |
28e81a5d2b62988bf149df4f1e9d111f
|
|
| BLAKE2b-256 |
22e9b9fc89df559595d297b469a60ef42a1d7994f49e1c69df0f7302d1e7e5be
|
Provenance
The following attestation bundles were made for inframate-0.2.3.tar.gz:
Publisher:
publish.yml on neuroship/inframate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inframate-0.2.3.tar.gz -
Subject digest:
47353df79f1569707e3ef47f625cc245ff439cc0746d8fe5a7158a9db5c8c789 - Sigstore transparency entry: 1342325072
- Sigstore integration time:
-
Permalink:
neuroship/inframate@e8d6302502abdf2c4113ab8f3dd5323be368b90b -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/neuroship
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8d6302502abdf2c4113ab8f3dd5323be368b90b -
Trigger Event:
push
-
Statement type:
File details
Details for the file inframate-0.2.3-py3-none-any.whl.
File metadata
- Download URL: inframate-0.2.3-py3-none-any.whl
- Upload date:
- Size: 974.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d7fe8d84be1cdba0e75ebe74ae08c241bf590dd4420f0607288dc1b41d0d0b4
|
|
| MD5 |
eaeb75e692b2354042b45ea752c03077
|
|
| BLAKE2b-256 |
a5483e68c0df5a422ac53952c6c8228f63cd2f9de13aa1cfbf383b87d547cea5
|
Provenance
The following attestation bundles were made for inframate-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on neuroship/inframate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inframate-0.2.3-py3-none-any.whl -
Subject digest:
1d7fe8d84be1cdba0e75ebe74ae08c241bf590dd4420f0607288dc1b41d0d0b4 - Sigstore transparency entry: 1342325087
- Sigstore integration time:
-
Permalink:
neuroship/inframate@e8d6302502abdf2c4113ab8f3dd5323be368b90b -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/neuroship
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8d6302502abdf2c4113ab8f3dd5323be368b90b -
Trigger Event:
push
-
Statement type: