create-tattva
v0.2.0
Published
Scaffold a new Tattva CMS project with one command — AI-native open source headless CMS
Maintainers
Readme
create-tattva
Scaffold a new Tattva CMS project in seconds.
Tattva CMS is an AI-native, open source headless CMS built for modern development teams. It combines a powerful content API, a standalone Studio interface, and built-in AI capabilities — all in a type-safe, extensible monorepo.
Quick Start
npx create-tattva@latest my-project
cd my-project
pnpm devOpen http://localhost:3000 to see your frontend, http://localhost:3333 for the Studio, and http://localhost:4000/api/v1/health for the API.
Usage
Interactive (recommended)
npx create-tattva@latestYou'll be prompted to choose:
- Project name
- Package manager (
pnpm,npm,yarn) - Frontend framework (
Next.js,React,Vite,existing) - Database (
SQLite,PostgreSQL) - Storage driver (
local,MinIO,S3) - Optional features (Studio, AI Workspace, SDK, Git init, dependencies)
Non-interactive
npx create-tattva@latest my-project --yesUses all defaults: Next.js, SQLite, local storage, Studio + AI + SDK enabled, Git init, dependencies installed.
Customized non-interactive
npx create-tattva@latest my-project \
--database postgresql \
--storage s3 \
--frontend vite \
--no-ai \
--no-gitOptions
| Flag | Description |
|------|-------------|
| -y, --yes | Use default options (non-interactive) |
| -t, --template <name> | Template to use |
| -d, --database <provider> | Database provider (sqlite | postgresql) |
| -s, --storage <driver> | Storage driver (local | minio | s3) |
| -f, --frontend <framework> | Frontend framework (nextjs | react | vite | existing) |
| --no-studio | Skip Studio installation |
| --no-ai | Skip AI workspace installation |
| --no-sdk | Skip SDK generation |
| --no-git | Skip Git initialization |
| --no-install | Skip dependency installation |
| --demo | Include demo content |
| -p, --package-manager <manager> | Package manager (pnpm | npm | yarn) |
What's Included
Next.js Frontend (apps/frontend)
- Modern React 19 app with App Router
- Tailwind CSS v4 with dark mode support
- Automatic type-safe API client integration
- Ready-to-extend page structure
Fastify Engine (apps/engine)
- Type-safe API server with Fastify v5
- Prisma ORM with SQLite or PostgreSQL
- JWT authentication (access + refresh tokens)
- Health check endpoint
- Audit logging, media management, sessions
Studio (apps/studio)
- Standalone Next.js app (port 3333, separate from frontend)
- Content management interface
- Login page with email/password authentication
- Designed to be extended with custom content UIs
Type-safe SDK (packages/sdk)
- Auto-generated
CmsClientclass - Full TypeScript types for all API responses
- Methods:
get,post,patch,delete - Pagination helpers and query parameter support
- JWT token management
AI Workspace (.tattva/)
- AI context files for LLM-assisted development
- Prompt templates for content operations
- Assistant definitions for code generation
- Schema-driven context generation
Turborepo Monorepo
- Shared TypeScript and ESLint configs
- Parallel builds with caching
- Consistent scripts across all packages
- Environment variable management
Project Structure
my-project/
├── apps/
│ ├── frontend/ # Next.js frontend (port 3000)
│ │ └── src/app/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── globals.css
│ ├── studio/ # Studio interface (port 3333)
│ │ └── src/app/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── login/page.tsx
│ └── engine/ # API engine (port 4000)
│ ├── src/
│ │ ├── index.ts
│ │ └── routes/health.ts
│ └── prisma/
│ └── schema.prisma
├── packages/
│ ├── sdk/ # Generated API client
│ │ └── src/
│ │ ├── client.ts
│ │ ├── types.ts
│ │ └── index.ts
│ └── ui/ # Shared UI components
├── .tattva/ # AI context & project manifest
│ ├── context.json
│ ├── project.json
│ ├── assistants/
│ └── prompts/
├── tattva.config.ts # CMS configuration
├── turbo.json # Turborepo pipeline
├── package.json # Root workspace config
└── .env # Environment variablesCommands
After creating a project, these commands are available:
| Command | Description |
|---------|-------------|
| pnpm dev | Start all apps in development mode |
| pnpm build | Build all apps for production |
| pnpm lint | Lint all packages |
| pnpm studio | Start Studio only (port 3333) |
| pnpm engine | Start Engine only (port 4000) |
| pnpm generate | Regenerate SDK & AI context from schema |
| pnpm doctor | Check project health |
Examples
Blog with SQLite (quick start)
npx create-tattva@latest my-blog --yes
cd my-blog
pnpm devEnterprise with PostgreSQL and S3
npx create-tattva@latest enterprise-app \
--database postgresql \
--storage s3 \
--no-demo
cd enterprise-app
# Add your DATABASE_URL and S3 credentials to .env
pnpm devAdd to an existing project
npx create-tattva@latest . --frontend existing --no-studioRequirements
| Requirement | Version | |-------------|---------| | Node.js | >= 20.0.0 | | pnpm | >= 10.0.0 (recommended) |
Works on Windows, macOS, and Linux.
Documentation
Full documentation at tattva.dev/docs
License
MIT © Tattva CMS
