@drzl/analyzer
v1.2.0
Published
<div align="center">
Readme
@drzl/analyzer
Drizzle schema → normalized analysis for fast, reliable codegen.
💚 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.
Use
import { SchemaAnalyzer } from '@drzl/analyzer';
const analyzer = new SchemaAnalyzer('src/db/schemas/index.ts');
const analysis = await analyzer.analyze({
includeRelations: true,
validateConstraints: true,
});The CLI consumes this analysis to generate validation, services, and routers.
Output (high level)
- dialect, tables, columns, keys, indexes
- relations (incl. inferred), enums
- issues (warnings/errors) for constraints and shape
Notes
- Best‑effort introspection aligned with Drizzle symbols across versions.
