Skip to main content
Kit provides generator commands to scaffold common application components with proper structure and boilerplate code.

make:controller

Generate a new controller for handling HTTP requests.

Examples

Generated File

What It Does

  1. Creates src/controllers/<name>.rs with #[handler] attribute
  2. Updates src/controllers/mod.rs to export the controller

make:action

Generate a new action for encapsulating business logic.

Examples

Generated File

What It Does

  1. Creates src/actions/<name>.rs
  2. Updates src/actions/mod.rs to export the action
  3. Action is automatically registered in the DI container

make:middleware

Generate a new middleware for request/response processing.

Examples

Generated File

What It Does

  1. Creates src/middleware/<name>.rs
  2. Updates src/middleware/mod.rs to export the middleware

make:error

Generate a custom domain error with HTTP response conversion.

Examples

Generated File

What It Does

  1. Creates src/errors/<name>.rs
  2. Creates or updates src/errors/mod.rs
  3. Generates a domain error with automatic HTTP response conversion

Usage


make:task

Generate a new scheduled task for background processing.

Examples

Generated File

What It Does

  1. Creates src/tasks/<name>.rs with Task trait implementation
  2. Creates or updates src/tasks/mod.rs to export the task
  3. Creates src/schedule.rs for registering tasks (if not exists)
  4. Creates src/bin/schedule.rs scheduler binary (if not exists)

Next Steps

After generating, register your task in src/schedule.rs:
Then run the scheduler:

make:inertia

Generate an Inertia.js page component.

Examples

Generated Files

Creates a React component in frontend/src/pages/:

generate-types

Generate TypeScript types from Rust InertiaProps structs.

Options

Examples

How It Works

Scans your Rust code for structs implementing InertiaProps and generates TypeScript interfaces:

Summary