Learn from your own chess mistakes: Stockfish analysis + spaced repetition training
Project description
Chess Self-Coach
Learn from your own mistakes. Chess Self-Coach fetches your games from Lichess and chess.com, finds your blunders with Stockfish and Lichess tablebases, and drills you on the correct moves with spaced repetition.
Static demo | Documentation | Landing page
How It Works
Your games → Stockfish analysis → Spaced repetition training
One command to start
chess-self-coach train --prepare # fetch games + Stockfish analysis (~5 min)
chess-self-coach # open training in browser
What you see
For each mistake in your games, the trainer shows:
- Context: "Middlegame, you had a slight advantage. Your move lost significant material."
- The position with material balance (captured pieces)
- Your task: find the better move by dragging a piece
- Wrong move? Stockfish shows how the opponent punishes it, then Retry
- After answering: explanation, best line (playable), link to the original game
- Spaced repetition: positions come back until mastered (intra-session + SM-2)
- Give up: permanently dismiss positions you don't want to review
Mistake categories
| Category | Centipawn loss | Example |
|---|---|---|
| Blunder | >= 200 cp | Hanging a piece, allowing checkmate |
| Mistake | 100-199 cp | Missing a tactic, losing material |
| Inaccuracy | 50-99 cp | Passive move when active was better |
Endgame positions (≤ 7 pieces) are resolved by the Lichess tablebase API with mathematically exact Win/Draw/Loss verdicts — no Stockfish heuristics needed.
Installation
One-liner (recommended)
curl -fsSL https://raw.githubusercontent.com/Bobain/chess-self-coach/main/install.sh | bash
Installs Stockfish, Python, pipx, and chess-self-coach. Then run the setup wizard:
chess-self-coach setup
Supported platforms: macOS (Homebrew), Ubuntu/Debian (apt).
Manual installation
# 1. Install Stockfish
sudo apt install stockfish # or: brew install stockfish
# 2. Install chess-self-coach
pipx install chess-self-coach
# 3. Run the interactive setup wizard
chess-self-coach setup
Update
chess-self-coach update
Setup wizard
The setup command will:
- Find Stockfish on your system
- Guide you through Lichess token creation (bilingual FR/EN, step by step)
- Ask for your chess.com username (for importing games)
- Auto-detect your Lichess Studies
CLI Reference
Training (main feature)
# Fetch your games and analyze with Stockfish
chess-self-coach train --prepare # 20 games, depth 18, parallel
chess-self-coach train --prepare --games 50 # more games
chess-self-coach train --prepare --depth 12 # faster analysis
# Open the training interface
chess-self-coach
# Check your stats
chess-self-coach train --stats
Incremental by default: only new games are analyzed. Existing positions and your SRS progress are preserved.
# Developer options
chess-self-coach train --prepare --fresh # [dev] discard data, start from scratch
chess-self-coach train --refresh-explanations # [dev] regenerate texts without Stockfish
Repertoire management (secondary)
Also includes tools for managing opening repertoire PGN files synced with Lichess Studies:
chess-self-coach analyze <file.pgn> # Stockfish analysis with [%eval] annotations
chess-self-coach push <file.pgn> # push PGN to Lichess Study
chess-self-coach pull <file.pgn> # pull from Lichess Study
chess-self-coach cleanup [file.pgn] # remove empty default chapters
chess-self-coach status # sync status of all repertoire files
chess-self-coach setup # interactive configuration wizard
Data & Privacy
- Your games are fetched from public APIs (Lichess, chess.com)
training_data.jsonis stored locally (gitignored)- Drill progress is in your browser's localStorage
- No server, no account, no tracking
Contributing
See CONTRIBUTING.md for code guidelines.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chess_self_coach-0.3.11.tar.gz.
File metadata
- Download URL: chess_self_coach-0.3.11.tar.gz
- Upload date:
- Size: 5.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
528fbb6d3afe6008c3d0f5885674d58a5ba6d6bfe3d8521566147485393099c2
|
|
| MD5 |
16f736bae4ed55cbe648b8b51c0cfd1b
|
|
| BLAKE2b-256 |
c315df3e7a496738d92c4290b31fbd289130ffb792a17790e0d6f45147443471
|
Provenance
The following attestation bundles were made for chess_self_coach-0.3.11.tar.gz:
Publisher:
publish.yml on Bobain/chess-self-coach
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chess_self_coach-0.3.11.tar.gz -
Subject digest:
528fbb6d3afe6008c3d0f5885674d58a5ba6d6bfe3d8521566147485393099c2 - Sigstore transparency entry: 1154266207
- Sigstore integration time:
-
Permalink:
Bobain/chess-self-coach@7db125e04783d5b55f227ca6adb314bfc88a89b5 -
Branch / Tag:
refs/tags/v0.3.11 - Owner: https://github.com/Bobain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7db125e04783d5b55f227ca6adb314bfc88a89b5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file chess_self_coach-0.3.11-py3-none-any.whl.
File metadata
- Download URL: chess_self_coach-0.3.11-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
205f9b385987e08b707a34d48a20a74d5306acc9b16d4e0679f2cf39ab7a5d19
|
|
| MD5 |
5d2fb5bf55fffd2a0d47691dbf5e14fc
|
|
| BLAKE2b-256 |
3ac2f3deb379dfc9819205c870f6f085e1c80bc28a42afab59a04ed6be594535
|
Provenance
The following attestation bundles were made for chess_self_coach-0.3.11-py3-none-any.whl:
Publisher:
publish.yml on Bobain/chess-self-coach
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chess_self_coach-0.3.11-py3-none-any.whl -
Subject digest:
205f9b385987e08b707a34d48a20a74d5306acc9b16d4e0679f2cf39ab7a5d19 - Sigstore transparency entry: 1154266208
- Sigstore integration time:
-
Permalink:
Bobain/chess-self-coach@7db125e04783d5b55f227ca6adb314bfc88a89b5 -
Branch / Tag:
refs/tags/v0.3.11 - Owner: https://github.com/Bobain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7db125e04783d5b55f227ca6adb314bfc88a89b5 -
Trigger Event:
release
-
Statement type: