# antonbabenko/pre-commit-terraform

pre-commit git hooks to take care of Terraform configurations 🇺🇦

Repository: https://github.com/antonbabenko/pre-commit-terraform
Canonical: https://ross.abutalabs.com/products/pre-commit-terraform
Language: Shell
License: MIT
License Family: permissive
Topics: git-hooks, terraform, code-style, hooks, pre-commit, automation, terraform-docs, terragrunt, hacktoberfest
Last push: 2026-08-26T17:55:03+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 3627, "days_push": 7, "days_rel": 12, "gap_med": 12, "n_releases_24m": 34}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3760, forks 584 (observed 2026-08-28T04:08:17.875858+00:00)

## What it is
A collection of git hooks for Terraform, OpenTofu, and Terragrunt driven by the pre-commit framework. It automatically formats code and runs checks before commits, locally or in CI, standalone or via Docker.

## Use cases
- run terraform fmt and validate automatically before each git commit
- keep terraform-docs documentation up to date in pull requests
- lint terragrunt and opentofu configs in CI pipelines
- enforce consistent terraform code style across a team
- check only changed terraform files in a PR

## When to choose
- you use Terraform, OpenTofu, or Terragrunt and want automated pre-commit checks
- you want to enforce formatting and docs generation in local dev and CI
- you already use the pre-commit framework

## When to avoid
- you don't use Terraform or related IaC tools
- you need a full Terraform linter rather than git hook orchestration
- your project doesn't use git

## Facets
- artifact type: plugin
- maturity: active
- function: developer-tools, linter, formatter, ci-cd, code-review
- domain: developer-tools, infrastructure-as-code
- platform: cli, cross-platform, windows
- tags: terraform, opentofu, terragrunt, pre-commit, git-hooks, iac, shell, devops, automation, docker, linux, macos

## Member repositories
- antonbabenko/pre-commit-terraform (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:17.875858+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:28:54.049614+00:00, confidence not recorded.
  - readme: https://github.com/antonbabenko/pre-commit-terraform (fetched 2026-08-28T04:08:17.875858+00:00, sha 4a37ce4d5320)
- Data as of 2026-08-30T08:39:29.467469+00:00.
