Skip to main content

TfBrief

PyPI version Python

TfBrief turns terraform show -json plan output into readable CI logs: a summary panel, per-resource actions, and attribute-level diffs. Use it in Terraform, GitHub Actions, and other DevOps / IaC pipelines when raw JSON is too noisy for reviewers.

  • Terraform plan review without scrolling megabytes of JSON
  • CI/CD friendly — stdlib only, pip install tfbrief, one pipe on stdout
  • Optional --has-changes boolean for conditional terraform apply

Install from PyPI: pypi.org/project/tfbrief

Example output (fixture minimal-plan.json)
TfBrief terminal output: summary, resource actions, and attribute diffs

Why TfBrief?

Hashicorp’s JSON plan is complete but awkward in pull request checks and pipeline logs. TfBrief is a small Python CLI focused on infrastructure-as-code workflows: operators see what will create, update, or delete before apply, without a JSON viewer or custom jq scripts.

Typical fit: Terraform modules in GitHub Actions, GitLab CI, or any job that already runs terraform plan -out=tfplan.

Install

pip install tfbrief

Requires Python 3.10+. The tfbrief command is on your PATH after install.

Usage

After terraform plan -out=tfplan, pipe the JSON plan into TfBrief:

terraform show -json tfplan | tfbrief

That prints the summary panel, resource table, and attribute diffs (see example above).

Optional: --has-changes (apply gate)

Same JSON input, different output — no formatted report. Stdout is only true or false so scripts can skip apply when the plan is empty:

terraform show -json tfplan | tfbrief --has-changes
# true

Plans with only no-op / read actions (and no output changes) print false. Resource or output changes print true. Invalid JSON prints an error to stderr and exits 1.

Typical pattern — log for humans, gate for apply:

terraform plan -out=tfplan
terraform show -json tfplan | tfbrief
if [ "$(terraform show -json tfplan | tfbrief --has-changes)" = "true" ]; then
  terraform apply tfplan
fi

You do not need --has-changes if you only want readable CI logs or apply manually.

GitHub Actions

- uses: actions/setup-python@v5
  with:
    python-version: "3.12"
- run: pip install -q tfbrief && terraform show -json tfplan | tfbrief

Add --has-changes in a separate step only when a later step should run terraform apply conditionally.

Security

Redaction is best-effort. Treat CI logs as sensitive.

License

MIT — see LICENSE.

Metadata

Release files for tfbrief 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tfbrief 0.1.3
File Size Uploaded Provenance Actions
tfbrief-0.1.3.tar.gz 16.7 kB With provenance Details for tfbrief-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tfbrief 0.1.3
File Interpreter ABI Platform Actions
tfbrief-0.1.3-py3-none-any.whl Python 3 none any Details for tfbrief-0.1.3-py3-none-any.whl

Total release size: 25.6 kB

Release files / tfbrief-0.1.3.tar.gz

Download URL tfbrief-0.1.3.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b57dd88fca800050672e408f88a13a4bfbdb263c501935cad57179ae7f8015
BLAKE2b-256 checksum
How to use checksums
9a3d4620dc3a213f2d28f0d663b7f901755eabed5ea2137756a371577f221957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / tfbrief-0.1.3-py3-none-any.whl

Download URL tfbrief-0.1.3-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee5d2ee6a96b80d0112e0cc4aacd5d901045a8b2253cfe6f078b8baffde7bb34
BLAKE2b-256 checksum
How to use checksums
90fdf9ab02b17ae2efc519e15fa3e406d2a5191cf138dc7e170060529d8ad96f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for tfbrief 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tfbrief-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page