Skip to main content

Learn from your own chess mistakes: Stockfish analysis + spaced repetition training

Project description

Chess Self-Coach

License: MIT

Learn from your own mistakes. Chess Self-Coach fetches your games from Lichess and chess.com, finds your blunders with Stockfish and Lichess tablebases, drills you on the correct moves with spaced repetition, and provides chess.com-quality game review with eval bar, score chart, and move classifications.

Static demo | Documentation | Landing page

How It Works

Your games → Stockfish analysis → Training drills + Game review

The PWA opens on a game list — your recent games from Lichess and chess.com. From there:

  • Select games to analyze with Stockfish (checkboxes + batch analyze)
  • Click a game for chess.com-style game review (eval bar, score chart, move classifications)
  • Train on any analyzed game, or open full Training from the menu for spaced repetition drills across all your mistakes

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:

  1. Find Stockfish on your system
  2. Guide you through Lichess token creation (step by step)
  3. Ask for your chess.com username (for importing games)

CLI Reference

Training (main feature)

# Fetch your games and analyze with Stockfish
chess-self-coach train --prepare                    # 10 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

Other commands

chess-self-coach syzygy [download|status]  # manage Syzygy endgame tablebases
chess-self-coach setup                  # interactive configuration wizard

Data & Privacy

  • Your games are fetched from public APIs (Lichess, chess.com)
  • data/training_data.json and data/analysis_data.json are 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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chess_self_coach-0.4.16.tar.gz (13.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chess_self_coach-0.4.16-py3-none-any.whl (73.1 kB view details)

Uploaded Python 3

File details

Details for the file chess_self_coach-0.4.16.tar.gz.

File metadata

  • Download URL: chess_self_coach-0.4.16.tar.gz
  • Upload date:
  • Size: 13.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chess_self_coach-0.4.16.tar.gz
Algorithm Hash digest
SHA256 8f0a29d18a921643b5f5bfb83ffb9bfd7fead380058fd96e68f894003d591afb
MD5 039427877916de7170e3e45afc736250
BLAKE2b-256 fb909e1d2329c34f71c4dc57184e871d7bb4237257ca3eebff79233085bc0885

See more details on using hashes here.

Provenance

The following attestation bundles were made for chess_self_coach-0.4.16.tar.gz:

Publisher: publish.yml on Bobain/chess-self-coach

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chess_self_coach-0.4.16-py3-none-any.whl.

File metadata

File hashes

Hashes for chess_self_coach-0.4.16-py3-none-any.whl
Algorithm Hash digest
SHA256 2cfb2347c406b217a27792892e655d7599b9d9a094e0afdb206949237b13b329
MD5 d1a8e48870f570d0e94b39c121af30d0
BLAKE2b-256 34620b436f87330b3466f77b7a5d2d77873458900330b4822549e94e069a48a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for chess_self_coach-0.4.16-py3-none-any.whl:

Publisher: publish.yml on Bobain/chess-self-coach

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page