πŸš€ DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

@mastra/deployer-netlify

Package Overview
Dependencies
Maintainers
11
Versions
551
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mastra/deployer-netlify

A Netlify deployer for Mastra applications.

alpha
latest
Source
npmnpm
Version
0.13.22
Version published
Weekly downloads
1.4K
16.07%
Maintainers
11
Weekly downloads
Β 
Created
Source

@mastra/deployer-netlify

A Netlify deployer for Mastra applications.

Features

  • Deploy Mastra applications to Netlify Functions
  • Automatic site creation and configuration
  • Serverless function support with Edge Functions
  • Zero-configuration deployments

Installation

pnpm add @mastra/deployer-netlify

Usage

The Netlify deployer is used as part of the Mastra framework:

import { Mastra } from '@mastra/core';
import { NetlifyDeployer } from '@mastra/deployer-netlify';

const deployer = new NetlifyDeployer({
  scope: 'your-team-id',
  projectName: 'your-project-name',
  token: 'your-netlify-token',
});

const mastra = new Mastra({
  deployer,
  // ... other Mastra configuration options
});

Configuration

Constructor Options

  • scope (required): Your Netlify team slug or ID
  • projectName: Name of your Netlify site (will be created if it doesn't exist)
  • token: Your Netlify authentication token

Project Structure

The deployer automatically creates the following structure:

your-project/
β”œβ”€β”€ netlify/
β”‚   └── functions/
β”‚       └── api/
└── netlify.toml

netlify.toml Configuration

The deployer creates a netlify.toml with the following defaults:

[functions]
node_bundler = "esbuild"
directory = "/netlify/functions"

[[redirects]]
force = true
from = "/*"
status = 200
to = "/.netlify/functions/api/:splat"

Environment Variables

Environment variables are handled automatically through:

  • .env files in your project
  • Environment variables passed through the Mastra configuration
  • Netlify's environment variable UI

Deployment Process

The deployer will:

  • Create a new site if it doesn't exist
  • Configure the site with your environment variables
  • Deploy your application to Netlify Functions

FAQs

Package last updated on 21 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts