@drzl/cli
v1.1.0
Published
<div align="center">
Readme
@drzl/cli
Analyze your Drizzle schema and generate validation, services, and routers.
💚 Sponsor DRZL
DRZL is crafted nights & weekends. Sponsorships keep the generators fast, tested, and free.
- Every dollar speeds up CI hardware and offsets long test runs on my aging laptop.
- Sponsors get roadmap input and priority responses in GitHub Issues.
- Prefer a quick overview? Check
docs/sponsor.mdfor the current goals and thank-yous.
Commands
- Init:
pnpm dlx @drzl/cli init - Analyze:
pnpm dlx @drzl/cli analyze <schema.ts> [--relations] [--validate] - Generate:
pnpm dlx @drzl/cli generate -c drzl.config.ts - Watch:
pnpm dlx @drzl/cli watch -c drzl.config.ts
Minimal config
import { defineConfig } from '@drzl/cli/config';
export default defineConfig({
schema: 'src/db/schemas/index.ts',
outDir: 'src/api',
generators: [
{ kind: 'zod', path: 'src/validators/zod' },
{ kind: 'service', path: 'src/services', dataAccess: 'drizzle' },
{ kind: 'orpc', template: '@drzl/template-orpc-service' },
],
});Notes
format.engine: 'auto'tries Prettier, then Biome.
