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

CommandPurpose
pnpm devStart the Next.js development server (http://localhost:3000)
pnpm buildProduction build (next build) — run before deploy
pnpm startRun 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:

CommandPurpose
pnpm lintESLint
pnpm typecheckTypeScript (tsc --noEmit)
pnpm testVitest unit tests

Recommended full check (also in AGENTS.md):

pnpm lint && pnpm typecheck && pnpm test && pnpm build
CommandPurpose
pnpm auditDependency security audit

Database

CommandPurpose
pnpm db:generateGenerate a Drizzle migration from schema changes
pnpm db:migrateApply pending migrations to the database
pnpm db:studioOpen Drizzle Studio to browse tables

Typical schema workflow:

pnpm db:generate && pnpm db:migrate

See Migrations for when to use each command.


Configuration Reference — Where config files live.

Troubleshooting — Common issues and fixes.