Article may be outdated

This article is 17 days old. Some details may have changed since publication.

Hacker News·3 min read·medium

Show HN: Openleetcode – local LeetCode runner where tests live in the repo

T
therepanic
Show HN: Openleetcode – local LeetCode runner where tests live in the repo
AI Summary

Openleetcode is a new open-source tool that allows developers to run LeetCode coding challenges locally using Docker containers. It enables users to manage test suites and execution environments directly within their own repositories.

Why it matters

It provides a more flexible and transparent way for software engineers to practice coding problems compared to proprietary web-based platforms.

Dive DeeperCreate a free account to unlock

"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

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.

curl -fsSL https://raw.githubusercontent.com/therepanic/openleetcode/main/install.sh | sh Windows PowerShell:

irm https: // raw.githubusercontent.com / therepanic / openleetcode / main / install.ps1 | iex Docker:

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologyeducation

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in