Skip to content
tiv
GitHub

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 it
  • tiv state: browse everything Terraform currently manages
  • tiv summary: a one-screen project overview in the terminal
  • Samples: try every command without real infrastructure

Build from source (Go 1.26 or later):

Terminal window
go build -o tiv .

Put the binary somewhere on your PATH.

Run from any initialized Terraform directory:

Terminal window
tiv plan

tiv 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.

Terminal window
tiv state # browse current infrastructure the same way
tiv summary # quick overview without leaving the terminal

Every command resolves input the same way, stopping at the first source that works:

  1. An explicit flag (--plan, --state, --plan-file)
  2. Piped or redirected stdin
  3. A default file in the current directory (plan.json for plan, state.json or terraform.tfstate for state)
  4. 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.

plan and state serve their report from a temporary web server on your machine:

  • Bound to 127.0.0.1 only. Nothing is reachable from other machines.
  • Default port 4747. If that port is busy, a random free port is chosen and printed. --port pins a specific one.
  • Your browser opens automatically. Pass --open=false to 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.

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:

Terminal window
tiv summary --json -q | jq .