Democraft

Installation

Install Democraft from npm or set up the contributor workspace.

Use Democraft in a project

Install the CLI and authoring API as development dependencies:

npm install --save-dev @democraft/cli@beta @democraft/core@beta
npx playwright install chromium

Chromium is required for capture. Once your target app is running, validate or render a demo directly:

npx democraft validate demo.ts
npx democraft render demo.ts -o demo.mp4
npx democraft studio demo.ts

Pre-release

Democraft is currently published as a beta. Use the @beta tag while the API is still evolving.

Contribute from source

Prerequisites: Node.js 20 or newer and pnpm 9 or newer.

git clone https://github.com/felipersas/democraft.git
cd democraft
corepack enable
pnpm install
pnpm build
pnpm exec playwright install chromium

Verify the workspace:

pnpm lint
pnpm typecheck
pnpm test

Workspace packages resolve from their compiled dist/ directories. Build once after installation; Turbo rebuilds changed dependencies on later workspace commands.

Troubleshooting

Workspace packages not found

If source development reports Cannot find module '@democraft/...', run pnpm build from the repository root.

Playwright browser missing

If capture reports Executable doesn't exist, run pnpm exec playwright install chromium.

On This Page

On this page