@christianirack/create-brainll
The BRAINLLM project initializer. Create an app:
npm create @christianirack/brainll@latest my-app
cd my-app
npm run dev
Runs the same pinned BRAINLLM compiler and installs the generated app dependencies. Pass -- --no-install to skip dependency installation.
BRAINLLM
🦀 The web compiler for LLMs, built in Rust. Blazing fast.
Your LLM owns the frontend. Give it a language built for the job.
Written in Rust, from parser to minifier. One native binary, no toolchain to install. Warm production builds
in ~34 ms, about 4.5× faster than React + Vite on our open benchmark.
BRAINLLM gives coding agents a compact language, a single specification and a native compiler written in Rust that
tells them how to fix mistakes. The model builds the frontend. You set the direction, inspect the result and decide
what ships.
.brain components compile to direct-DOM JavaScript and scoped CSS. The Rust toolchain handles parsing, checking,
code generation, bundling and minification. The agent can operate it through the CLI or MCP.
Build with it. Let your LLM make it better. Every run is a chance to spot a compiler bug, an expensive step or
a confusing diagnostic. The agent can turn that finding into a tested proposal and, when configured, push it
automatically to a review branch. Maintainers decide what merges.
Built for agents that change code safely
BRAINLLM is not another React, Next or Node, and it does not try to replace them. It aims to be the first
self-improving compiler for LLMs: when an agent hits a compiler gap, scripts/evolve.mjs turns it into an isolated,
tested proposal, and a person decides whether it ships. No change merges itself. Every claim below is a command you can
run; the numbers are under the benchmarks. The tools other stacks sell as advanced analysis are
the baseline here:
- Locate without reading.
brain map, brain card, brain graph, brain context and symbol search give an
agent the contract and the exact location of what it must touch, never a 2,000-line file.
- Measured risk before every edit.
brain risk <target> returns a deterministic score, the factors behind it
(dependents, routes, public contracts, backend schema, covering tests, SEO/i18n/a11y, budget headroom) and the
checks that will prove the edit safe.
- Atomic changes. Leased, revision-checked changesets validate the whole app on a private snapshot before
writing and recover cleanly; a stale revision is rejected instead of overwriting another agent's work.
- Real-time evidence while developing. Compiler feedback, impact per save (diagnostics and bytes per view),
runtime errors mapped to
.brain lines, memory and leak inspection, over CLI and MCP.
Visit the site · Build your first app · Read the spec · See the benchmarks · Contribute
A frontend language with the model in mind
An agent writing your app needs a contract it can follow and feedback it can act on. BRAINLLM makes that loop
explicit: read the spec, generate a component, check it, apply the fix, test the result.

