Skip to main content

Resource Generator

Creates model + actions without UI pages. Ideal for backend-only resources.

Usage

brizzle resource <name> [fields...]

Example

brizzle resource session token:uuid userId:references:user --uuid

Output

      create  db/schema.ts
create app/sessions/actions.ts

When to Use

Use the resource generator when you need:

  • Backend-only models: Resources that don't need a user interface
  • API-driven apps: When you'll build custom UI or use the API generator
  • Internal models: Session tokens, audit logs, background job records
  • Relationships: Models that are managed through parent resources

Examples

Session Management

brizzle resource session token:uuid userId:references:user expiresAt:datetime --uuid

Audit Logging

brizzle resource auditLog action:string entityType:string entityId:integer userId:references:user metadata:json

Background Jobs

brizzle resource job type:string payload:json status:enum:pending,running,completed,failed attempts:integer

Difference from Scaffold

FeatureResourceScaffold
ModelYesYes
ActionsYesYes
List pageNoYes
New pageNoYes
Detail pageNoYes
Edit pageNoYes

Options

OptionDescription
-f, --forceOverwrite existing files
-n, --dry-runPreview without writing
-u, --uuidUse UUID for primary key
--no-timestampsSkip createdAt/updatedAt