Documentation
Scripts
pnpm script reference for Motoko Base — dev, build, quality checks, and database commands.
Open inChatGPT (opens in a new tab)Claude (opens in a new tab)Cursor (opens in a new tab)pnpm script reference for Motoko Base — dev, build, quality checks, and database commands.
Motoko Base uses pnpm. Scripts are defined in package.json. Requires Node.js ≥ 22.
Application
| Command | Purpose |
|---|---|
pnpm dev | Start the Next.js development server (http://localhost:3000) |
pnpm build | Production build (next build) — run before deploy |
pnpm start | Run the production server after pnpm build |
postinstall runs fumadocs-mdx automatically after pnpm install to compile documentation content.
Quality checks
Run these before committing or after AI-assisted changes:
| Command | Purpose |
|---|---|
pnpm lint | ESLint |
pnpm typecheck | TypeScript (tsc --noEmit) |
pnpm test | Vitest unit tests |
Recommended full check (also in AGENTS.md):
pnpm lint && pnpm typecheck && pnpm test && pnpm build| Command | Purpose |
|---|---|
pnpm audit | Dependency security audit |
Database
| Command | Purpose |
|---|---|
pnpm db:generate | Generate a Drizzle migration from schema changes |
pnpm db:migrate | Apply pending migrations to the database |
pnpm db:studio | Open Drizzle Studio to browse tables |
Typical schema workflow:
pnpm db:generate && pnpm db:migrateSee Migrations for when to use each command.
Configuration Reference — Where config files live.
Troubleshooting — Common issues and fixes.