Skip to content

A cli to play chess against an an UCI engine of your choice, written in go

Notifications You must be signed in to change notification settings

nemo984/chess-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chess-cli

chess-cli is a cli for playing chess against an UCI compatible engine written in go

Note: Chess pieces are in unicode, so the color may seem swapped. Your color is always on the bottom of the board

Table of Contents

Installation

go install github.com/nemo984/chess-cli@latest

UCI chess engine e.g. Stockfish

Usage

$ chess-cli --help
    Chess-cli is a CLI to play chess against an UCI engine of your choice with the ability to 
    specify depth
    Usage:
      chess-cli [command]

    Available Commands:
      analyze     Get lichess analyze urls on your games
      delete      Delete your chess games from database
      help        Help about any command
      list        List all your games (default will only show on-going games)
      play        Play/Continue a chess game
      puzzle      Play a daily lichess puzzle
      resign      Resign on your chess games

    Flags:
      -h, --help     help for chess-cli
      -t, --toggle   Help message for toggle

Examples

Playing against an engine

$ chess-cli play engine --help
    Start a game against an engine

    Usage:
      chess-cli play engine [flags]

    Flags:
          --color string   choose your color: white/black (default random)
      -d, --depth int      Set the engine depth to search x piles only (default 3)
      -h, --help           help for engine
          --name string    Set the name of the game (default random)
      -p, --path string    Set the UCI chess engine path (required)

$ chess-cli play engine -p "D:\Programming\stockfish.exe" --depth 5 --color white

play

List games

$ chess-cli list --help
  List all your games (default will only show on-going games)

  Usage:
    chess-cli list [flags]

  Flags:
    -a, --all      show all games with board
    -e, --engine   show games' engine configuration
    -h, --help     help for list

list

Resign games

$ chess-cli resign --help
  Resign on your chess games

  Usage:
    chess-cli resign [game-names...] [flags]

  Flags:
    -h, --help   help for resign

$ chess-cli resign tZHpL fromsettingNameFlag getGameNamesFromTheListCommand thisiscasesensitiveAlso
  You resigned on Game "tZHpL" Status: 0-1, Resignation
  You resigned on Game "fromsettingNameFlag" Status: 1-0, Resignation
  Game "getGameNamesFromTheListCommand" doesn't exist.
  Game "thisiscasesensitiveAlso" doesn't exist.

Delete games

$ chess-cli delete --help
  Delete your chess games from database

  Usage:
    chess-cli delete [game-names...] [flags]

  Flags:
    -h, --help   help for delete
    
$ chess-cli delete wzfhz tZHpL 
  Game "wzfhz" is deleted.
  Game "tZHpL" is deleted.

Get lichess analysis url for games

$ chess-cli analyze --help
  Get lichess analyze urls on your games

  Usage:
    chess-cli analyze [game-names...] [flags]

  Flags:
    -h, --help   help for analyze

$ chess-cli analyze wzfhz tZHpL blahblah
    Analyze Game "wzfhz" on lichess: https://lichess.org/L7vPPR5e
    Analyze Game "tZHpL" on lichess: https://lichess.org/SP6l4EFe
    Game "blahblah" doesn't exist.

Play a daily puzzle from lichess

$ chess-cli puzzle -h
  Play a daily lichess puzzle

  Usage:
    chess-cli puzzle [flags]

  Flags:
    -h, --help   help for puzzle

puzzle puzzle2 puzzle3

About

A cli to play chess against an an UCI engine of your choice, written in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages