🚀 create-dotcms-app
đźš§ Beta Notice:
This CLI is currently in beta. Features and APIs may change as we continue improving the tool.
With a single command, you can bootstrap a fully functional frontend (Next.js,Vue,Angular, etc.) connected to dotCMS APIs — including the following:
- Spinning up dotCMS using docker
- Universal Visual Editor pre configured
- Generating site id and authentication token (just copy paste them in frontend .env and enjoy).
✨ What is create-dotcms-app?
create-dotcms-app is a command-line tool that helps developers quickly spin up headless frontends powered by dotCMS.
It automates the tedious work of:
- Setting up a framework
- Connecting to dotCMS REST & GraphQL APIs
- Providing content-fetching helpers
- Adding example components & pages
- Creating environment variable templates
- Optional Setting up local dotCMS instance using docker.
This tool lets you focus on building, not configuring.
🎯 Why this project exists
dotCMS is a hybrid headless CMS with powerful APIs — but initializing a frontend manually takes time.
This CLI solves that by offering:
- Frictionless onboarding
- Standardized project setup
- Fast prototyping & demos
- DevRel-friendly scaffolding for workshops & tutorials
- Production-ready integration patterns
🛠️ Installation
Run using npx (recommended):
npx create-dotcms-app <project-name>
Or install cli globally
npm install -g @dotcms/sdk-create-app
Usage
npx create-dotcms-app my-dotcms-site
This will:
- Ask for the target directory
- Ask which frontend framework you want (Next.js,Angular,Vue, etc.)
- Ask if you’re using dotCMS Cloud or Local Docker dotCMS
- Automatically scaffold your project
- Configure UVE (Edit Mode Anywhere)
- Start dotCMS (if using Docker)
- Print required environment variables for your frontend
Env variables
You will get the following env variables generated by cli just copy and replace them in the frontend of the env and enjoy dotCMS in headless mode.
Host (site) : http://localhost:8082
Site ID : 59bb8831-6706-4589-9ca0-ff74016e02b2
API Token : YOUR_API_TOKEN
CLI Syntax
create-dotcms-app <project-name> [options]
-f, --framework <name> | Skip prompts and directly choose a framework. Must be one of: nextjs, react, vue, svelte, etc. |
-h, --help | Show help menu |
-V, --version | Show CLI version |