Skip to content

Quickstart

Requires Install (stable Rust; Node for UI / codegen paths). Pick one path. They are independent.

Path A: Playground (no server)

In-tab wasm engine. Durable OPFS when the browser allows it; otherwise session memory.

Hosted: play.eelgrass.dev

Local:

bash
cd clients/studio && npm install && npm run build:wasm && npm run dev:playground
# open http://127.0.0.1:5173/?local=1

On a phone: Examples → Build or Code → Results, with sticky Run in the footer. Details: Playground.

Path B: eelgrass run with examples

Open (or create) a local database directory, apply a schema, execute query files, print rows:

bash
cargo run -p eelgrass-cli -- run ./mydb examples/demo_schema.eel examples/demo_queries.eel

demo_queries.eel inserts sample users, then filters and selects. Schema is examples/demo_schema.eel (Users with Money, enums, @index on email).

More sample language: examples/storefront.eel, named queries under examples/queries/. See Examples.

Path C: Studio (serve-backed)

Studio is a Vue UI over eelgrass serve. Studio talks to the HTTP API. It does not open page files itself.

HMR (API on :8787, UI on :5173):

bash
cd clients/studio && npm run dev

CLI serves a built dist and opens the browser:

bash
cd clients/studio && npm run build:wasm && npm run build && cd ../..
cargo run -p eelgrass-cli -- studio ./mydb-studio examples/demo_schema.eel --ui clients/studio/dist

The URL includes a bearer token. Use the Examples rail for runnable demos; toggle Write mode before mutations.

Details: Studio.

Path D: Named queries + TypeScript codegen

Named .eel files are the primary app surface (sqlc-like). From clients/typescript:

bash
cd clients/typescript && npm install && npm run build
node bin/eelgrass-codegen.mjs --config ../../examples/eelgrass.config.json

Config (examples/eelgrass.config.json) points at demo_schema.eel and queries/**/*.eel, and writes under outDir.

Typecheck named queries without codegen:

bash
cargo run -p eelgrass-cli -- typecheck-queries examples/demo_schema.eel examples/queries/users.eel

Details: Named queries and TypeScript client.

Where next

Pre-alpha. Local-first. Stdlib-only Rust engine. Tenant concerns shifted left into the database.