🎯 Smart Analysis - Count every word with precision
🔍 Word Search - Find specific word occurrences instantly
🎨 Case-Insensitive - Automatically handles uppercase/lowercase
🚀 Blazing Fast - Pure Node.js with zero dependencies
📋 Clean Output - Beautiful formatted results
npm install -g @parth_pipermintwala/wordfreqcount ./text.txtOutput:
─────────────────────────────────────────────────────────────────
{ theory: 5, is: 4, in: 6, general: 1, any: 5, practice: 3 }
─────────────────────────────────────────────────────────────────
Total words: 250
─────────────────────────────────────────────────────────────────
count ./text.txt theoryOutput:
─────────────────────────────────────────────────────────────────
The word "theory" appears 5 times.
─────────────────────────────────────────────────────────────────
📝 Content Writers - Analyze your writing patterns
🎓 Students - Study text composition and word usage
🔎 SEO Specialists - Check keyword density
📚 Researchers - Perform quick text analysis
✍️ Authors - Track word frequency in manuscripts
- 📖 Reads your text file
- 🔄 Converts to lowercase for consistency
- ✂️ Splits into individual words
- 🧹 Filters out numbers and punctuation
- 📊 Counts and displays results
- Runtime: Node.js 25.2.1+ (ESM modules)
- Dependencies: Zero! Pure Node.js
- File Support: Any text-based file format
- Word Detection: Regex-based (
/\W+/split + alpha filter) - Error Handling: Clear messages for missing files or invalid paths
count <filePath> [wordToFind]| Argument | Required | Description |
|---|---|---|
filePath |
✅ Yes | Path to the text file to analyze |
wordToFind |
⬜ Optional | Specific word to search for |
💾 Export Results - Save counts to a file:
count document.txt > results.txt🔗 Chain Commands - Combine with other tools:
cat *.txt | count combined.txt📁 Analyze Multiple Files - Use a loop:
for file in *.txt; do count "$file"; doneMIT © 2025
Made with ❤️ by Parth Pipermintwala