Try out worma's code generation online. Each project can be opened in StackBlitz with one click, no local setup required.
Click the button below in your browser and pick a project you're interested in to get started:
| Project | Language | Module system | Templates | Highlights |
|---|---|---|---|---|
| typescript | TypeScript | ESM | 6 | All templates + aiDoc + input fallback + minimal .wormarc config |
| esm | JavaScript | ES Module | 5 | All templates, pure JS, JSDoc type hints |
| commonjs | JavaScript | CommonJS | 4 | CJS format, all templates except ky |
| Template | typescript | esm | commonjs |
|---|---|---|---|
alova() — functional |
✅ | ✅ | ✅ |
alovaGlobals() — global |
✅ | ✅ | ✅ |
axios() — Axios |
✅ | ✅ | ✅ |
fetch() — native fetch |
✅ | ✅ | ✅ |
ky() — ky |
✅ | ✅ | ❌ * |
| Input array fallback | ✅ | — | — |
aiDoc() plugin |
✅ | — | — |
.wormarc minimal config |
✅ | — | — |
* ky is a pure ESM package and does not support the CommonJS format.
Each example project is self-contained, with pinned dependency versions, so it can be cloned and run on its own (no full monorepo environment needed).
# Option 1: enter from the full monorepo (enables local wormajs linkage)
git clone https://github.com/alovajs/devtools.git
cd devtools/examples/typescript # or esm / commonjs
npm install
npm run gen
# Option 2: clone a single example directory (just copy/download that folder)
cd examples/typescript # or esm / commonjs
npm install
npm run gen
# View the generated API code
ls src/api/Note: the examples invoke the code generator via the
wormacommand; its underlying dependency package iswormajs(installed automatically bynpm install). Running inside the full monorepo uses the localpackages/worma, while a standalone clone uses the publishedwormajsfrom npm.
examples/
├── README.md # ← you are here
├── _petstore.json # shared OpenAPI spec (Petstore 3.0)
│
├── typescript/ # TypeScript flagship project
│ ├── package.json
│ ├── worma.config.ts # 6 generators, with comments
│ ├── tsconfig.json
│ ├── .wormarc.example # minimal JSON config example
│ ├── petstore.json
│ └── src/demo.ts
│
├── esm/ # ES Module project
│ ├── package.json
│ ├── worma.config.js # 5 generators
│ ├── petstore.json
│ └── src/demo.js
│
└── commonjs/ # CommonJS project
├── package.json
├── worma.config.js # 4 generators
├── petstore.json
└── src/demo.js
- After opening the project via the button above, wait for dependencies to install automatically
- Open a terminal and run
npm run gento generate the API client code - Check the generated results of each template under
src/api/ - Edit
worma.config.tsto experiment with different configs live