codesiz is a command-line utility written in Go that analyzes source code file lengths.
- Recursively scans directories for files.
- Configurable file extensions via an external JSON configuration.
- Computes statistics such as total files, total lines, average lines, median lines, largest/smallest file size, k-means clustering and standard deviations.
- Output options:
-?help / usage information.-lfor detailed listing.-sfor sorted output (smallest to largest).-hfor a graphical histogram representation.-ato analyze all files (not just those matching configured extensions).-jfor JSON output of the analysis results.
- Language filtering options:
-ito include only a specific language type (ignores languages.json).-eto exclude a specific language file type as defined in languages.json.
- Additional options:
-kto exclude the largest n files from the analysis. For example,-k 1excludes the largest file, and-k 2excludes the two largest files. (The excluded files are displayed separately.)
- Ensure you have Go installed.
- Clone the repository.
- Build for Windows:
go build -o codesiz.exe main.go
- Build for Linux:
go build -o codesiz main.go

