{"id":42691517,"url":"https://github.com/mantaskaveckas/brizzle","last_synced_at":"2026-01-29T13:03:44.345Z","repository":{"id":333716640,"uuid":"1138421995","full_name":"mantaskaveckas/brizzle","owner":"mantaskaveckas","description":"Rails-like generators for Next.js + Drizzle ORM","archived":false,"fork":false,"pushed_at":"2026-01-28T19:24:42.000Z","size":719,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T03:15:47.384Z","etag":null,"topics":["cli","codegen","crud","drizzle","drizzle-orm","generator","nextjs","scaffold","server-actions","typescript"],"latest_commit_sha":null,"homepage":"https://mantaskaveckas.github.io/brizzle","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mantaskaveckas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-20T16:47:04.000Z","updated_at":"2026-01-28T19:24:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mantaskaveckas/brizzle","commit_stats":null,"previous_names":["mantaskaveckas/nextjs-drizzle-gen","mantaskaveckas/brizzle"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mantaskaveckas/brizzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantaskaveckas%2Fbrizzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantaskaveckas%2Fbrizzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantaskaveckas%2Fbrizzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantaskaveckas%2Fbrizzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mantaskaveckas","download_url":"https://codeload.github.com/mantaskaveckas/brizzle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantaskaveckas%2Fbrizzle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28877887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","codegen","crud","drizzle","drizzle-orm","generator","nextjs","scaffold","server-actions","typescript"],"created_at":"2026-01-29T13:03:43.639Z","updated_at":"2026-01-29T13:03:44.337Z","avatar_url":"https://github.com/mantaskaveckas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"brizzle logo\" width=\"120\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ebrizzle\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/mantaskaveckas/brizzle/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/mantaskaveckas/brizzle/actions/workflows/ci.yml/badge.svg?branch=main\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/brizzle\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/brizzle\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/brizzle\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/brizzle\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nRails-like generators for Next.js + Drizzle ORM projects. Generate models, server actions, CRUD pages, and API routes with a single command.\n\n[**Documentation**](https://mantaskaveckas.github.io/brizzle/)\n\n## Installation\n\n```bash\nnpm install -g brizzle\n```\n\nOr use with npx:\n\n```bash\nnpx brizzle scaffold post title:string body:text\n```\n\n## Quick Start\n\n```bash\n# Initialize Drizzle ORM in your project\nnpx brizzle init\n\n# Generate a full CRUD scaffold (model + actions + pages)\nbrizzle scaffold post title:string body:text published:boolean\n\n# Generate just model and actions (no views)\nbrizzle resource user name:string email:string:unique\n\n# Generate model and REST API routes\nbrizzle api product name:string price:float\n\n# Generate only a model\nbrizzle model comment content:text authorId:references:user\n\n# Generate only actions for an existing model\nbrizzle actions post\n```\n\n## Commands\n\n### `brizzle init`\n\nInteractive setup wizard for Drizzle ORM. Configures your database connection and generates all necessary files.\n\n```bash\nbrizzle init\n```\n\nSupports:\n- **SQLite**: better-sqlite3, libsql (Turso), bun:sqlite\n- **PostgreSQL**: postgres.js, pg, neon, vercel-postgres\n- **MySQL**: mysql2, planetscale\n\nOptions:\n- `--dialect \u003cdialect\u003e` - Database dialect for non-interactive mode\n- `--driver \u003cdriver\u003e` - Database driver for non-interactive mode\n- `--no-install` - Skip automatic dependency installation\n\n### `brizzle model \u003cname\u003e [fields...]`\n\nCreates a Drizzle schema model in `db/schema.ts`.\n\n```bash\nbrizzle model user name:string email:string:unique\nbrizzle model post title:string body:text published:boolean\nbrizzle model order total:decimal status:enum:pending,paid,shipped\n```\n\n### `brizzle actions \u003cname\u003e`\n\nCreates server actions file with CRUD operations.\n\n```bash\nbrizzle actions user\n```\n\n### `brizzle resource \u003cname\u003e [fields...]`\n\nCreates model + actions (no UI pages).\n\n```bash\nbrizzle resource session token:uuid userId:references:user --uuid\n```\n\n### `brizzle scaffold \u003cname\u003e [fields...]`\n\nCreates model + actions + full CRUD pages (list, show, new, edit).\n\n```bash\nbrizzle scaffold product name:string price:float description:text?\n```\n\n### `brizzle api \u003cname\u003e [fields...]`\n\nCreates model + REST API route handlers.\n\n```bash\nbrizzle api webhook url:string secret:string:unique\n```\n\n### `brizzle destroy \u003ctype\u003e \u003cname\u003e`\n\nRemoves generated files (does not modify schema).\n\n```bash\nbrizzle destroy scaffold post\nbrizzle destroy api product --dry-run\n```\n\n### `brizzle config`\n\nShows detected project configuration.\n\n## Field Types\n\n| Type | SQLite | PostgreSQL | MySQL |\n|------|--------|------------|-------|\n| `string` | text | text | varchar(255) |\n| `text` | text | text | text |\n| `integer` / `int` | integer | integer | int |\n| `bigint` | integer | bigint | bigint |\n| `boolean` / `bool` | integer (mode: boolean) | boolean | boolean |\n| `float` | real | doublePrecision | double |\n| `decimal` | text | numeric | decimal |\n| `datetime` / `timestamp` | integer (mode: timestamp) | timestamp | datetime |\n| `date` | integer (mode: timestamp) | date | date |\n| `json` | text | jsonb | json |\n| `uuid` | text | uuid | varchar(36) |\n\n### Special Types\n\n- **`enum`**: `status:enum:draft,published,archived`\n- **`references`**: `authorId:references:user`\n\n## Field Modifiers\n\n- **Nullable**: Add `?` to make field optional\n  ```bash\n  brizzle model user bio:text? nickname?\n  ```\n\n- **Unique**: Add `:unique` modifier\n  ```bash\n  brizzle model user email:string:unique\n  ```\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `-f, --force` | Overwrite existing files |\n| `-n, --dry-run` | Preview changes without writing |\n| `-u, --uuid` | Use UUID for primary key |\n| `--no-timestamps` | Skip createdAt/updatedAt fields |\n\n## Auto-Detection\n\nThe generator automatically detects your project configuration:\n\n- **Project structure**: `src/app/` vs `app/`\n- **Path aliases**: Reads from `tsconfig.json` (`@/`, `~/`, etc.)\n- **Database dialect**: Reads from `drizzle.config.ts`\n- **DB location**: Checks `db/`, `lib/db/`, `server/db/`\n\nRun `brizzle config` to see detected settings.\n\n## Example Output\n\n```bash\n$ brizzle scaffold post title:string body:text published:boolean\n\nScaffolding Post...\n\n      create  db/schema.ts\n      create  app/posts/actions.ts\n      create  app/posts/page.tsx\n      create  app/posts/new/page.tsx\n      create  app/posts/[id]/page.tsx\n      create  app/posts/[id]/edit/page.tsx\n\nNext steps:\n  1. Run 'pnpm db:push' to update the database\n  2. Run 'pnpm dev' and visit /posts\n```\n\n## Requirements\n\n- Node.js \u003e= 18\n- Next.js project with App Router\n- Drizzle ORM configured (or run `brizzle init` to set it up)\n\n## Roadmap\n\n- [x] **Drizzle init** - `brizzle init` to set up Drizzle ORM, database config, and db connection\n- [ ] **Authentication** - `brizzle auth` to generate [better-auth](https://www.better-auth.com/) setup with user model and sign-in/sign-up pages\n- [ ] **Zod schemas** - Generate validation schemas for forms and API routes\n- [ ] **Indexes** - Support for `name:string:index` field modifier\n- [ ] **Default values** - Support for `status:string:default:active`\n- [ ] **Soft deletes** - Add `--soft-delete` flag for `deletedAt` timestamp\n- [ ] **Pagination** - Add pagination to list pages and API routes\n- [ ] **Search \u0026 filtering** - Generate search/filter UI for list pages\n- [ ] **Seed generator** - `brizzle seed \u003cmodel\u003e` to generate seed data files\n- [ ] **Relations helper** - Better syntax for has-many/belongs-to relationships\n- [ ] **Custom templates** - Allow overriding templates via `.brizzle/` directory\n- [ ] **Interactive mode** - `brizzle new` wizard for step-by-step model creation\n- [ ] **Import cleanup** - Remove unused imports when destroying models\n\nHave a feature request? [Open an issue](https://github.com/mantaskaveckas/brizzle/issues)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantaskaveckas%2Fbrizzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmantaskaveckas%2Fbrizzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantaskaveckas%2Fbrizzle/lists"}