"There are no magic machines and no magic operators." - DHH
openleetcode is a local LeetCode runner built around open test suites, made in Haskell.
It takes a normal solution file, finds the matching problem manifest, builds a tiny language-specific harness, sends it to a pluggable execution backend, and judges the result locally. The tests live in the repo. The runtime templates live in the repo. The CLI is just the glue.
$ openleetcode submit ./solution.py --id 1 $ openleetcode submit ./solution.rs --title two-sum
Demo
Install
You need Docker for the execution backend. On Linux and macOS the installer will try to start the default Piston backend for you through Docker Compose. On Windows, the installer only installs the CLI. Bring Docker yourself and start the backend manually.
... continue reading