Created to make post-game analysis as convenient as in the browser, but faster.
-
ChessHue registers
chess://
protocol handler, which makes it easy to start the application directly from the browser, after any game on sites like Chess.com or Lichess, with the PGN automatically filled in. See below for details. -
Engines usually evaluate moves that result in repeating a given position the same as the actual winning moves, which makes it harder to see what should've been played to convert the advantage. In ChessHue there's an option called "Prevent repetitions", which fools the engine into thinking that the position has already appeared twice and so the next repetition would be a draw.
-
Other applications classify your moves as mistakes, blunders, etc. Since these categories are arbitrary and impossible to define unambiguously, ChessHue rates moves using a continuous color scale instead.
- Node.js (tested with version 20)
- Chess engine: any UCI-compliant engine should theoretically work, but only Stockfish has been tested.
- OS: any modern OS should theoretically work, but only Windows has been tested.
-
Download your favourite chess engine, rename the executable to
engine.exe
, and put it in the root folder of the project. -
Run
npm install
andnpm run build
, thennpm start
to start ChessHue.
After ChessHue is run once, the next time it can be started using the chess://
protocol.
You can pass your PGN in the URL, like chess://e4_e5/
.
To analyse your games in ChessHue right after they end:
-
Install a browser extension that can inject JavaScript code on any website, like Code Injector.
-
Depending on whether you play on Chess.com or Lichess, set up one of the following snippets to inject:
-
Code for Chess.com:
document.addEventListener('keydown', e => { if (e.key === 'l' && document.querySelector('.game-review-buttons-component')) { const nodes = document.querySelectorAll('.main-line-ply'); if (nodes.length > 0) { const moves = [...nodes].map(e => e.textContent.trim()); const clock = document.querySelector('.clock-bottom'); const color = clock.classList.contains('clock-black') ? 'b' : 'w'; const url = `chess://${moves.join('_')}/${color}`; window.open(url.replace('#', '%23'), '_blank'); } } });
-
Code for Lichess:
document.addEventListener('keydown', e => { if (e.key === 'l' && document.querySelector('.rematch')) { const nodes = document.querySelectorAll('l4x kwdb'); if (nodes.length > 0) { const moves = [...nodes].map(e => e.textContent.trim()); const clock = document.querySelector('.rclock-bottom'); const color = clock.classList.contains('rclock-black') ? 'b' : 'w'; const url = `chess://${moves.join('_')}/${color}`; window.open(url.replace('#', '%23').replace(/½\?/g, ''), '_blank'); } } });
-
-
After your game, press L to start ChessHue with the moves imported automatically.
Note that the code prevents you from accidentally starting the application during the game.