text-stats-cli
v1.0.0
Published
Text statistics: word count, char count, reading time, readability
Maintainers
Readme
text-stats-cli
Text statistics CLI tool: word count, character count, reading time, readability scores, and word frequency analysis.
Install
npm install -g text-stats-cliUsage
# Analyze a file
text-stats -f article.txt
# Pipe from stdin
cat essay.txt | text-stats
# JSON output
text-stats -f report.md --json
# Top 20 words, ignoring common words
text-stats -f book.txt --top 20 --ignore-commonOutput
- Characters / Characters (no spaces) / Words / Sentences / Paragraphs / Lines
- Average word length and sentence length
- Reading time (~200 wpm) and Speaking time (~130 wpm)
- Flesch-Kincaid Grade Level readability score
- Coleman-Liau Index readability score
- Top word frequency with bar chart
Options
| Flag | Description |
| --- | --- |
| -f, --file <path> | Input file path |
| --stdin | Read from stdin |
| --json | Output as JSON |
| --top <n> | Number of top words (default: 10) |
| --ignore-common | Skip common words in frequency |
| -V, --version | Show version |
| -h, --help | Show help |
License
MIT
