CLI Reference

Automate your workflow. The Caspian CLI handles scaffolding, database code generation, and framework updates.

Project Creation

Initialize a new project using the interactive wizard or command-line flags.

npx create-caspian-app@latest

Installation Flags

Flag Description
--backend-only Skips all frontend assets (CSS/JS). Ideal for pure JSON APIs.
--tailwindcss Installs Tailwind CSS v4, PostCSS, and configures globals.css.
--typescript Adds TypeScript support with Vite, including tsconfig.json.
--mcp Initializes a Model Context Protocol server for AI Agents.
--prisma Initializes a Prisma ORM setup.

Full-Stack (Default)

Includes Tailwind, Prisma, and all frontend assets.

npx create-caspian-app my-app --starter-kit=fullstack

Custom Source

Install from any Git repository.

npx create-caspian-app my-tool --starter-kit=custom ...

Code Generation

Automatically generate strict Python Data Classes (Pydantic) based on your prisma/schema.prisma definition.

npx ppy generate

Update Project

Warning: File Overwrites

Executing npx casp update project will download the latest framework core. By default, this overwrites config files and entry points. To preserve your custom work, you must configure the excludeFiles array in config.

npx casp update project

Configuration

The caspian.config.json file controls how the CLI interacts with your project and handles updates.

caspian.config.json
{
  "projectName": "caspian-web",
  "projectRootPath": "./",
  "backendOnly": false,
  "tailwindcss": true,
  "mcp": false,
  "prisma": false,
  "typescript": false,
  "version": "latest",
  "componentScanDirs": [
    "src"
  ],
  "excludeFiles": [
    "./src/app/globals.css",
    "./caspian.config.json"
  ]
}

excludeFiles Strategy

The example above protects your environment variables, styles, and configuration from being reset during a framework update.

Note: Excluding a file prevents it from being overwritten, but it also means you will not receive any future core updates for that specific file. You may need to manually merge upstream changes later.