Thanks to visit codestin.com
Credit goes to github.com

Skip to content

iMagesh/wordle-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-js

Then run the game from anywhere with:

wordle

Or, to use as a project dependency:

npm install wordle-cli-js

Features

  • 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 i

and then to play the game type the following command:

npm start

Example 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 test

The 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

About

A commandline utility to play the trending game wordle

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published