MastraCode - An experimental fork of OpenCode with Mastra integration.
This is an experimental project
MastraCode is a fork of OpenCode that experiments with integrating Mastra capabilities into the OpenCode AI coding agent.
For the original, production-ready OpenCode, please visit: github.com/sst/opencode
This repository is an experiment to explore how Mastra's AI agent framework can be integrated with OpenCode's powerful terminal-based coding agent.
OpenCode is the open source AI coding agent built for the terminal. For full documentation, installation instructions, and support:
- Repository: github.com/sst/opencode
- Documentation: opencode.ai/docs
- Discord: discord.gg/opencode
npm i -g mastracode@devTip
Remove versions older than 0.1.x before installing.
OpenCode includes two built-in agents you can switch between,
you can switch between these using the Tab key.
- build - Default, full access agent for development work
- plan - Read-only agent for analysis and code exploration
- Denies file edits by default
- Asks permission before running bash commands
- Ideal for exploring unfamiliar codebases or planning changes
Also, included is a general subagent for complex searches and multistep tasks.
This is used internally and can be invoked using @general in messages.
Learn more about agents.
For more info on how to configure OpenCode head over to our docs.
This is an experimental project. For contributions to the main OpenCode project, please visit github.com/sst/opencode.
This project maintains the same MIT License as the original OpenCode project.
Original OpenCode by: SST | OpenCode.ai