dot CMS

Headless dotCMS Quick Start : Introducing dotCMS create app CLI

Headless dotCMS Quick Start : Introducing dotCMS create app CLI
Afaq

Afaq Javed

Developer Relations

Share this article on:


Why headless CMS onboarding feels slow

Developers adopting a headless CMS often struggle with:

  • Discovering API endpoints and authentication flows

  • Understanding content delivery and pagination APIs

  • Setting up SDKs, environment variables, and local environments

  • Wiring frontend frameworks manually

If developers don’t render content within the first 10–15 minutes, adoption drops significantly. Developer Experience (DX) matters.


The Fastest Way: @dotcms/create-app CLI

The @dotcms/create-app CLI automates the entire headless CMS setup process, including:

  • Frontend scaffolding (Next.js, Angular, etc.)

  • Local CMS instance via Docker

  • API authentication configuration

  • Demo content + site configuration

  • Universal Visual Editor (UVE) setup

This removes the need to manually read dozens of documentation pages before seeing real content.


Step-by-step: create a Next.js headless app

 

Step 1: Bootstrap a Headless CMS Project

Use npx to run the CLI:

npx @dotcms/create-app demo

You will be prompted for a few configuration options.

 

1. Project Directory

Choose the project initialization directory.

 

2. Frontend Framework

Select your preferred framework. For this tutorial: Nextjs

 

3. CMS Deployment Mode

You can either:

  • Connect to a managed cloud instance of dotCMS

  • Spin up a local dotCMS instance using Docker (recommended for development)

 

Choose Local with Docker.

The CLI will:

  • Validate Docker installation

  • Check port availability

  • Pull CMS Docker images (if not cached)

  • Start CMS containers

 

Discover CLI Options with --help

The @dotcms/create-app CLI exposes multiple configuration flags for automation and scripting.

To view all supported options, run:

npx @dotcms/create-app --help

 

What the CLI Configures Automatically

The CLI handles multiple complex tasks behind the scenes:

  • CMS Docker container orchestration

  • API authentication token retrieval

  • Demo site provisioning

  • Universal Visual Editor (UVE) configuration

  • Next.js project scaffolding

  • Dependency installation


Step 2: Configure Environment Variables

Create an .env file:

touch .env

Paste the generated variables into the file.


Step 3: Run the Next.js Headless App

npm run dev

Open:

http://localhost:3000


Access the dotCMS Environment

http://localhost:8082/admin

Default credentials:

Email: admin@dotcms.com

Password: admin


Conclusion

With @dotcms/create-app, you can render real content in minutes and skip manual CMS setup.


Join the Developer Community

👉 community.dotcms.com

Explore dotCMS for your organization

image

dotCMS Named a Major Player

In the IDC MarketScape: Worldwide AI-Enabled Headless CMS 2025 Vendor Assessment

image

Explore an interactive tour

See how dotCMS empowers technical and content teams at compliance-led organizations.

image

Schedule a custom demo

Schedule a custom demo with one of our experts and discover the capabilities of dotCMS for your business.