# Install mastra with npm

cli for mastra. Version 1.20.1 via npm; verified 2026-07-23.

## Install

```sh
sudo av install npm:mastra
```

Additional install commands:

### Portable and language managers

- npm (100%):

```sh
npm install -g mastra
```

  Evidence: local npm package metadata

## Package facts

- **Package key:** npm:mastra
- **Package manager:** npm
- **Package manager page:** <https://www.npmjs.com/package/mastra>
- **Version:** 1.20.1
- **Source summary:** cli for mastra
- **Homepage:** <https://mastra.ai>
- **Repository:** <https://github.com/mastra-ai/mastra>
- **Upstream docs:** <https://mastra.ai>
- **License:** Apache-2.0
- **Issue tracker:** <https://github.com/mastra-ai/mastra/issues>
- **Published:** 2026-07-23T10:03:09.717Z
- **Last updated:** 2026-07-23T10:03:09.717Z
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- mastra (cli)
- mastra (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: not available

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 1.20.1
- Package-manager updated: 2026-07-23
- Local data: ok
- Upstream repository: https://github.com/mastra-ai/mastra
- info: No cached GitHub release or tag data was available.

## Security Notes

No matching local secret-handling manifest was found for mastra. Package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** npm registry
- **Dist Tags:** 1.x Tester: 0.0.0-1.x-tester-20251106141102, A B Demo: 0.0.0-a-b-demo-20260526202724, A2a: 0.0.0-a2a-20250421213654, A2a Vnext: 0.0.0-a2a-vnext-20260424123427, Add Crumb Action: 0.0.0-add-crumb-action-20251028111500, Add Libsql Changeset: 0.0.0-add-libsql-changeset-20250910154739, Add Runtime Context To Openai Realtime: 0.0.0-add-runtime-context-to-openai-realtime-20250516201052, Add Save Score Validation On Stores: 0.0.0-add-save-score-validation-on-stores-20250911031242, Add Stepgraph To Run Exec Result: 0.0.0-add-stepgraph-to-run-exec-result-20251112113541, After Tool Execute: 0.0.0-afterToolExecute-20250415041527, Ag Example: 0.0.0-ag-example-20260516005230, Agent Chat Ui: 0.0.0-agent-chat-ui-20260305212602, Agent Error Handling: 0.0.0-agent-error-handling-20251023180025, Agent Learning Fetch Again: 0.0.0-agent-learning-fetch-again-20260701195212, Agui: 0.0.0-agui-20250501191909, Ai Sdk Network Text Delta: 0.0.0-ai-sdk-network-text-delta-20251017172601, Ai Sdk Workflow Route: 0.0.0-ai-sdk-workflow-route-20251010135341, Ai Telementry Ui: 0.0.0-ai-telementry-ui-20250908102126, Ai V5: 0.0.0-ai-v5-20250813235735, Allow To Pass A Mastra URL Instance: 0.0.0-allow-to-pass-a-mastra-url-instance-20251105224938, Alpha: 1.22.0-alpha.5, Alternative Angelfish F7665c: 0.0.0-alternative-angelfish-f7665c-20260119184917, Apricot Manager: 0.0.0-apricot-manager-20260327095430, Async Hooks Fix: 0.0.0-async-hooks-fix-20260405155845
- **Version Count:** 1,469
- **Maintainers:** abhiaiyer, smthomas, rase-, calcsam, nikaiyer, tylerbarnes, wardpeet
- **File Count:** 0
- **Created At:** 2024-09-21T20:36:31.862Z
- **Latest Published At:** 2026-07-23T10:03:09.717Z
- **Modified At:** 2026-07-23T10:03:09.717Z


## Related links

- [AI and agent packages](https://pkg.so/ai-agent-tools/) - Matched curated package taxonomy and local package facts.
- [ai-elements](https://pkg.so/npm/ai-elements/) - Local package facts share a topical domain. Shared terms: ai, cli, model, model-tools, models.
- [chatgpt](https://pkg.so/npm/chatgpt/) - Local package facts share a topical domain. Shared terms: ai, cli, model, model-tools, models.
- [genkit-cli](https://pkg.so/npm/genkit-cli/) - Local package facts share a topical domain. Shared terms: ai, cli, model, model-tools, models.

## Sources

- pkg.so package database
- package-page enrichment
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
