antonbabenko/pre-commit-terraform

pre-commit git hooks to take care of Terraform configurations πŸ‡ΊπŸ‡¦

View on GitHub β†—Jump to charts ↓Open shareable report β†’

Summary Information

Updated 24 minutes ago
Added to GitGenius on September 18th, 2026
Created on September 27th, 2016
Open Issues & Pull Requests: 27 (+0)
GitHub issues: Enabled
Number of forks: 585
Total Stargazers: 3,776 (+0)
Total Subscribers: 25 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.6 hours
Mean response time: 2.9 days
90th percentile: 2.1 days
Tracked items: 57

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 9
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 870 days
Stale 30+ days: 7
Stale 90+ days: 6

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (15)
  • feature (14)
  • area/local_installation (13)
  • 3rd party (8)
  • bug (7)
  • area/docker (6)
  • hook/terraform_trivy (5)
  • good first issue (4)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

pre-commit-terraform is a collection of Git hooks for Terraform that integrates with the pre-commit framework to automatically validate and format Terraform, OpenTofu, and Terragrunt configurations before code is committed.

The tool solves the problem of maintaining consistent code quality and style across Terraform projects by running checks and formatting automatically at commit time. It works by hooking into Git's pre-commit workflow, intercepting changes before they are committed to version control. The hooks can be executed locally, in CI environments, as standalone Git hooks, or via Docker image. They can target the entire repository or only files affected by specific changes such as local modifications, the last commit, or pull request changes.

Teams managing Terraform infrastructure should adopt this tool to enforce consistent formatting and validation standards without requiring manual review steps. It suits any project using Terraform, OpenTofu, or Terragrunt where multiple developers contribute code. The tool is flexible enough to run in diverse environments, making it suitable for both local development workflows and automated CI pipelines.

The project maintains active engagement with contributors through documented contribution guidelines and a curated list of beginner-friendly issues. Development activity shows responsiveness to community needs and ongoing refinement of the hook collection to support evolving Terraform tooling.