Code Generators
The velox make command scaffolds common code patterns.
Available Generators
Section titled “Available Generators”| Generator | Alias | Description |
|---|---|---|
procedure | p, proc | Procedure files |
schema | s, zod | Zod schemas |
migration | mig | Prisma migrations |
model | m | Full model setup |
test | t, spec | Test files |
resource | r, res | Full resource stack |
Examples
Section titled “Examples”Procedure
Section titled “Procedure”velox make procedure usersvelox make procedure posts --crudSchema
Section titled “Schema”velox make schema Uservelox make schema Post --crudMigration
Section titled “Migration”velox make migration create_users_tablevelox make migration add_email_to_usersResource (Full Stack)
Section titled “Resource (Full Stack)”velox make resource ProductCreates: model, schema, procedures, and tests.
Options
Section titled “Options”| Option | Description |
|---|---|
--crud | Include CRUD operations |
--soft-delete | Add deletedAt field |
--pagination | Add paginated list |
--dry-run | Preview without writing |
--json | Machine-readable output |
Output
Section titled “Output”velox make procedure users --crud
Created: src/procedures/users.ts - listUsers (GET /api/users) - getUser (GET /api/users/:id) - createUser (POST /api/users) - updateUser (PUT /api/users/:id) - deleteUser (DELETE /api/users/:id)Next Steps
Section titled “Next Steps”- Database Commands - Migrations
- Procedures - Procedure API