- Less to guess.
brain spec defines the supported language. One component format, a prescribed project
structure and generators keep the model working inside a known contract.
- Feedback it can use. Diagnostics include the file, location, rule and proposed fix. Mechanical fixes carry
exact replacement edits;
brain fix applies them. Decisions that need judgment remain visible to the agent.
- Tools for the whole loop.
brain map --json, brain check --json, brain doctor and brain build let the
agent inspect, validate and compile its work. brain mcp exposes tools over stdio.
- Output for the browser. Signals update the affected DOM nodes. The toolchain includes its own compiler,
bundler and minifier, with no Vite, webpack, esbuild or Babel in the build pipeline.
BrainScript builds on HTML, CSS and a constrained subset of JavaScript. It is designed to reduce the choices an
agent has to reconstruct while preserving code that a developer can read and review.
What your agent gets to work with
| Capability |
What it does for the app-building loop |
| A served language contract |
brain spec gives the model the implemented syntax and conventions |
| Task playbooks |
brain guide <topic> (also MCP brain_guide): steps, checks, common mistakes and an example per task (views, data, forms, server, SEO, accessibility, WebMCP, tests, i18n, performance) |
| Components and reactive state |
.brain files combine markup, BrainScript and scoped styles; sig, drv and fx express updates |
| Forms and data |
Form validation, HTTP resources and server contracts give common app behavior a documented path |
| Routes and layouts |
Views, layouts, loaders and guards put navigation and access checks into the project structure |
| Diagnostics and repairs |
JSON diagnostics identify failures; supported mechanical edits can be applied with brain fix |
| Context and automation |
The project map, focused reads, CLI and MCP tools let an agent inspect and operate the app |
| Verification and delivery |
Tests, brain doctor and the production build make validation part of the workflow |
| Tested compiler improvements |
Isolated proposals, validation gates and optional review-branch pushes let the agent contribute fixes |
Use SPEC.md, the served brain spec and EVOLUTION.md for exact contracts and limits.
Where it fits in the frontend stack
These tools occupy different layers. This is a comparison of their roles, not a universal speed ranking. Linked
project documentation describes each tool; the BRAINLLM column explains the choice this project makes.
| Project |
Main role |
How BRAINLLM approaches that part of the job |
| React |
Library for building component-based user interfaces |
A dedicated component language, compiler and agent workflow together |
| Angular |
Web application framework with integrated tooling |
A constrained language and normative spec built around LLM authorship |
| Vue |
Progressive framework for declarative, reactive interfaces |
Prescribed component syntax and structure with compiler-guided repairs |
| Astro |
Web framework focused on content-driven sites and islands |
A language and toolchain for agent-authored frontends, with its own rendering contracts |
| Vite |
Development server and production build tooling |
An integrated Rust pipeline for .brain applications |
| webpack |
Module bundler with loaders and plugins |
Its own bundler and minifier as part of the compiler pipeline |
| BRAINLLM |
Frontend language, compiler, runtime and agent contract |
The model writes, checks and improves within one documented workflow |
Other projects also offer AI guidance and tooling. BRAINLLM's emphasis is the authoring contract itself. It does
not run existing React, Angular or Vue components unchanged, and replacing a build tool alone is not a migration.
The numerical comparison below covers only the measured React/Vite and Svelte/Vite fixture builds.
A form shouldn't need an ecosystem.
Your agent came to build a button. Your stack handed it a committee.
If setup decisions are consuming the session, give the model a toolchain with a defined contract.
BRAINLLM brings component syntax, state, forms, routing and compiler feedback into one documented workflow. Its
Rust toolchain owns the build pipeline, and the browser runtime has no third-party dependencies. Start with the
web behavior you need; give the agent a smaller set of conventions to learn and check.
Less tooling. More web.
Show me the numbers
Don't trust the headline. Run the benchmark.
If you like reading raw timings more than launch posts, this part is for you. Inspect the fixture, reproduce the
run and keep the result even when it disagrees with ours.
Seven stacks. The same dashboard workflow. 140 measured builds.
| Warm production build |
Median, 20 runs |
Standard deviation |
| BRAINLLM |
34.32 ms |
13.23 ms |
| React + Vite |
155.49 ms |
16.71 ms |
| Vue + Vite |
211.76 ms |
53.56 ms |
| Svelte + Vite |
243.53 ms |
56.14 ms |
| Astro + React island |
504.78 ms |
77.45 ms |
| Angular CLI |
1,262.50 ms |
69.03 ms |
| React + webpack |
1,334.54 ms |
560.99 ms |
All seven implementations passed the same nine Chrome interaction checks, including create, search, edit and delete.
These measurements use frozen BRAINLLM source 7889787, Apple M5 with 24 GiB RAM, Node 26.12.0 and two warmups per
stack. Builds run serially on a shared machine. Variance matters: inspect the raw samples, especially webpack's.
The output strategies differ (including SSR, client rendering and an Astro React island); this comparison measures
production build duration for this fixture, not universal app performance or feature equivalence.
Read the expanded method, versions, payloads and results. The original three-stack
historical results remain available unchanged. Use bench/build/expanded.mjs
with the documented frozen binary and scratch-directory setup to reproduce this seven-stack run.
Ask your agent to challenge the result:
Reproduce BRAINLLM's build benchmark and tell me what the evidence supports.
First inspect bench/build/README.md, bench/build/run.sh, the frozen fixture,
the React/Svelte reference implementations and their pinned dependencies.
Explain the output differences and required tools before running anything.
Run bench/build/run.sh in an isolated workspace using its documented settings.
Keep the compared fixture implementations unchanged. Record the compiler hash,
tool versions, hardware, machine load, warmups and sample count. Preserve the
raw timings and report cold and warm medians in ms, plus the measured HTML,
CSS and JavaScript payload in KiB gzip with every excluded asset identified.
Compare the local results with the checked-in results. Report failures,
limitations and regressions as observed. Do not claim a win unless the actual
numbers support it. Do not upload results or publish anything automatically.
Clean up only the temporary resources this run created.
A separate cache-key microbenchmark measured 43.3× faster key
lookup after removing an unnecessary parse: 10,000 lookups of a 1,050-byte input. That number measures this
internal operation only. It is not a full-build speedup or a webpack comparison.
The benchmark report also tracks agent-generated apps, browser behavior, payload size and
failure recovery. Historical LLM results describe their frozen model/spec/compiler runs; they do not guarantee
that a new prompt or compiler revision will pass. This project is open to developers and researchers who want to
investigate how language design and compiler feedback affect agent behavior. Bring a hypothesis and a reproducer.
The compiler pipeline is written in Rust. Browser automation drives real Chrome through CDP for interaction and
regression checks. Those checks establish the flows they exercise; they do not imply universal browser or app
compatibility. The repository's recorded LLM evaluations identify the models, tasks and frozen revisions so you can inspect
what each result actually establishes.
Tools for an agent that finishes the job
| The agent needs to… |
The compiler provides… |
| Start with consistent files |
Generators for views, components, channels, services, typed APIs, schemas, route guards and server modules |
| Refactor without guessing imports |
Checked AST edits for props, component-file rename, move and extraction |
| Inspect what it built |
Chrome screenshots, accessibility outlines and explicit visual baseline comparisons |
| Keep routes small |
Enforced viewKB budgets for emitted JS + CSS + HTML |
| Defer optional UI |
Visible, idle or keyboard-accessible interaction loading; async image decoding |
| Fix and verify |
brain doctor --fix applies mechanical edits before the full quality check |
| Let you try production output |
A temporary local brain preview server with owned-process cleanup |
Browser tooling and the preview supervisor currently require macOS or Linux. Screenshot baselines need stable browser,
font and app-data inputs. Runtime mount-time/heap budgets remain planned; the compiler rejects those settings rather
than pretending to measure them. See the implemented contract and tool internals.
Give your agent its first task
Connect your coding agent. Tell it what to build. Try the app.