A terminal-native open-source AI code agent supporting multi-model rotation, custom agents, MCP tool integration, and durable execution, positioned as an alternative to Cursor/Windsurf.
Code Puppy is a terminal-based AI code generation agent developed and maintained by Michael Pfaffenberger, released under the MIT License. The project aims to serve as an open-source alternative to paid AI IDEs like Windsurf and Cursor, providing a terminal-native AI coding experience.
In terms of core capabilities, Code Puppy offers out-of-the-box support for major model providers including OpenAI, Anthropic, Google Gemini, Cerebras, and Ollama. Through the models.dev API, users can browse and add 1000+ models from 65+ providers with a single click. Its Round Robin model rotation mechanism supports multi-API-key load balancing, automatically bypassing rate limits for cost optimization.
The agent system supports built-in Python agents (based on BaseAgent subclasses) and user-defined JSON agents, with a guided creation tool for defining system prompts, toolsets, and personas. The toolset covers file operations (list_files, read_file, create_file, replace_in_file, delete_file), code search (grep powered by ripgrep), and shell command execution. External tool servers can be integrated via the MCP protocol.
Specification management is implemented through the AGENTS.md rule system, supporting multi-level merging across global and project-level configurations. Custom slash commands are compatible with three directory formats: .claude/commands/, .github/prompts/, and .agents/commands/. The optional DBOS durable execution plugin automatically checkpoints agent runtime state, supporting crash recovery and long-task resumption for CI/CD scenarios.
The project is built on pydantic-ai-slim, uses typer for CLI, rich for terminal rendering, and prompt-toolkit for interactive input. The build system is Hatchling, with code quality ensured by Ruff linter and Lefthook Git hooks. Requires Python 3.11+ and supports cross-platform operation on macOS, Linux, and Windows. Current version 0.0.491, in rapid iteration phase.