A terminal-based AI coding agent powered by Mastra. Chat with an AI assistant that can clone repos, explore codebases, read/write files, and execute shell commands -- all from your terminal.
Turborepo monorepo with two apps:
apps/server-- Mastra dev server (port 4111) hosting a sandboxed coding agent with filesystem and shell accessapps/terminal-- Ink (React for CLIs) chat interface with real-time streaming, tool call visualization, and reasoning display
Terminal (Ink/React TUI)
|
| HTTP stream (localhost:4111)
v
Mastra Server
├── Coding Agent (OpenAI GPT-4)
└── Workspace (LocalSandbox: file I/O + shell exec)
- AI: Mastra framework, OpenAI GPT-4
- Server:
@mastra/core,@mastra/libsql(SQLite storage),@mastra/loggers - Terminal: Ink 5, React 18, tsup
- Monorepo: Turborepo, Bun
# Install dependencies
bun install
# Configure environment
cp apps/server/.env.example apps/server/.env
# Add your OpenAI API key to apps/server/.env# Start both server and terminal
bun run dev
# Or start individually
bun run dev:server # Mastra server on port 4111
bun run dev:terminal # TUI client (needs server running)| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
Yes | OpenAI API key |
The coding agent runs in a sandboxed workspace (apps/server/workspace/) and can:
- Clone git repositories
- Explore directory structures
- Read and write files
- Execute shell commands
- Generate codebase summaries