Skip to main content
Mastra v1 is coming in January 2026. Get ahead by starting new projects with the beta or upgrade your existing project today.

Templates

Templates are pre-built Mastra projects that demonstrate specific use cases and patterns. Browse available templates in the templates directory.

Using TemplatesDirect link to Using Templates

Install a template using the create-mastra command:

npx create-mastra@latest --template template-name

For example, to create a text-to-SQL application:

npx create-mastra@latest --template text-to-sql

Setting Up a TemplateDirect link to Setting Up a Template

After installation:

  1. Navigate to your project:

    cd your-project-name
  2. Configure environment variables:

    cp .env.example .env

    Edit .env with your API keys as specified in the template's README.

  3. Start development:

    npm run dev
info

Each template includes a comprehensive README with specific setup instructions and usage examples.

For detailed information on creating templates, see the Templates Reference.

On this page