A terminal-based chess application written in Go, featuring a simple TUI interface and Stockfish engine integration.
- ♟️ 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
- Go 1.24.0 or later
- Stockfish installed on your system
macOS (Homebrew):
brew install stockfishLinux (Debian/Ubuntu):
sudo apt-get install stockfishLinux (Fedora):
sudo dnf install stockfishWindows: Download from Stockfish website and add to PATH
git clone <repository-url>
cd termichess
go mod tidy
go build -o termichess cmd/termichess/main.go
./termichessOr use the Makefile:
make build
make run- 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
- Start the application
- Select your ELO level (default: 1500)
- Enter moves in algebraic notation (e.g.,
e2e4,Nf3,O-O) - Stockfish will respond automatically
- The game ends when checkmate, stalemate, or draw occurs
- Standard moves:
e2e4(from e2 to e4) - Knight moves:
Ng1f3orNf3(knight from g1 to f3) - Castling:
O-O(kingside) orO-O-O(queenside) - Promotion:
e7e8Q(pawn promotes to queen)
The game automatically saves your settings to:
- macOS:
~/Library/Application Support/termichess/config.yml - Linux:
~/.config/termichess/config.yml - Windows:
%APPDATA%\termichess\config.yml
- Beginner: 800-1200
- Intermediate: 1200-1800
- Advanced: 1800-2400
- Expert: 2400+
github.com/gdamore/tcell/v2: Terminal UI frameworkgithub.com/rivo/tview: TUI componentsgithub.com/notnil/chess: Chess game logicgopkg.in/yaml.v3: Configuration file handling
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Built with the amazing
tviewTUI framework - Uses
notnil/chessfor game logic - Powered by Stockfish chess engine