Prisma PHP CLI
A complete reference for scaffolding projects, managing dependencies, and updating your framework core.
Create Project
Scaffold a new application using the interactive wizard or pass flags for a custom setup.
npx create-prisma-php-app@latest my-app
Installation Flags
| Flag | Description |
|---|---|
| --tailwindcss |
Installs TailwindCSS v4, PostCSS, and configures the globals.css entry point.
|
| --typescript |
Adds TypeScript support with Vite, including tsconfig.json and type definitions.
|
| --docker |
Generates a production-ready Dockerfile and docker-compose.yml.
|
| --websocket |
Scaffolds a Ratchet WebSocket server located at src/Lib/Websocket.
|
| --mcp | Initializes a Model Context Protocol server for building AI Agents. |
| --backend-only | Skips all frontend assets (CSS/JS) and view layouts. Ideal for pure APIs. |
| --swagger-docs | Sets up Swagger UI and OpenAPI specification generation tools. |
Starter Kits
Instead of manually selecting flags, use a Starter Kit to pre-configure your environment for specific use cases.
Includes Tailwind, Prisma, and Frontend assets.
npx create-prisma-php-app my-app --starter-kit=fullstack
Docker + Swagger. No frontend.
npx create-prisma-php-app my-api --starter-kit=api
WebSockets + MCP + Tailwind.
npx create-prisma-php-app my-chat --starter-kit=realtime
Install from any Git repository.
npx create-prisma-php-app my-tool --starter-kit=custom --starter-kit-source=...
Generate Classes
Automatically generate strict PHP classes based on your prisma/schema.prisma definition.
npx ppo generate
Update Project
Warning: File Overwrites
Executing npx pp 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 prisma-php.json before updating.
npx pp update project
Configuration
The prisma-php.json file controls how the CLI interacts with your project.
{
"projectName": "my-app",
"version": "1.0.0",
"tailwindcss": true,
"excludeFiles": [
".env",
"./prisma/schema.prisma",
"./prisma/seed.ts",
"./src/app/globals.css",
"./src/app/index.php",
"./src/app/layout.php",
".gitignore"
]
}
excludeFiles Strategy
The example above protects your environment variables, database schema, and primary UI entry points from being reset during a framework update. Remove a line if you specifically want to reset that file to the framework default.
Note: excluding this file prevents it from being overwritten — but it also means you will not receive any future core updates for this file. To apply upstream fixes or improvements later, remove it from excludeFiles and re-run the update, or manually merge changes from the core.