> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kit-rs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> A powerful command-line tool for scaffolding and managing Kit applications

The Kit CLI provides a comprehensive set of commands for creating projects, generating code, running development servers, and managing database migrations. Inspired by Laravel's Artisan CLI, it streamlines common development tasks.

## Installation

The Kit CLI is installed when you install the Kit framework:

```bash theme={null}
cargo install kit-cli
```

## Available Commands

### Project Commands

| Command          | Description                                    |
| ---------------- | ---------------------------------------------- |
| `kit new [name]` | Create a new Kit project                       |
| `kit serve`      | Start development servers (backend + frontend) |

### Generator Commands

| Command                      | Description                                 |
| ---------------------------- | ------------------------------------------- |
| `kit make:controller <name>` | Generate a new controller                   |
| `kit make:action <name>`     | Generate a new action                       |
| `kit make:middleware <name>` | Generate a new middleware                   |
| `kit make:error <name>`      | Generate a new domain error                 |
| `kit make:migration <name>`  | Generate a new database migration           |
| `kit make:inertia <name>`    | Generate a new Inertia.js page component    |
| `kit generate-types`         | Generate TypeScript types from Rust structs |

### Migration Commands

| Command                | Description                           |
| ---------------------- | ------------------------------------- |
| `kit migrate`          | Run all pending migrations            |
| `kit migrate:status`   | Show migration status                 |
| `kit migrate:rollback` | Rollback the last migration(s)        |
| `kit migrate:fresh`    | Drop all tables and re-run migrations |
| `kit db:sync`          | Sync database schema to entity files  |

## Quick Start

```bash theme={null}
# Create a new project
kit new my-app

# Navigate to project
cd my-app

# Start development server
kit serve

# Generate code
kit make:controller User
kit make:action CreateUser
kit make:middleware Auth

# Run migrations
kit migrate
```

## Getting Help

Use `--help` with any command to see available options:

```bash theme={null}
kit --help
kit serve --help
kit make:controller --help
```
