What problem does it solve?
Interactive testing of a terminal-based AI coding assistant's UI is error-prone and hard to reproduce, especially when verifying thread lifecycle, task state isolation, and rendering bugs across different terminal widths.
Core Features & Use Cases
- Build and Launch Guidance: Step-by-step instructions for building mastracode with pnpm/turbo, including workarounds for DTS errors and corepack issues.
- Custom Provider Configuration: Configure OpenRouter as a custom model provider via settings.json when direct Anthropic/OpenAI keys are unavailable.
- Thread State Isolation Testing: Verify that /new, /threads, and /clone commands correctly reset, restore, and isolate task state between threads.
- Programmatic Rendering Tests: Use tsx scripts to render TUI components directly, strip ANSI codes, and assert consistent visible widths to catch border and padding bugs.
- Use Case: A developer fixing a user-message border alignment bug writes a tsx script that renders UserMessageComponent at widths 40-120 and asserts all lines have identical visible width, producing concrete pass/fail evidence.
Quick Start
Build mastracode with pnpm build:mastracode, configure an OpenRouter custom provider in settings.json, then launch the TUI with pnpm cli and test thread commands like /new and /threads.