TfBrief
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-changesboolean for conditionalterraform apply
Install from PyPI: pypi.org/project/tfbrief
Example output (fixture minimal-plan.json)
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.
Contributors (editable install from a clone):
pip install -e .
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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tfbrief-0.1.4.tar.gz | 17.0 kB | With provenance | Details for tfbrief-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tfbrief-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for tfbrief-0.1.4-py3-none-any.whl |
Total release size: 26.0 kB
Release files / tfbrief-0.1.4.tar.gz
| Download URL | tfbrief-0.1.4.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02b2245e3384a7103ddf988a992d5fb94c651ceb563d3c1a609a163c596c1ea2
|
|
BLAKE2b-256 checksum How to use checksums |
c87635dd794a59f360c5ec9257914a0c707526882cae97ec29e2bb14e989a0d3
|
| 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 logRelease files / tfbrief-0.1.4-py3-none-any.whl
| Download URL | tfbrief-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
685218ffd1089a4f13581866ee934c85b49c1b275bafa674e0c827932535789d
|
|
BLAKE2b-256 checksum How to use checksums |
dbc89fe5cb7f821121cad68f3241c385b90ae973be5e92a24c3184a4bf841043
|
| 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 logSecurity for tfbrief 0.1.4
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.
Attestation for tfbrief-0.1.4.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 logA 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.