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

Installation Flags

Flag Description
--tailwindcss Installs Tailwind CSS v4, PostCSS, and configures globals.css.
--typescript Adds TypeScript support with Vite, including tsconfig.json.
--docker Generates a production-ready Dockerfile and compose file.
--websocket Scaffolds a Python WebSocket server for real-time features.
--mcp Initializes a Model Context Protocol server for AI Agents.
--backend-only Skips all frontend assets (CSS/JS). Ideal for pure JSON APIs.
--swagger-docs Sets up Swagger UI and OpenAPI generation tools.

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 casp 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,
  "swaggerDocs": false,
  "tailwindcss": true,
  "websocket": false,
  "mcp": false,
  "prisma": false,
  "docker": 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.