Git Product home page Git Product logo

wordle-cli's Introduction

Wordle CLI

Play Wordle in your command line!

Screenshots

Wordle in-game

Wordle game over

Wordle statistics

Download

You can download the latest binary from the GitHub releases page. Placing the binary somewhere in your PATH will make it available system-wide.

For Debian users

If you have Debian or a Debian-based system, you can use our Debian package repository to install and update Wordle CLI globally.

Run the following commands in succession:

echo "deb https://deb.nimblebun.works/debian stable main" | sudo tee /etc/apt/sources.list.d/nimblebun.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 033D0D4895F432D1
sudo apt update
sudo apt install wordle-cli

For Arch Linux users

If you have Arch Linux or an Arch-based system (e.g. Manjaro), you can install Wordle CLI globally through AUR.

Example using yay:

yay -S wordle-cli-bin

Usage

./wordle          # play today's official word
./wordle daily    # play today's Wordle CLI word
./wordle random   # play a random word

In-game you can press CtrlC to quit anytime. You can press Enter to validate your current word (note: invalid words will not be validated). Pressing Backspace will remove the last letter.

Once you're on the finish screen you can use the โ†’ key to view your statistics for the chosen Wordle type. You can then use the โ† key to return to the game overview. Note: random mode does not have statistics.

In random mode, you can press CtrlN on the finish screen to play a new random word.

Credits

License

MIT.

wordle-cli's People

Contributors

heimer16 avatar jozsefsallai avatar thomas-humi avatar tom-on-the-internet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wordle-cli's Issues

`invalid memory address or nil pointer dereference` on entering a valid word in random mode

Output:

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/usr/lib/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	/usr/lib/go/src/runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
	/home/max/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:350 +0x95
panic({0x5c5580, 0x78d9c0})
	/usr/lib/go/src/runtime/panic.go:1047 +0x266
pkg.nimblebun.works/wordle-cli/game.(*AppModel).save(0xc000136780)
	/home/max/git/wordle-cli/game/utils.go:253 +0x27
pkg.nimblebun.works/wordle-cli/game.(*AppModel).enter(0xc000136780)
	/home/max/git/wordle-cli/game/utils.go:164 +0x5ec
pkg.nimblebun.works/wordle-cli/game.(*AppModel).handleKeyDown(0xc000136780, 0xc000000228, {0x0, 0xc0000d0000, 0x0})
	/home/max/git/wordle-cli/game/model.go:114 +0x14d
pkg.nimblebun.works/wordle-cli/game.(*AppModel).Update(0xc00019c000, {0x5d86c0, 0xc000292030})
	/home/max/git/wordle-cli/game/model.go:137 +0x6f
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel(0xc00015a280)
	/home/max/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:534 +0x139c
github.com/charmbracelet/bubbletea.(*Program).Start(...)
	/home/max/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543
main.startGame({0x5fbfc5, 0x5ef8a1}, 0xc00010af70, 0xc000126600)
	/home/max/git/wordle-cli/main.go:25 +0x54
main.startRandom(<<<<<<<<<<<<0xc00010af70)
	/home/max/git/wordle-cli/main.go:40 +0x26
github.com/urfave/cli/v2.(*Command).Run(0xc00019a240, 0xc000126540)
	/home/max/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x64a
github.com/urfave/cli/v2.(*App).RunContext(0xc000110ea0, {0x64bb90, 0xc00013a010}, {0xc000128000, 0x2, 0x2})
	/home/max/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0x81e
github.com/urfave/cli/v2.(*App).Run(...)
	/home/max/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
main.main()
	/home/max/git/wordle-cli/main.go:68 +0x1f9

From reading the code referenced in the stack trace, my guess is that m.SaveData on the first line of save() in game/utils.go is nil, but I haven't used Go before so that's just a guess.

Edit: adding the following -

if (m.SaveData == nil) {
    return
}

to the start of the aforementioned function fixes the problem by not saving the state of random mode games, but I don't know this is the intended behaviour and if it would break other things related to saving because I haven't read enough of the rest of the program. That said, I can submit a pull request if you'd like.

Output of go version: go version go1.17.6 linux/amd64
OS: Manjaro, kernel version: 5.16.7-1-MANJARO

Let me know if there's any other information that would be helpful for me to provide :)

Carriage return (ENTER) not working

The carriage return key doesn't work on the starting word -- but only some words -- in v1.0.2. Type all 5 characters, hit ENTER, and nothing happens. For example, STEAM, SMART, and TRIED do not work, but SOARS and MEATS do. Downgraded to v1.0.1, and it all (valid) words work.

Version: v1.0.2
Go: go1.17.7 linux/amd64
Shell: st + tmux

Update word list

NYT changed the word list so the official Wordle is offset now by a few words.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.