Where the database, config, logs, and caches live, and how to back up or reset them.
Chess Analyzer Pro is local-first. Games, evaluations, explanations, and caches stay on your machine; nothing is uploaded to a project server.

| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/ChessAnalyzerPro/ |
| Windows | %APPDATA%\ChessAnalyzerPro\ |
| Linux | ~/.local/share/chessanalyzerpro/ or $XDG_DATA_HOME/chessanalyzerpro/ |
Open it directly from Settings → Data & Storage → Open Data Folder.
| File or folder | Purpose |
|---|---|
config.json | User settings |
secrets.json | Legacy fallback for secrets; normally empty |
analysis_cache.db | Games, evaluations, explanations, and network caches |
openings.db | Opening index built from the bundled Lichess ECO data |
chess_analyzer.log | Rotating log, 5 MB with 3 backups |
themes/ | Imported custom SVG piece sets |
Settings are written from src/config/settings_schema.py. Missing keys are filled with defaults on
load, and legacy flat LLM keys are migrated into profiles automatically.
{
"engine_path": "stockfish",
"analysis_depth": 18,
"time_per_move": 1.0,
"use_cache": true,
"theme_mode": "system",
"board_theme": "Brown",
"piece_theme": "Standard",
"sound_enabled": true,
"history_view_mode": "compact",
"lichess_explorer_enabled": true,
"api_games_limit": 20,
"llm_profiles": [],
"llm_active_profile": "",
"shortcut_preset": "standard"
}
engine_threads and engine_hash stay out of the file until you change them, so the thermal-safe
module defaults keep applying.
API keys and the Lichess token are never written to config.json. They go through SecretStore into
the OS credential store:
secrets.json exists only as a legacy fallback and is migrated into the keychain when one is
available. Log output redacts sk-…, gsk_…, and Bearer tokens.
The main database holds the library, the evaluation cache, the explanation cache, and the network caches. It runs in WAL mode with a 5-second busy timeout.
games#| Column | Type | Description |
|---|---|---|
id | TEXT (PK) | MD5 hash of the PGN content |
white, black | TEXT | Player names |
result | TEXT | 1-0, 0-1, ½-½, * |
date, event | TEXT | PGN metadata |
white_elo, black_elo | TEXT | Ratings |
time_control, speed_category | TEXT | Raw control and Bullet/Blitz/Rapid/Classical |
eco, opening | TEXT | Opening classification |
termination, termination_mode | TEXT | How the game ended |
source | TEXT | file, chesscom, lichess |
starting_fen, chess960 | TEXT / INTEGER | Non-standard starts and Chess960 |
book_exit_ply | INTEGER | Where the player left theory |
white_opening_acc, black_opening_acc | REAL | Phase accuracy |
white_middlegame_acc, black_middlegame_acc | REAL | Phase accuracy |
white_endgame_acc, black_endgame_acc | REAL | Phase accuracy |
white_pieces_hung, black_pieces_hung | INTEGER | Hanging-piece counts |
white_brilliant_count, black_brilliant_count | INTEGER | Brilliancy counts |
white_great_count, black_great_count | INTEGER | Great-move counts |
move_count, last_fen | INTEGER / TEXT | Denormalized list metadata |
pgn | TEXT | Full PGN |
summary_json | TEXT | Accuracies, classifications, tactics, status |
moves_json | TEXT | Serialized MoveAnalysis list |
ai_summary | TEXT | Cached Coach game summary |
timestamp | REAL | When the record was written |
Indexes cover lower-cased player names, timestamp, speed category, date, opening, source, and move count.
analysis (evaluation cache)#| Column | Type | Description |
|---|---|---|
id | TEXT (PK) | SHA256(FEN|multipv:N) |
fen | TEXT | Position |
engine_params | TEXT | JSON of engine settings |
depth | INTEGER | Search depth of the cached result |
result | TEXT | JSON of the Multi-PV result |
A row is reused only when cached_depth >= requested_depth. The cache is pruned in batches once it
exceeds analysis_cache_max_entries.
move_explanations (Coach cache)#| Column | Type | Description |
|---|---|---|
id | TEXT (PK) | Stable explanation key |
fen_before | TEXT | Position before the move |
move_uci | TEXT | Move |
model_name | TEXT | Provider and model |
lang_code | TEXT | Language |
prompt_version | TEXT | Bumped when prompts change |
explanation | TEXT | Validated narrative |
feedback | INTEGER | Optional thumbs feedback |
created_at | INTEGER | Unix timestamp |
| Table | Contents |
|---|---|
api_game_cache | Fetched Chess.com and Lichess game lists |
explorer_cache | Normalized FEN to Lichess explorer JSON |
api_profile_cache | Player profiles, avatars, and fetch timestamps |
Profile entries remain visible offline after their TTL and are deleted after a 90-day grace period.
A derived index built from the bundled Lichess ECO TSV files. Rebuild it from Settings → Data & Storage → Rebuild Index.
| Table | Purpose |
|---|---|
opening_nodes | Normalized FEN positions, unique per fen |
opening_edges | parent_id, child_id, move_san |
node_openings | node_id, eco, opening_name |
opening_book_metadata | Schema version and import timestamp |
Retention
| Setting | Default | Range | Applies |
|---|---|---|---|
Explanation cache TTLHow long LLM explanations are reused. 'Never expire' keeps them forever.explain_cache_ttl_daysadvanced | 30 | 7–365 | live |
Explorer cache TTLHow long cached opening-explorer responses are reused.explorer_cache_ttl_hoursadvanced | 48 | 1–8760 | live |
Cached evaluations keptOldest cached engine evaluations are pruned beyond this count.analysis_cache_max_entriesadvanced | 250000 | 10000–1000000 | live |
Lowering the evaluation capacity prunes the oldest entries immediately. Enabling Advanced Settings reveals the full set of retention controls.
Backups are consistent snapshots written with SQLite's online backup API, so a live WAL writer cannot produce a torn file.
chess-analyzer-backup-YYYYMMDD-HHMMSS.dbgames schema, previews the file
(games, analyses, explanations, schema version), and keeps a pre-restore safety copyanalysis_cache.db. openings.db is derived and can be rebuiltGame history exports every metadata and summary field. The header comes from GAME_CSV_COLUMNS and
must not be renamed if you want to import the file again. Duplicate game IDs are skipped.
From Settings → Data & Storage:
VACUUM plus a WAL checkpoint)chess_analyzer.log in the data directory keeps the newest 5 MB and three backups.
| Level | Contents |
|---|---|
| INFO | Engine start and stop, game load, analysis start and finish, imports |
| WARNING | Missing engine, API failures, validation fallbacks |
| ERROR | Engine and API exceptions, parse failures |
| DEBUG | UCI traffic and engine configuration |
View recent logs from the in-app feedback dialog, or follow the file:
tail -100 ~/Library/Application\ Support/ChessAnalyzerPro/chess_analyzer.log Related guides
Download Chess Analyzer Pro for Windows, macOS, or Linux. 100% free, private, and open-source.