Introduction

`cma-cli` is a command-line interface (CLI) tool that dramatically speeds up the development of MERN stack applications. It generates a clean, scalable, and production-ready boilerplate with all the necessary configurations, so you can focus on writing code that matters.

This documentation will walk you through the features, project structure, and customization options available in the generated templates.

New in v1.1.0: Choose your project structure during initialization between client-only, server-only, or full-stack. Support for bun, pnpm, yarn, and npm package managers with intelligent detection.

Getting Started

To create a new MERN stack application, you can use `npx` or install the CLI globally.

Using npx

This is the recommended approach as it always uses the latest version of the CLI.

$ npx cma-cli

Global Installation

You can also install the CLI globally to use it anywhere on your system.

$ npm install -g cma-cli

Once installed, you can create a new project by running:

$ cma-cli

Interactive Setup

The CLI will guide you through an interactive setup process where you can choose:

  • Project Name: Enter your project name or use "./" for current directory
  • Language: JavaScript or TypeScript templates
  • Package Manager: Automatically detects bun, pnpm, yarn, or npm
  • Initialize Parts: Client-only, server-only, or full-stack
  • Concurrently: Run client and server together (for full-stack)
  • Dependencies: Automatic installation with your chosen package manager
  • Git Repository: Initialize Git with optional GitHub integration