Lever is a small esoteric programming language inspired by Minecraft Redstone, implemented in Python, where programs move byte values through Redstone-like components.

Stars

2

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It turns Minecraft Redstone concepts into a complete interpreter with its own lexer, parser, AST, runtime, examples, and unit tests, all using only the Python standard library.

Who it is for

  • Programming language hobbyists and esolang enthusiasts
  • Minecraft players curious about Redstone-inspired coding
  • Python developers learning how interpreters are built
  • Educators or learners looking for a playful way to explore language design

Use cases

  • Experimenting with Redstone-inspired syntax and byte-oriented programming
  • Learning interpreter components such as lexing, parsing, ASTs, and runtime evaluation
  • Demonstrating ASCII/byte manipulation and conditional input handling in a small language
  • Teaching language design concepts through a documented, testable codebase

Strengths

  • No third-party Python runtime dependencies
  • Includes runnable examples and a unit test suite for lexer, parser, and runtime
  • Clear project layout with source, tests, and a language specification
  • Supports features like input observers, multiple storage types, and Redstone-like instructions

Considerations

  • Requires Python 3.12 or newer
  • Esoteric and byte-oriented, so it is not intended for general-purpose programming
  • Examples focus on text input and ASCII/byte values
  • Independent project not affiliated with Mojang or Microsoft

README quick start

Lever

Lever is a small, esoteric programming language inspired by Minecraft Redstone. Programs move byte values through Redstone-inspired components such as chests, hoppers, dust, repeaters, observers, comparators, pistons, and lamps.

The interpreter is written in Python and includes a lexer, recursive-descent parser, abstract syntax tree, runtime, stack-based storage, examples, and unit tests.

[!IMPORTANT] Disclaimer

Lever is an independent programming language inspired by Minecraft's Redstone mechanics and terminology. It is not affiliated with, endorsed by, sponsored by, or associated with Mojang Studios or Microsoft. Minecraft is a trademark of Microsoft/Mojang.

Requirements

  • Python 3.12 or newer
  • A terminal capable of reading standard input
  • No third-party Python packages

Check your installed Python version with:

python --version

On Windows, the Python Launcher can be used to select a specific version:

py -3.12 --version

Setup

Clone or download the project, then open a terminal in the project directory.

Windows PowerShell

py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python --version

If the py launcher is not available, use the Python executable directly:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

PowerShell may require permission to run activation scripts. If activation is blocked for your user account, run PowerShell once with the following command and then activate the environment again:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

macOS and Linux

python3.12 -m venv .venv
source .venv/bin/activate
python --version

The project has no runtime dependencies to install. When finished, leave the virtual environment with:

deactivate

Run a program

Run the interpreter as a Python module from the project root:

python -m src.main examples/hello.lever

Programs must use the .lever extension. The interpreter reports syntax and runtime errors in the terminal and returns a non-zero exit status when execution fails.

Examples

Hello world bytes

examples/hello.lever demonstrates storing ASCII bytes in a Chest, transferring them in valid Hopper batches, and printing them with Slime_Piston:

RedstoneBlock hello.lever

Chest 33,100,108,114,111,87,32,111

Description

Lever is a Minecraft-inspired programming language.

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482