14 releases (stable)
1.6.1 | Feb 3, 2025 |
---|---|
1.6.0 | Dec 15, 2024 |
1.5.0 | Nov 26, 2024 |
1.2.1 | Mar 26, 2024 |
0.1.3 | Dec 3, 2023 |
#220 in Game dev
199 downloads per month
5MB
4.5K
SLoC
Description
Chess-tui is a simple chess game you can play from your terminal. It supports local 2 players mode, online multiplayer and playing against any UCI compatible chess engine.
Quick install
cargo install chess-tui
chess-tui
If you want to install the game with your favorite package manager, you can find the installation guide here.
Available on
Features
Helper menu
![Helper menu](https://img.gs/czjpqfbdkz/800/https://raw.githubusercontent.com/thomas-mauran/chess-tui/ee8ae740de4787e8eef954ed2383093a7665b7a9/examples/helper.gif)
Local 2 player mode
![Local 2 players](https://img.gs/czjpqfbdkz/800,2x/https://raw.githubusercontent.com/thomas-mauran/chess-tui/ee8ae740de4787e8eef954ed2383093a7665b7a9/examples/demo.gif)
Online multiplayer
![Online multiplayer](https://img.gs/czjpqfbdkz/800/https://raw.githubusercontent.com/thomas-mauran/chess-tui/ee8ae740de4787e8eef954ed2383093a7665b7a9/website/static/gif/multiplayer.gif)
Draws
- Stalemate
- 50 moves rules
- 3 time repetition of the same position
Piece Promotion
no demo available yetPlay against any UCI chess engine as black or white
Play the white pieces
![Play against a chess engine as white](https://img.gs/czjpqfbdkz/800/https://raw.githubusercontent.com/thomas-mauran/chess-tui/ee8ae740de4787e8eef954ed2383093a7665b7a9/examples/play_against_white_bot.gif)
Play the black pieces
![Play against a chess engine as black](https://img.gs/czjpqfbdkz/800/https://raw.githubusercontent.com/thomas-mauran/chess-tui/ee8ae740de4787e8eef954ed2383093a7665b7a9/examples/play_against_black_bot.gif)
Connect a chess engine
You can play chess-tui with any UCI compatible chess engines. To do so you will need to use the -e command to give the chess engine binary path.
Example:
chess-tui -e /your/bin/path
Here I installed stockfish using homebrew and gave chess-tui the path the the engine binary. This command will store in your home directory the chess engine path so you don't have to relink it everytime !
Configuration
Chess-tui uses a TOML configuration file located at ~/.config/chess-tui/config.toml
. Here are the available configuration options:
# Path to the chess engine binary
engine_path = "/path/to/engine"
# Display mode: "DEFAULT" or "ASCII"
display_mode = "DEFAULT"
# Logging level: "Off", "Error", "Warn", "Info", "Debug", "Trace"
log_level = "Off"
Configuration Options:
- engine_path: Path to your UCI-compatible chess engine binary
- display_mode:
DEFAULT
: Uses unicode chess piecesASCII
: Uses ASCII characters for pieces
- log_level: Controls the verbosity of logging
Off
: No logging (default)Error
: Only errorsWarn
: Warnings and errorsInfo
: General information, warnings and errorsDebug
: Debugging informationTrace
: Very verbose debugging information
The config file is automatically created when you first run chess-tui. You can manually edit it to customize your experience.
All logs are stored in ~/.config/chess-tui/logs
.
Base config:
# no engine path
display_mode = "DEFAULT"
log_level = "Off"
Documentation
You can find the documentation of the project here
Roadmap
You can find the roadmap of the project here if you want to contribute.
Crates.io
The project is also available on crates.io here
Dependencies
~9–23MB
~286K SLoC