lineup is a small Go CLI that counts lines of code in any folder or git repository.
It reports:
- code lines
- comment lines
- blank lines
- total lines
From this repository:
go install ./cmd/lineupIf your Go bin directory is not in PATH, add it:
export PATH="$PATH:$(go env GOPATH)/bin"Scan current directory:
lineupScan a specific folder:
lineup /path/to/projectShow JSON output:
lineup --format jsonShow only total code LOC (script-friendly):
lineup --minimalEnable diagnostics:
lineup --verboseRuntime is shown by default on stderr for all commands.
Include only selected patterns:
lineup --include "*.go,*.py"Exclude paths/patterns:
lineup --exclude "vendor,node_modules,.git"Ignore .gitignore rules:
lineup --no-gitignore