Database & Development Tools
ContractSpec has no proprietary CLI. Use standard tools like Prisma, tsc, and your build system. Specs are pure TypeScript served at runtime.
No Code Generation Required
Unlike GraphQL or gRPC, ContractSpec specs are TypeScript modules that get imported directly. There's no compilation step, no codegen, no CLI to install. Just write your spec, register it, and serve it with an adapter like makeNextAppHandler.
Database Management
Use Prisma CLI directly for all database operations:
prisma
Standard Prisma CLI for database management
Usage:
npx prisma <command>
Common commands:
npx prisma generate # Generate client from schema npx prisma migrate dev # Create and apply migration npx prisma migrate deploy # Apply migrations in production npx prisma db seed # Run seed script npx prisma studio # Open database GUI
Custom database scripts
Project-specific database helpers (if using @lssm/app.cli-database)
Usage:
bun database <command>
Common commands:
bun database generate # Wrapper for prisma generate bun database migrate:dev # Dev migrations with extras bun database seed # Custom seeding logic
Development Workflow
# 1. Start your dev server (Next.js, Bun, etc.)
npm run dev
# 2. Make database schema changes
# Edit prisma/schema.prisma
# 3. Apply migrations
npx prisma migrate dev --name add_user_roles
# 4. Write specs and handlers in TypeScript
# No CLI needed—just import and register
# 5. Test your operations
curl -X POST http://localhost:3000/api/ops/billing.capturePayment \
-H "Content-Type: application/json" \
-d '{"invoiceId": "inv_123", "amount": 99.99}'