New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mastra

Package Overview
Dependencies
Maintainers
0
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mastra

cli for mastra

  • 0.1.57-alpha.106
  • alpha
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
775
decreased by-60.05%
Maintainers
0
Weekly downloads
 
Created
Source

The Mastra CLI

Mastra Cli

The Mastra CLI enables you to get up and running with mastra quickly. It is not required to use mastra, but helpful for getting started and more advanced use cases.

Installing the Mastra CLI

npm i -g mastra

Setup

mastra init

Deployment

Mastra's data syncing infrastructure is designed for Next.js sites running on serverless hosting providers like Vercel or Netlify.

Logs are stored in Upstash.

Full deployment docs here.

Commands

mastra init

This creates a mastra directory under src containing an index.ts entrypoint and an agent directory containing two sample agents.

project-root/
├── src/
   ├── app/
   └── mastra/
       ├── agents/
       │   └── agents.ts
       └── index.ts
Agents

mastra agent new

This creates a new agent.

mastra agent list

This lists all available agents.

Engine

mastra engine add

This installs the @mastra/engine dependency to your project.

mastra engine generate

Generates the Drizzle database client and TypeScript types.

mastra engine migrate

This migrates the database forward. You might need to run this after updating mastra.

mastra engine up

This is a shortcut that runs the docker-compose up command using the mastra-pg.docker-compose.yaml file. This will spin up any local docker containers that mastra needs.

It is useful for cases where you don't have a dockerized postgres db setup.

Rest Endpoints

mastra dev

This spins up REST endpoints for all agents, all workflows, and memory.

Local development

  1. clone the repo
  2. Run pnpm i to install deps

Telemetry

This CLI collects anonymous usage data to help improve the tool. We collect:

  • Commands used
  • Command execution time
  • Error occurrences
  • System information (OS, Node version)

No personal or sensitive information is collected.

To opt-out of telemetry:

  1. Add NO_MASTRA_TELEMETRY=1 to commands

Keywords

FAQs

Package last updated on 24 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc