wordle-cli-js
v1.0.4
Published
a commandline game based on wordle online that was trending recently
Maintainers
Readme
Wordle CLI Game
Wordle cli game is for the CLI enthusiasts. Using this code you can play the trending game Wordle from within your terminal console. I built this for fun. Feel free to suggest improvements or add issues in the issues tab.
Installation
You can install the latest version globally from npm:
npm install -g wordle-cli-jsThen run the game from anywhere with:
wordleOr, to use as a project dependency:
npm install wordle-cli-jsFeatures
- Play Wordle in your terminal
- Random 5-letter word fetched from an online API, with a robust local fallback word list (works offline)
- Colored feedback for correct, misplaced, and incorrect letters
- Handles edge cases and errors gracefully
- Well-tested with comprehensive test coverage
Requirements
- Node.js v14+ recommended
- Internet connection (for fetching random words)
Instructions
Clone the code and then run the following command
cd wordle-cli
npm iand then to play the game type the following command:
npm startExample Game Session
Welcome to Wordle CLI!
Guess the 5-letter word in 6 tries.
Green = correct letter & position, Yellow = correct letter, wrong position, White = not in word.
_ _ _ _ _
_ _ _ _ _
_ _ _ _ _
_ _ _ _ _
_ _ _ _ _
_ _ _ _ _Running Tests
For running the test cases, run
npm run testThe test suite covers core logic, edge cases, and user-facing output.
Test Suite Organization
See TESTING.md for details on the test suite structure and what each test file covers.
License
MIT
