English | 中文
A code statistics tool written in Rust that analyzes programming language distribution in projects.
- Multiple programming language recognition
- Simple and detailed display modes
- Customizable configuration
- Accurate code, comment, and blank line counting
- Beautiful command-line interface
- Support for .gitattributes language overrides
- Ignores common binary files, documentation, and configuration files
cargo install codstts
Basic usage:
# Analyze current directory
codstts
# Use simple mode
codstts -s
# Use detailed mode
codstts -d
# Analyze specific directory
codstts path/to/your/project
You can create a .codstts.toml
file in your project root for custom configuration:
# Paths to ignore
ignore_paths = ["vendor", "node_modules"]
# Language mappings
[language_mappings]
"jsx" = "React"
"tsx" = "React"
# Extensions to exclude
exclude_extensions = ["log", "tmp"]
# Files to exclude
exclude_files = ["LICENSE", "README.md"]
Detailed mode includes additional information such as code lines, comment lines, etc.
This project is open-sourced under the MIT
Issues and Pull Requests are welcome!