This is a python application dedicated to creating chess puzzles for lichess.org. However it can easily be adapted to create puzzles from personal games.
This script requires the Requests and Python-Chess libraries to run, as well as a copy of Stockfish
pip install requests
pip install python-chess
MacOS / Linux : sh build-stockfish.sh
to obtain the current lichess Stockfish instance.
python main.py <Secret API Token> <#Threads = 4> <Hash (MBytes) = 2048>
If your system has systemd, you can use the service file provided, it is tuned for a local virtualenv in a dedicated user account. If you run it as root with system-wide pip packages, use ExecStart=/usr/bin/python main.py --quiet $key $instance $threads