tiv documentation
tiv (Terraform Infrastructure Viewer) turns Terraform plans and state into interactive reports in your browser, and gives you a quick project summary in the terminal.
tiv plan: see what a plan will add, change, and destroy before you apply ittiv state: browse everything Terraform currently managestiv summary: a one-screen project overview in the terminal- Samples: try every command without real infrastructure
Install
Section titled “Install”Build from source (Go 1.26 or later):
go build -o tiv .Put the binary somewhere on your PATH.
Quick start
Section titled “Quick start”Run from any initialized Terraform directory:
tiv plantiv runs terraform plan for you, converts the result, and opens a report in your browser showing every planned change with attribute diffs and a dependency graph.
tiv state # browse current infrastructure the same waytiv summary # quick overview without leaving the terminalHow tiv finds its input
Section titled “How tiv finds its input”Every command resolves input the same way, stopping at the first source that works:
- An explicit flag (
--plan,--state,--plan-file) - Piped or redirected stdin
- A default file in the current directory (
plan.jsonfor plan,state.jsonorterraform.tfstatefor state) - Running terraform for you in the current directory
A leftover default file that turns out to be empty or unreadable is skipped with a warning rather than stopping the chain. A file you name explicitly is never second-guessed: if it is unusable you get an error.
When tiv reaches step 4 it shows a spinner while terraform works. Ctrl+C cancels cleanly, stopping the terraform process underneath.
The report server
Section titled “The report server”plan and state serve their report from a temporary web server on your machine:
- Bound to
127.0.0.1only. Nothing is reachable from other machines. - Default port 4747. If that port is busy, a random free port is chosen and printed.
--portpins a specific one. - Your browser opens automatically. Pass
--open=falseto skip that and open the printed URL yourself. - The server runs until you press Ctrl+C.
The graph needs internet access on first view: the rendering libraries load from a CDN.
Global flags
Section titled “Global flags”Available on every command:
| Flag | What it does |
|---|---|
-v, --verbose |
Show debug detail: which input source was used, terraform invocations |
-q, --quiet |
Only show errors |
Logs go to stderr. Data (summary text, --json output, the report URL) goes to stdout, so piping stays clean:
tiv summary --json -q | jq .