A beginner-friendly programming language built in Python.
Rune uses plain-English keywords and a clean, consistent grammar that can be learned in an afternoon. It is a dynamically typed, interpreted language with closures, first-class functions, and a small but complete standard library.
spell greet(name) {
write("Hello, " + name + "!")
}
greet("world")
- Plain-English syntax —
set,write,if / otherwise,while,repeat,count from/to - Four data types —
number,word,boolean(yes/no),empty - First-class spells — functions as values, closures over their definition scope
- Loop control —
skip(continue) andstop(break) in any loop - Built-in functions —
write,input,type,length,number,word - Zero dependencies — pure Python 3.10+, nothing to install
Prerequisites: Python 3.10 or later.
git clone https://github.com/kjxcodez/rune-lang.git
cd rune-langRun a file:
python -m rune.cli.main my_program.runeStart the REPL:
python -m rune.cli.mainset name = "Rune"
set score = 0
set active = yes
if score > 90 {
write("A")
} otherwise score > 80 {
write("B")
} otherwise {
write("Try again")
}
# while loop
while count > 0 {
write(count)
set count = count - 1
}
# repeat a fixed number of times
repeat 5 times {
write("again")
}
# count over a range
count from 1 to 10 as i {
write(i)
}
spell add(a, b) {
return a + b
}
write(add(3, 7)) # 10
spell make_counter() {
set n = 0
spell increment() {
set n = n + 1
return n
}
return increment
}
set counter = make_counter()
write(counter()) # 1
write(counter()) # 2
write(counter()) # 3
| Function | Description |
|---|---|
write(…) |
Print values to stdout |
input(prompt) |
Read a line from stdin |
type(value) |
Return the type name as a word |
length(word) |
Return the character count of a word |
number(value) |
Convert to number |
word(value) |
Convert to word (string representation) |
rune/
├── lexer/ # tokenises source text into tokens
├── ast/ # AST node definitions
├── parser/ # recursive-descent parser
├── runtime/ # tree-walk interpreter, environment, builtins
├── cli/ # command-line entry point and REPL
└── tests/ # integration test suite
cd rune-lang
python -m unittest rune.tests.test_interpreter -v24 tests, all passing.
| Document | Description |
|---|---|
| Language Specification | Complete language reference |
| Architecture | How the interpreter is built |
| Glossary | Rune-specific terminology |
| Development Guide | Setup, workflow, adding features |
| Roadmap | Completed and planned features |
| Changelog | Version history |
| Contributing | How to contribute |
Completed: Lexer, Parser, AST, Interpreter, Closures, REPL, Architecture refactor.
Planned: Lists, Modules, Bytecode compiler, Virtual machine, LSP, Formatter, Package manager.
See docs/roadmap.md for the full list.
Contributions are welcome — bug reports, documentation, new features, or tooling. See docs/contributing.md to get started.
MIT License — Copyright (c) 2025 Kapil Jangid. See LICENSE.