Getting Started
install, run, REPL, hello world, comments
A little language we built because we kept wishing one existed. Friendly syntax, a standard library that actually does things, and one feature we're quietly proud of — stencils, first-class data templates you stamp out like cookie cutters.
grab the installer
Download the Windows installer and run it — it adds the stencil command to
your PATH and associates .st files. Then write some code and run it.
stencil hello.st # run a file
stencil # start the REPL
the 60-second taste
Functions, OOP, and the signature stencil data template — all in one tiny program.
// functions, OOP, and the unique `stencil` data template
stencil User(name, age) {
name: name,
adult: age >= 18,
tag: name + "#" + age
}
let u = User!("Mochi", 20);
print(u.tag, "adult?", u.adult); // Mochi#20 adult? true
for n in [1, 2, 3, 4, 5] {
print(n, "squared is", n * n);
}
what's in the box
The signature feature — first-class data templates you stamp out with !. Structured data without the boilerplate.
Variables, int/float/string/bool/null, f-strings, full control flow — if/elif/else, while, for, foreach, loop, ternary.
func, arrow functions, recursion, plus class and model with this and methods.
Lists and dicts with indexing and a full set of methods, so you spend time on logic, not plumbing.
Files, OS, JSON, regex, dates, math, random — the everyday stuff, ready out of the box.
HTTP client, TCP sockets, and a built-in web server for scripts that talk to the world.
Terminal and pixel graphics, input handling, and sound — enough to make small games.
A SQLite layer baked in, for when you need to actually keep your data around.
Modules and packages via import and stencil install, then compile to a native exe or distribute over pip.
how to learn it
The tutorials run from zero to full applications — 16 lessons, every one with runnable examples. The trick is to actually run them.
.st file and run it: stencil example.st.the full course
Sixteen lessons, zero to full applications. Read each one right here in your browser, or download the Markdown to keep. These docs are written for both people and AI assistants to learn STencil from — drop them into your model's context and it can write STencil too.
install, run, REPL, hello world, comments
let, int / float / string / bool / null
math, comparison, logic, f-strings
if/elif/else, while, for, foreach, loop, ternary
func, arrow functions, recursion
lists, dicts, indexing, methods
class, model, this, methods
first-class data templates
try / catch
import, stencil.json, stencil install
files, OS, JSON, regex, dates, math, random
HTTP client, TCP sockets, web server
terminal + pixel graphics, input, sound
SQLite
native exe, pip, installer
every keyword, operator & built-in function