UNPKG

varun-word-counter-cli

Version:

A CLI tool to count words in a text file

89 lines (54 loc) 1.31 kB
# varun-word-counter-cli A simple CLI tool that counts the number of words in a given text file or string input. Perfect for quick word count checks from your terminal! --- ## 📦 Installation ### Using NPX (No global installation needed) ```bash npx varun-word-counter-cli <file-path> ``` ### Global Installation ```bash npm install -g varun-word-counter-cli ``` --- ## 🛠️ Usage ### Count words from a file: ```bash wordcount <file-path> ``` ### Show help menu: ```bash wordcount --help ``` --- ## 🔧 Options | Option | Description | | ----------- | ------------------------------------ | | `<file>` | Path to the file to count words from | | `--help` | Show help menu | | `--version` | Show CLI version | --- ## 📁 Example ### Sample.txt: ``` Hello! This is a sample text file to check the word count CLI. ``` ### Run: ```bash wordcount sample.txt ``` ### Output: ``` Total words: 12 ``` --- ## 📌 Notes * This tool only works with `.txt` or text-based files. * You can also use `npx` to quickly run it without installing. --- ## 🧑‍💻 Author **Varun Mendre** GitHub: [@VarunMendre](https://github.com/VarunMendre) --- ## 📃 License This project is licensed under the MIT License.