lichess-cli

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: MIT Imports: 11 Imported by: 0

README

Lichess CLI

Install

git clone git@github.com:mattcanty/lichess-cli.git
cd lichess-cli
make install

Configure

  1. Create a Lichess account
  2. Go to https://lichess.org/account/oauth/token
  3. Create a new token with Play games with the board API selected
  4. Copy the token and place in ~/.config/lichess-cli/config.json like so:
{
  "lichess_api_key": "xxxxxxxxxxxxxxxx"
}

Play

View Games
➜  ~ lichess-cli games
┏━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ ID       ┃ MY TURN ┃ OPPONENT     ┃ LAST MOVE ┃ BOARD           ┃
┣━━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫
┃ hP09Ep7h ┃ true    ┃ A.I. level 1 ┃ h2h4      ┃ ♜ ♞ ♝ ♚ ♛ ♝ ♞ ♜ ┃
┃          ┃         ┃              ┃           ┃ - ♟ ♟ ♟ - - ♟ ♟ ┃
┃          ┃         ┃              ┃           ┃ - - - - ♟ ♟ - - ┃
┃          ┃         ┃              ┃           ┃ ♟ - - - - - - - ┃
┃          ┃         ┃              ┃           ┃ - - - ♙ ♙ - - - ┃
┃          ┃         ┃              ┃           ┃ - - - - - - - - ┃
┃          ┃         ┃              ┃           ┃ ♙ ♙ ♙ - - ♙ ♙ ♙ ┃
┃          ┃         ┃              ┃           ┃ ♖ ♘ ♗ ♔ ♕ ♗ ♘ ♖ ┃
┣━━━━━━━━━━╋         ┃              ┣━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫
┃ mjqGC18w ┃         ┃              ┃ f5c2      ┃ ♖ - - ♕ ♔ ♗ - ♖ ┃
┃          ┃         ┃              ┃           ┃ ♙ ♙ - ♘ ♙ ♙ ♙ ♙ ┃
┃          ┃         ┃              ┃           ┃ - - ♙ - - ♘ - - ┃
┃          ┃         ┃              ┃           ┃ - - - ♙ - - - - ┃
┃          ┃         ┃              ┃           ┃ - - - ♟ - - - - ┃
┃          ┃         ┃              ┃           ┃ ♟ ♟ ♞ - ♟ ♛ - - ┃
┃          ┃         ┃              ┃           ┃ - - ♗ - - ♟ ♟ ♟ ┃
┃          ┃         ┃              ┃           ┃ ♜ - ♝ - ♚ ♝ ♞ ♜ ┃
┗━━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━┛
Make a Move

lichess-cli play m c1c2

m is the prefix of the game ID and c1c2 is your move.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL