Micro Agent
StaleDescription
An AI agent that writes actually useful code for you by writing tests first, then generating code to pass them.
Key Features
- Test-driven code generation — writes tests first, then iterates code until all tests pass
- Visual matching mode to generate UI code that matches design screenshots pixel-perfectly
- Multi-provider support for Claude, OpenAI, Ollama, Groq, and any OpenAI-compatible endpoint
- Interactive mode with human feedback loop to progressively refine generated code
- Figma integration via Visual Copilot for high-fidelity design-to-code conversion
- Configurable max iterations and model selection with a simple CLI config system
Use Cases
💡 Generating TypeScript utility functions that pass unit tests automatically
💡 Converting Figma designs into production-ready React or Next.js components
💡 Iteratively fixing failing tests in existing codebases with AI assistance
💡 Building UI components that visually match design mockups in the browser
💡 Rapid prototyping of single-file modules with guaranteed test coverage
Tags
Categories
Quick Start
Install globally with 'npm install -g @builder.io/micro-agent', configure your API key with 'micro-agent config set OPENAI_KEY=<token>', then run 'micro-agent' in interactive mode or 'micro-agent ./file.ts -t "npm test"' to generate code that passes your tests. Requires Node.js v18+.