Skip to content

A terminal-based chess client written in Go. Play against Stockfish at any Elo rating, right from your terminal.

Notifications You must be signed in to change notification settings

ezeoleaf/termichess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TermiChess ♟️

A terminal-based chess application written in Go, featuring a simple TUI interface and Stockfish engine integration.

Features

  • ♟️ Interactive TUI: Hacky user interface with keyboard navigation
  • 🤖 Stockfish Engine: Play against Stockfish with adjustable ELO levels
  • 📊 Game Display: Visual chess board with piece representation
  • ⌨️ Move Input: Enter moves in standard algebraic notation (e.g., e2e4, Nf3)
  • 🎯 ELO Selection: Choose your opponent's strength
  • 💾 Auto-save: Game state is automatically saved

Installation

Prerequisites

  • Go 1.24.0 or later
  • Stockfish installed on your system

Installing Stockfish

macOS (Homebrew):

brew install stockfish

Linux (Debian/Ubuntu):

sudo apt-get install stockfish

Linux (Fedora):

sudo dnf install stockfish

Windows: Download from Stockfish website and add to PATH

Build from Source

git clone <repository-url>
cd termichess
go mod tidy
go build -o termichess cmd/termichess/main.go
./termichess

Or use the Makefile:

make build
make run

Usage

Controls

  • Arrow Keys: Navigate menus
  • Enter: Select option
  • Ctrl+H: Help - Show help page
  • Ctrl+N: New Game - Start a new game
  • Ctrl+E: ELO Settings - Change Stockfish ELO
  • Ctrl+C: Quit - Exit the application

Playing a Game

  1. Start the application
  2. Select your ELO level (default: 1500)
  3. Enter moves in algebraic notation (e.g., e2e4, Nf3, O-O)
  4. Stockfish will respond automatically
  5. The game ends when checkmate, stalemate, or draw occurs

Move Notation

  • Standard moves: e2e4 (from e2 to e4)
  • Knight moves: Ng1f3 or Nf3 (knight from g1 to f3)
  • Castling: O-O (kingside) or O-O-O (queenside)
  • Promotion: e7e8Q (pawn promotes to queen)

Configuration

The game automatically saves your settings to:

  • macOS: ~/Library/Application Support/termichess/config.yml
  • Linux: ~/.config/termichess/config.yml
  • Windows: %APPDATA%\termichess\config.yml

ELO Levels

  • Beginner: 800-1200
  • Intermediate: 1200-1800
  • Advanced: 1800-2400
  • Expert: 2400+

Screenshots

Game

image

ELO setting

image

Ongoing games

image image

Events

image

Development

Dependencies

  • github.com/gdamore/tcell/v2: Terminal UI framework
  • github.com/rivo/tview: TUI components
  • github.com/notnil/chess: Chess game logic
  • gopkg.in/yaml.v3: Configuration file handling

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • Built with the amazing tview TUI framework
  • Uses notnil/chess for game logic
  • Powered by Stockfish chess engine

About

A terminal-based chess client written in Go. Play against Stockfish at any Elo rating, right from your terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published