Try Termin
A working installation takes a few minutes. Every command below has been tested on a fresh machine.
# Prerequisites
- Python 3.11 or later. Check with
python --version. - pip and git. Both standard with most Python installs.
- A terminal. macOS, Linux, and Windows (PowerShell or Git Bash) all work.
If python --version prints 3.10 or earlier, upgrade before continuing. Termin uses features that are not available in older versions.
# Install
Clone the compiler repository and install it in editable mode.
git clone https://github.com/jamieleigh3d/termin-compiler.git
cd termin-compiler
pip install -e .
The install pulls in the reference runtime and its dependencies (FastAPI, SQLite bindings, a parser, an expression evaluator, and Jinja2).
Verify the install:
termin --help
If you see the Termin CLI help, the install worked.
# Compile your first example
The repository ships with a warehouse-management example at examples/warehouse.termin. It is roughly 120 lines and exercises most of the language.
termin compile examples/warehouse.termin
The compiler produces warehouse.termin.pkg in the current directory — a ZIP archive containing the compiled IR (intermediate representation — the JSON artifact the runtime consumes), the original source, a manifest, and SHA-256 checksums for each file.
# Run it
python -m termin.cli serve warehouse.termin.pkg
The reference runtime starts on http://localhost:8100. Open it in a browser.
You will see a role selector. The warehouse example declares several roles (warehouse_admin, warehouse_operator, and a read-only role). Pick one, and the presentation layer renders the pages that role is permitted to see. Pick a different role, and the same URL renders different content — role-appropriate redaction and page visibility happen server-side.
A few things to try:
- Create a product as
warehouse_admin. Theinventory.adminscope is required to create or delete. - Switch to the operator role. The "Delete" action disappears from the UI because the scope is not granted, and the underlying API call would be rejected even if you made it by hand.
- Move a product from
drafttoactive. The transition is defined in the.terminsource; the runtime rejects any transition not declared there.
Hit any API endpoint directly:
curl http://localhost:8100/api/products \
-H "Cookie: termin_role=warehouse_admin"
# Read the source
The example file is worth reading end-to-end:
cat examples/warehouse.termin
Every behaviour in the running app — every page, every permission, every state transition — is declared in that file. There is no separate configuration, migration, or access-control layer to inspect.
# What next
Four paths from here:
- Read the guarantees — what the language and runtime structurally enforce, with links to the conformance test backing each claim.
- Read the runtime implementer's guide — at
docs/termin-runtime-implementers-guide.mdin the compiler repo. The contract any conforming runtime must satisfy. - Try a larger example. The repository includes
helpdesk.termin(ticket tracker),projectboard.termin(project management board with deep foreign-key chains), andcompute_demo.termin(event-driven computations). Compile and serve them the same way. - Contribute — file bugs, propose features, or write a conforming runtime in another language.
If the quickstart above did not work on the first try, that is a bug. Please file it at github.com/jamieleigh3d/termin-compiler/issues with the exact command you ran and the full error. The quickstart is the highest-trust-cost page on this site — a broken first install is the worst thing we can ship.