{"repo":"AlexNabokikh/tfsort","free":true,"listed":false,"github":"https://github.com/AlexNabokikh/tfsort","clone":"git clone https://github.com/AlexNabokikh/tfsort.git","description":"A CLI utility to sort Terraform variables and outputs","language":"Go","stars":238,"topics":["cli","go","golang","terraform"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"tfsort tfsort is a command-line utility designed for meticulous engineers who prefer to keep their Terraform variable , output , locals and terraform blocks sorted alphabetically. It also corrects spacing issues between these blocks and removes leading or trailing newlines in the processed files. tfsort can read from files or stdin, write to files or stdout, and process directories recursively. Contents - Demo - Key Features - Supported File Types - Installation - Homebrew - Nix - Chocolatey (Windows) - Using go install - Binary Release - From Source - Usage - Command Synopsis - Arguments - Flags - Examples - Contributing - Code of Conduct - Author - License Demo Key Features - Alphabetical Sorting : Sorts variable , output , locals and terraform blocks within your HCL files. - Flexible Input/Output : - Read from a specific file, directory or standard input (stdin). - Overwrite the input file, write to a new file, or print to standard output (stdout). - Recursive Processing : Sort files in an entire directory and its subdirectories. - Skips common version control ( .git ) and Terraform utility directories ( .terraform , .terragrunt-cache ). - Dry Run Mode : Preview changes without modifying any files. - Code Formatting : - Corrects spacing between sorted blocks. - Removes unnecessary leading or trailing newlines from the file. Supported File Types tfsort processes files with the following extensions: - .tf - .hcl - .tofu Installation Homebrew To install tfsort using Homebrew:","default_branch":null,"files":null,"tree":[],"storefront":"/r/AlexNabokikh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/AlexNabokikh/tfsort/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}