Weave turns plain-English page scripts into complete, production-ready HTML.
Weave pages like you'd knit your sweater. Stay warm! ❤️
- Describe sections, content, buttons, and layout in readable text.
- Parse script text into a typed AST with
parseWeave. - Compile that AST into a full HTML document with
compileWeave. - Use built-in themes (
modern,minimal,corporate,playful,elegant,dark). - Work visually in the editor app, then export HTML artifacts.
A page called "Helio Labs"
With a hero
Showing "Launch faster with Weave"
With subtitle "Write structure in plain English, ship full HTML"
With a primary button "Start Building"
With features
Having 3 features:
"Fast authoring" with description "No class-level styling setup needed"
"Deterministic output" with description "Compiler emits stable HTML"
"Portable delivery" with description "Export static files instantly"
Using modern theme
This script is parsed and compiled into a full webpage with styling and behavior included.
- Bun
1.1+ - Node.js
20+
bun installcp .env.example .envbun run devOpen http://localhost:3000.
# Next.js standalone build
bun run build
# Static export for GitHub Pages
bun run build:staticnpm install @rotsl/weaveimport { parseWeave, compileWeave } from '@rotsl/weave';
const script = `
A page called "My Site"
With a hero
Showing "Hello from Weave"
Using minimal theme
`;
const html = compileWeave(parseWeave(script), { minify: true });
console.log(html);Use Weave to generate a launch page during CI build:
- Keep a
.weavescript in your repo. - Parse and compile it in a build script using
@rotsl/weave. - Publish the resulting HTML as an artifact or static site.
weave/
├── .github/
│ ├── FUNDING.yml # Buy Me a Coffee funding link
│ └── workflows/
│ ├── ci.yml # CI on push/PR + manual dispatch
│ ├── deploy.yml # GitHub Pages deploy on push + manual dispatch
│ └── publish-npm.yml # @rotsl/weave publish on push + manual dispatch
├── docs/
│ ├── README.md # docs index and reading order
│ ├── HowToUseWeave.md # hands-on usage guide
│ ├── syntax.md # language reference
│ └── examples.md # runnable scripts
├── packages/
│ └── weave/
│ ├── src/ # package source (parser/compiler/themes)
│ ├── package.json # @rotsl/weave metadata
│ ├── README.md # package usage docs
│ └── LICENSE # package license copy
├── src/ # editor app source
├── public/ # static assets
├── CONTRIBUTING.md # contribution workflow and standards
├── CODE_OF_CONDUCT.md # community behavior expectations
├── SECURITY.md # vulnerability reporting process
├── CHANGELOG.md # release history
├── LICENSE # repository license
└── README.md # project overview
CIruns on pushes tomain/master/develop, PRs to those branches, and manual dispatch.Deployruns on pushes tomain/masterwhen app files change, and manual dispatch.Publish Weave to npmruns on pushes tomain/masterwhenpackages/weave/**changes, and manual dispatch.
@rotsl/weave metadata points to the GitHub repo and package subdirectory, so npm users can navigate directly to source/docs on GitHub.
- See
CONTRIBUTING.md - See
SECURITY.md - See
CHANGELOG.md - See
CODE_OF_CONDUCT.md