ARKlight

A Python-first compiler for websites. Write pages as ordinary Python; ship plain HTML, CSS and a small fixed JavaScript runtime. The browser never runs Python.

pip install arklight
arklight build site.py

You write

# include <stdlib.ARKlight>

site = Site()

@site.page("/")
def home():
    return Page(
        Heading("ARKlight"),
        State("count", 0),
        Text(Bind("count")),
        Button("Increment", on_click=Action.increment("count", 1)),
        title="Demo",
    )

You ship

A static folder you can serve from anything:

index.html

, a stylesheet, one fixed

arklight.js

runtime, and an

sbom.txt

.

The button above is wired to live reactive state, with no JavaScript written by hand.

Python needs to be 3.10 or newer, and only at build time.

What you get

Python in, static out

Describe pages as Python function calls. ARKlight validates them against a closed vocabulary, then compiles them to HTML, CSS and a fixed JS runtime.

Open

Compiler first, runtime last

Routing, validation, dependency resolution and CSS happen at build time. The browser runtime only handles what needs a browser: input, local storage, viewport, reactive state, URL state.

Open

A closed vocabulary

The compiler knows every component and behavior that can exist. No arbitrary JavaScript expressions are evaluated at runtime.

Open

Components that compile away

User-defined components expand during compilation, so the abstraction does not survive into the generated site.

Open

Package it your way

Pack a build into a single sealed `.ark` bundle, make it a PWA, or deploy it to Cloudflare Workers with `arklight deploy`.

Open

Diagnostics with a voice

Rei, the compiler narrator, can narrate a build in plain sentences with `--narrate`.

Open

Open, inspectable repos

Both the compiler and this website are public on GitHub: read the source, file an issue, send a pull request.

Open

Start here

New to ARKlight? Go to

Getting started

, then work through the

tutorial

. Already building something? The

reference

and the

gotchas

will save you a few build cycles.