@jimbonlemu/word-hunts
v1.1.0
Published
Fast offline CLI tool for instant English word-prefix search
Maintainers
Readme
Word Hunts
██ ██ ▄████▄ █████▄ ████▄ ██ ██ ██ ██ ███ ██ ██████ ▄█████
██ ▄█▄ ██ ██ ██ ██▄▄██▄ ██ ██ ██████ ██ ██ ██ ▀▄██ ██ ▀▀▀▄▄▄
▀██▀██▀ ▀████▀ ██ ██ ████▀ ██ ██ ▀████▀ ██ ██ ██ █████▀A fast and customizable command-line tool for searching English words by prefix. Built for games like Last Letter, word puzzles, linguistics tools, and general word lookup.
This CLI loads a local dictionary (400k+ words) and performs instant prefix searches using an optimized binary-search algorithm.
✨ Features
- 🚀 Instant prefix search (optimized binary-search, extremely fast)
- 📚 Works fully offline with local dictionary (400k+ words)
- 🎯 Direct search mode or interactive mode
- 🌍 Multilingual support with English and Indonesian UI
- 🎛️ Customizable output
- Table mode ON/OFF
- Max result limit
- Number of columns
- Cell width (auto or manual)
- 📖 Enhanced help system with clear examples and documentation
- 🔧 Persistent settings via
config.json - 📐 Automatic terminal-width adaptation
- ✂️ Auto-adaptive cell width based on content
- 🎮 Perfect for word-based games or productivity tools
📦 Installation
Via NPM (Recommended)
npm install -g @jimbonlemu/word-huntsVia GitHub
git clone https://github.com/jimbonlemu/word-hunts
cd word-hunts
npm install
npm link🚀 Usage
Direct Search Mode
Quick search and exit. Perfect for one-off lookups or scripting.
wh cat
word-hunts helloInteractive Mode
Start interactive mode with UI. Great for multiple searches and exploring features.
wh
# or
word-huntsAfter running, type any prefix:

Example output:

Help & Version & Language
wh --help # Show help message
wh --version # Show version
wh --lang en # Switch language to English and exit
wh --lang id # Switch language to Indonesian and exitLanguage Switching
You can switch between supported languages in interactive mode:
/lang en # Switch to English
/lang id # Switch to Indonesian🖥️ Commands
Direct Mode
| Command | Description |
| --- | --- |
| wh <prefix> | Search words starting with prefix |
| wh --help or wh -h | Show help message |
| wh --version or wh -v | Show version |
| wh --lang <en,id> | Switch language (en/id) and exit |
Interactive Mode
| Command | Description |
| --- | --- |
| <prefix> | Search words starting with prefix |
| /help, /h | Show this help message |
| /tbon, /tboff, /tb | Toggle table mode (on/off) |
| /lang, /language | Switch language (en/id) |
| /sres | Set result limit |
| /scol | Set number of columns |
| /scw | Set cell width (auto or manual) |
| /frn [on/off], /frnon, /frnoff | Toggle filtering of Roman numerals (I, V, X, L, C, D, M) |
| /sml <number> | Set minimum word length from result |
| /refs, /ui | Refresh/Show UI header |
| /q, /quit, /exit | Quit the program |
| /version, /v | Show version |
🧠 How It Works
The CLI performs the following steps:
- Pre-sorts all words (case-insensitive)
- Finds the lower-bound match using binary search
- Collects all sequential matching prefixes
- Renders the output in table mode or plain mode
- Fits columns automatically to terminal width
- Truncates long words for clean alignment
📚 Dictionary Source
This CLI uses the words_dictionary.json file from dwyl/english-words.
The dictionary contains 479k English words, originally sourced from Infochimps and expanded by the dwyl community.
License: Unlicense (Public Domain) All credit for the dictionary data belongs to the original authors.
📜 License
MIT © Mochamad Iqbal Maulana
See LICENSE file for details.
👤 Author
Mochamad Iqbal Maulana
- GitHub: @jimbonlemu
- NPM: @jimbonlemu
Made because I needed it and for fun. Maybe you need it too.
A simple & fast CLI to dominate any word-based challenge.
🙏 Acknowledgements
- dwyl/english-words - For providing the comprehensive English word list
- Infochimps - Original word list source
🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
⭐ Show Your Support
Give a ⭐️ if this project helped you!
