tiv state
Browse everything Terraform currently manages: every resource with its live attribute values, grouped by module, with outputs and a dependency graph.
Quick start
Section titled “Quick start”tiv stateFrom a Terraform directory, tiv finds your state automatically: a local state file if one exists, otherwise it reads through your configured backend with terraform show. Remote backends (S3, Terraform Cloud, and the rest) work without any extra setup because terraform itself does the reading.
If no state is reachable at all, tiv falls back to scanning your .tf files so you still get a picture of the configuration.
Console mode
Section titled “Console mode”Pass --console to explore the same report without leaving the terminal:
tiv state --consoleResources are laid out in dependency columns: anything with no dependencies sits on the left, and each column depends on the ones before it. Cards are Terraform purple for resources and blue for data sources; the tiv teal is reserved for the cursor and chrome so the accent never competes with resource meaning.
↑↓move within a column;←→follow dependency edges across columns, with connector arrows drawn beside the selectionspaceexpands the selected resource’s attribute table in place (sensitive values stay masked)tcycles three views of the state: the dependency graph, a flat list, and the modules the resources sit in, with modules linked wherever their resources depend on each other; the selection carries over/searches by resource address andEnterjumps to the first match, thennandNwalk forward and back through the rest; the footer shows which match you are on and how many there aremcycles all → resources → data sources;pcycles providers; the two filters combine?shows the full key reference;qquits
--console and --browser are mutually exclusive. The browser remains the default for now.
Reading the report
Section titled “Reading the report”- Summary chips across the top: resource and data source counts, module count, outputs.
- The graph shows every resource inside its module container, with dependency arrows drawn from state. Cross-module dependencies show as arrows between containers, and a module called from another module draws inside its parent’s container.
- The module sidebar filters the resource list to one module. Outputs are listed beneath it, with sensitive outputs masked.
- Resource cards expand to the full attribute table. Sensitive values are masked. Dependency chips (“depends on” / “used by”) jump between related resources.
- Search filters cards by resource address.
Supplying state yourself
Section titled “Supplying state yourself”Both state formats are accepted:
terraform show -json > state.jsontiv state --state state.json # the JSON representation
tiv state --state terraform.tfstate # a raw state file, converted automaticallyterraform show -json | tiv state # pipedRaw .tfstate files are transformed into the same canonical form, keeping module addresses, dependencies, and outputs.
| Flag | Default | What it does |
|---|---|---|
--state |
none | Path to state JSON or a raw .tfstate file |
--console |
false | Render the report as an interactive terminal UI |
--browser |
false | Serve the report in the browser (the current default; excludes --console) |
--port |
4747 | Report server port (random fallback when taken) |
--open |
true | Open the report in your browser |
--chdir |
none | Directory to run terraform in (like terraform -chdir) |