Wordle-cli - Command-line clone of Josh Wardle's WORDLE

Related tags

CLI Tools wordle-cli
Overview

Command-line clone of Josh Wardle's WORDLE, inspired by Paul Battley's Ruby version. Features:

  • play against random solutions, or against the once-a-day "official" Wordle solution (with --today)
  • official dictionaries of solutions and valid guesses
  • spoiler-free emoji summaries for sharing

Screenshot of a Wordle CLI game

Download and run (./play.py)

Requires Python 3.6 or later, and a terminal which supports colours and ANSI CSI codes, e.g. Windows Terminal.

To get the code:

git clone https://github.com/klipspringr/wordle-cli.git && cd wordle-cli

alternatively, if you don't have git: click Code > Download ZIP on GitHub, extract the ZIP, open a terminal and cd to the extracted folder.

To run on Linux or WSL:

./play.py

To run on Windows in Windows Terminal or PowerShell:

python3 play.py

The Windows command prompt (cmd.exe) is not supported.

Not tested on macOS, but should work — let me know if any problems!

Options

Usage: ./play.py [-h|--help|--today|SOLUTION]

Argument Behaviour
none Use a random solution from the official Wordle dictionary
-h , --help Print this help text and quit
--today Use today's official Wordle solution
SOLUTION Use a given SOLUTION (probably only useful for debugging)

Config file

To tweak the terminal colours and other variables, copy config.ini.defaults to config.ini and uncomment and edit the relevant lines. Colours are specified using ECMA-48 Select Graphic Rendition codes (cheat sheet).

Comments
  • Bug when letters have multiple letters

    Bug when letters have multiple letters

    image

    Notice how SEVEN, the second guess, has the second E highlighted. According to wordle conventions, the first E should have been highlighted because there is only one E in SURER.

    Coincidentally, this bug also exists in the NyTimes wordle.

    opened by SiddharthShyniben 3
  • 'type' object is not subscriptable

    'type' object is not subscriptable

    I followed the instructions for running this but I'm not able to. I'm using Python 3.8.10. When I clone the repo and run play.py, here's what I get:

    $ ./play.py 
    Traceback (most recent call last):
      File "./play.py", line 4, in <module>
        import wordle
      File "/home/anewsome/Desktop/1014-7555/wordle-cli/wordle.py", line 12, in <module>
        class Game:
      File "/home/anewsome/Desktop/1014-7555/wordle-cli/wordle.py", line 67, in Game
        def check_guess(guess: str, solution: str) -> list[LetterStates]:
    TypeError: 'type' object is not subscriptable
    

    I opened up the file to see if I could figure out what's really going on but I'm unable to figure it out. If anyone has a workaround, please post it!

    opened by aaronnewsome 3
  • package for PyPI?

    package for PyPI?

    Totally fine if you don't want to do this, but, in case you want to package this for PyPI, it's easier than it used to be: https://packaging.python.org/en/latest/tutorials/packaging-projects/

    Welcome to GitHub! :stars:

    opened by brainwane 1
  • --today produced the wrong word

    --today produced the wrong word

    For wordle 241 the NYT hosted version of wordle had the solution of AROMA whereas wordle-cli produced AGORA.

    Looking at the solutions.txt data file we see that AGORA is just before AROMA. Perhaps it was added to the solutions text incorrectly here or maybe it has been removed from the solutions list by NYT?:

    ~/code/wordle-cli on branch main$ head -n 243 data/solutions.txt | tail -n7
    PAUSE
    ULCER
    ULTRA
    ROBIN
    CYNIC
    AGORA
    AROMA
    

    The solutions.txt file should be updated otherwise future days will be off by one in perpetuity.

    opened by o-nikolas 13
  • Using argparse module to parse commandline arguments

    Using argparse module to parse commandline arguments

    Hi! nice side project :)

    I've created this PR to introduce the usage of the built-in argparse module to handle commandline arguments instead of manually parsing sys.argv.

    I also fixed a small bug in the current implementation that allowed the usage of --solution flag to create a game with a non-guessable solution (for example, you could create a game using abcde as a solution, but could never guess it),

    opened by DeepSpace2 1
Owner
Klipspringer
Klipspringer
Wordle for CLUE - WORDLE clone for Adafruit Clue

Wordle_for_CLUE This project is a clone of the very popular word solving puzzle

Michael Lacock 4 Feb 15, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
git-partial-submodule is a command-line script for setting up and working with submodules while enabling them to use git's partial clone and sparse checkout features.

Partial Submodules for Git git-partial-submodule is a command-line script for setting up and working with submodules while enabling them to use git's

Nathan Reed 15 Sep 22, 2022
Pyrdle - Play Wordle in the CLI. Write an algorithm to play Wordle for you. Ruin all of the fun you've been having

Pyrdle - Play Wordle in the CLI. Write an algorithm to play Wordle for you. Ruin all of the fun you've been having

Charles Tapley Hoyt 11 Feb 11, 2022
Wordle breaker: A CLI tool to help you solve Wordle

Wordle Breaker A CLI tool to help you solve Wordle I decided to code a solution

Alex 4 Apr 27, 2022
Wordle-textual - Play Wordle from the CLI, using Textual

Wordle, playable from the CLI This project seeks to emulate Wordle in your shell

PhenoM4n4n 3 Mar 29, 2022
A clone of the popular online game Wordle

wordle_clone A CLI application for wordle. Description A clone of the popular online game Wordle.

null 0 Jan 29, 2022
The most comprehensive, exhaustive, parameterized command-line wordle solver.

Wordle Solver The most comprehensive, exhaustive, parameterized command-line wordle solver. Wordle is a real

Debarghya Das 27 Nov 21, 2022
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 5.1k Jan 5, 2023
Microsoft Azure CLI - Azure Command-Line Interface

A great cloud needs great tools; we're excited to introduce Azure CLI, our next generation multi-platform command line experience for Azure.

Microsoft Azure 3.4k Dec 30, 2022
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli.

ABOUT A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Janardon Hazarika 17 Dec 11, 2022
moviepy-cli: Command line interface for MoviePy.

Moviepy-cli is designed to apply several video editing in a single command with Moviepy as an alternative to Video-cli.

Kentaro Wada 23 Jun 29, 2022
Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process of them.

Task Manager Automation Tool (TMAT) CLI Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process

Tiamat 5 Apr 12, 2022
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

Richard Mwewa 30 Sep 8, 2022
This is a CLI utility that allows you to view RedFlagDeals.com on the command line.

RFD Description Motivation Installation Usage View Hot Deals View and Sort Hot Deals Search Advanced View Posts Shell Completion bash zsh Description

Dave G 8 Nov 29, 2022
tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

Alexander Rudy 3 Jan 10, 2022
Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications.

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments brought about by the failure to execute a CLI API. Simple to code, easy to learn, and does not come with needless baggage.

Secretum Inc. 16 Oct 15, 2022