CLI Reference
Commands
driftgrid (no args)
Starts the Next.js dev server and opens the browser.
node bin/driftgrid.js
# → localhost:3000driftgrid init
Create a new project. Interactive when no args provided.
# Interactive
node bin/driftgrid.js init
# Non-interactive
node bin/driftgrid.js init "Acme" "Landing Page" --canvas desktopOptions:
- First arg: client name
- Second arg: project name
--canvas <preset>: a4-portrait, landscape-16-9, desktop, tablet, mobile, freeform
Creates:
projects/{client}/{project}/with 3 concept slotsprojects/{client}/brand/guidelines.md(if new client)manifest.jsonwith project metadata
driftgrid doctor
Validate project health. Checks manifests, HTML files, IDs, paths.
node bin/driftgrid.js doctordriftgrid generate-thumbs
Generate grid thumbnails for all projects.
node bin/driftgrid.js generate-thumbsRequires Playwright. Thumbnails are cached in .thumbs/ directories.
npm Scripts
| Script | Purpose |
|---|---|
npm run dev | Start dev server |
npm run build | Production build |
npm run mcp | Start MCP server |
npm run init | Alias for driftgrid init |
npm run doctor | Alias for driftgrid doctor |
npm run generate-thumbs | Alias for thumbnail generation |
npm run export-pdf | Batch PDF export |
npm run export-png | Batch PNG export |
Last updated on