Language Reference
A ProxyLang file (.pxy) describes a whole application — pages, data, commerce, state machines, and agents — as indented, human-readable text. This page is the reference for every block, with the real syntax the proxyweb runtime parses today.
File shape & syntax rules
ProxyLang is whitespace-structured — there are no braces and no semicolons. A block is a header line followed by an indented body; nesting is by indentation, like YAML or Python.
block headerA keyword and optional name on its own line — page Home:, machine Turnstile.key: valueA property line inside a block, e.g. route: then an indented /about, or inline price: 28.00.a | b | cThe pipe separates fields on one line — stat: 1 file | site defined in | .pxy.# commentEverything after # is ignored. (A #hex color must be on its own value line, not after a space.){{name}}A binding — substituted from a named query at render time (see Data & bindings).site
The top-level block. It names the app and can carry the data contract — a schema: (tables),mutations: (the only writes allowed), and queries: (named reads). Everything else nests conceptually under the site.
site "Guestbook" schema: CREATE TABLE IF NOT EXISTS entries ( id INTEGER PRIMARY KEY, name TEXT, message TEXT, created TEXT) mutations: sign: INSERT INTO entries (name, message, created) VALUES (:name, :message, datetime('now')) queries: recent: SELECT name, message FROM entries ORDER BY id DESC
A form can only run a pre-declared mutations: template, with its :placeholders bound to submitted fields — never free-form client SQL. Reads come only from named queries:. The write surface is fixed at definition time, so it shows up in review.
theme & direction
Styling is a small set of tokens — the rest is supplied by the Brevet design system. Use a direction: shorthand, or a full theme: block.
theme: system: brevet direction: modern-minimal accent: slateblue # CSS color name, or a #hex on its own line page: #eef1f6 panel: #f3f5fa surface: #ffffff radius: 14px
systemDesign system to render through (brevet).directionA curated look: modern-minimal, and others.accentPrimary accent — a CSS color name, or a #hex on its own value line.page · panel · surfaceBackground layers, lightest to the card surface.radiusCorner radius applied across components.nav, footer & auth
Site chrome and a built-in sign-in flow. auth: wires a login route, a gated account route, and preset users (preview-grade credentials).
nav: link: Shop | / link: Store | /store link: Account | /account footer: paragraph: Proxy Shop — defined in one .pxy and audited end to end. auth: login: /signin account: /account user: demo@proxy.dev | proxy123 | Demo Shopper
page & route
Each page declares a route: and a tree of content blocks. Pages with no live bindings are pre-rendered to cached bytes at boot and served on an O(1) route lookup.
page Home: route: / heading: ProxyCore, served from one .pxy paragraph: This whole site is defined in a single ProxyLang file. stat: 1 file | site defined in | .pxy callout success: Parsed once at startup; served as cached bytes. divider feature: Native execution | The state machine runs in-process. list: Indentation surface, no braces Brevet data-brevet markup list ordered: Parse the .pxy Lower the site block Pre-render each page
heading / paragraphA section heading and body copy.stat: a | b | cA figure with a label and unit.callout success: …A highlighted note (variant after the keyword).dividerA horizontal rule.feature: title | bodyA titled feature row.list / list orderedBulleted or numbered items, one per indented line.button primary: Label | /hrefA call-to-action linking to a route.Layout: section, card & grid
Group content with section (optionally a layout: like split or dashboard), put figures in a card, and lay out repeated items in a grid.
page Store: route: /store section frame: layout: dashboard grid catalog: product_card Tee: heading: Proxy Tee paragraph: Soft cotton tee with the ProxyCore mark. price: 28.00 USD button primary: Add to cart | /cart/add?sku=tee
Charts & tables
Charts and tables are filled per request from named queries:. A chart binds {{query}} (one numeric column); a multi-series line binds {{query.column}}. A table id: is filled by the query whose name equals its id — columns and rows in SELECT order. Axes auto-scale; no JavaScript is emitted.
card revenue: heading: Revenue by month bars r: values: {{revenue}} unit: $ card traffic: heading: Traffic line t: legend: Sessions | Signups series: {{traffic.sessions}} | accent series: {{traffic.signups}} | coral table orders: head: loading… row: loading…
Forms
A form renders typed fields and, on submit, runs the matching mutations: template — binding each field to a :placeholder. Field types map to inputs and to schema validation.
form settings: field name: Display name email email: Email password password: New password number age: Age select plan: Free Pro Team toggle marketing: Email me product updates textarea message: Notes submit: Save changes
field id: LabelA single-line text input.email · password · numberTyped inputs with matching validation.select id:A dropdown; options are indented lines.toggle id: LabelA boolean switch.textarea id: LabelA multi-line text input.submit: LabelThe submit button; runs the mutation named like the form.commerce
A commerce block defines a catalog and a checkout. Products carry a sku, price, type, and fulfillment; the checkout names a provider and the success/cancel routes. The cart and order lifecycle are handled by the runtime and audited.
commerce Shop: currency: USD product Tee: type: physical sku: tee name: Proxy Tee price: 28.00 fulfillment: ship checkout: provider: mock # mock | stripe (with --features http) success: /success cancel: /store
machine / thing
A machine (alias thing) is a governed state machine. It declares states:, event handlers (when <event>:), conditional handlers (if <condition>:), named procedures, and an audit: list. state = X is a checked transition — X must be a declared state, so typos and illegal moves are caught at parse time. Firing an event records a tamper-evident audit entry per action.
machine ChargeStation states: idle charging finishing maintenance when plug connects: state = charging start session timer when charge completes: state = finishing unlock connector finishing: # a named procedure (reusable steps) finalize payment print receipt if payment fails: state = maintenance notify operator audit: log session log payment result
states:The declared states; the first is the initial state.when event:Run when the named event fires.if condition:A conditional handler.state = XA checked transition to declared state X.name:A named procedure — a reusable group of steps.audit:What the machine records when it runs.The runtime exposes a machine live — POST /machine/<Name>/fire?event=<event> — and (in preview) persists its position so it survives a restart. The CLI can drive one too: proxy machine file.pxy --event "plug connects".
From description to real effects
The action phrases in a handler — start session timer, unlock connector — are recorded as audit entries, not executed in preview. A machine today is a governed, checked model of behavior, not a driver that flips a relay.
To make an action affect a real machine you bind a ProxyCore adapter — a Rust implementation of the runtime's Adapter trait, and the permissioned, audited bridge to a device API, a payment provider, or hardware I/O. The default adapter records without side effects; a real one runs the call under default-deny permissions with an audit entry per action. You describe the machine in ProxyLang and connect it with an adapter.
agent
An agent is governed orchestration: a model chooses which declared actions to run toward a goal, and the runtime executes each as an allowlisted mutations: write — never free-form SQL — feeding results back until done.
agent Sales goal: qualify the inbound lead and record it with a status model: qwen3.5-9b memory: crm actions: add_lead
goal:The objective the agent works toward.model:The model that drives the loop.memory:Named context the agent may read.actions:The allowlisted mutations the agent may invoke.Status
ProxyLang is in preview and private dogfooding. The blocks above are real and run on the proxyweb runtime today, but names and details can still change before general release. Reach out to evaluate early.