Skip to Content
ReferenceCLIcreate-mastra

create-mastra

The create-mastra command creates a new standalone Mastra project. Use this command to scaffold a complete Mastra setup in a dedicated directory.

Usage

create-mastra [options]

Options

--version?:

boolean
Output the version number

--project-name?:

string
Project name that will be used in package.json and as the project directory name

--default?:

boolean
Quick start with defaults(src, OpenAI, no examples)

--components?:

string
Comma-separated list of components (agents, tools, workflows)

--llm?:

string
Default model provider (openai, anthropic, groq, google, or cerebras)

--llm-api-key?:

string
API key for the model provider

--example?:

boolean
Include example code

--no-example?:

boolean
Do not include example code

--timeout?:

number
Configurable timeout for package installation, defaults to 60000 ms

--dir?:

string
Target directory for Mastra source code (default: src/)

--mcp?:

string
MCP Server for code editor (cursor, cursor-global, windsurf, vscode)

--help?:

boolean
Display help for command