create-mastra

0.2.9 • Public • Published

Create Mastra

The easiest way to get started with Mastra is by using create-mastra. This CLI tool enables you to quickly start building a new Mastra application, with everything set up for you.

Usage

Using npx:

npx create-mastra@latest

Using npm:

npm create mastra@latest

Using yarn:

yarn create mastra

Using pnpm:

pnpm create mastra

Options

  • --default - Quick start with defaults (src directory, OpenAI, no examples)
  • -c, --components <components> - Comma-separated list of components (agents, tools, workflows)
  • -l, --llm <model-provider> - Default model provider (openai, anthropic, groq, google, or cerebras)
  • -e, --example - Include example code

Examples

bash:packages/create-mastra/README.md Create a new project with default settings npx create-mastra@latest --default Create a project with specific components and LLM provider npx create-mastra@latest -c agents,tools -l anthropic Create a project with example code npx create-mastra@latest --example

What's included?

The generated project will have:

  • A configured Mastra setup in the src directory
  • Selected components (agents, tools, workflows)
  • Environment configuration for your chosen LLM provider
  • TypeScript configuration
  • Example code (if selected)

System Requirements

  • Node.js 20 or later
  • MacOS, Windows, and Linux are supported

Package Sidebar

Install

npm i create-mastra

Weekly Downloads

1,943

Version

0.2.9

License

Elastic-2.0

Unpacked Size

322 kB

Total Files

9

Last publish

Collaborators

  • smthomas
  • abhiaiyer
  • ifedayo
  • adeleke5140
  • taofeeq-deru
  • ehindero
  • calcsam
  • rase-
  • wardpeet
  • tylerbarnes
  • nikaiyer