How I Stopped Paying for Cursor and Built My Own AI Agent in the Console

When popular AI editors raised prices again and cut limits to Claude, developer Mark Pfaffenberger got angry. And wrote his own tool. That's how Code Puppy came to be — a console AI agent replacing closed IDEs like Cursor and Windsurf.
The project currently has about 740 stars on GitHub, but the features are interesting. It's a flexible terminal client with API key rotation, session persistence on failures, and deep customization.
Why you need a console agent
If you work in the console and don't want to keep a heavy Electron editor open, dragging monstrous plugins can be tedious. Code Puppy launches from any folder with a single command and immediately understands the project structure.
You choose the neural network yourself, configure system prompts, and decide where to send your data.
Key features
Let's look at practical features that make it worth checking out the repository.
Bypassing limits through model rotation
Rate limits per minute are the most annoying when you're working on a complex task. Code Puppy solves this with a built-in Round Robin algorithm. You specify multiple API keys, and the tool cycles through them.
The configuration lives in the config file:
{
"qwen1": {
"type": "cerebras",
"name": "qwen-3-coder-480b",
"custom_endpoint": {
"url": "https://api.cerebras.ai/v1",
"api_key": "$CEREBRAS_API_KEY1"
}
},
"qwen2": {
"type": "cerebras",
"name": "qwen-3-coder-480b",
"custom_endpoint": {
"url": "https://api.cerebras.ai/v1",
"api_key": "$CEREBRAS_API_KEY2"
}
},
"cerebras_round_robin": {
"type": "round_robin",
"models": ["qwen1", "qwen2"],
"rotate_every": 5
}
}
Made five requests to one key, the tool moves to the next one without pause.
Access to dozens of providers
Thanks to integration with models.dev, you don't need to manually specify endpoints for rare neural networks. The /add_model command opens an interactive TUI menu right in the console. You can select providers from a huge list: Groq, Cohere, Mistral, xAI, and others.
If internet connection is lost, the client switches to the built-in offline model database.
Fault tolerance with DBOS
During long code generation sessions, things occasionally break: network disconnects or terminal window accidentally closes. The DBOS plugin saves checkpoints at each step. Function calls, model responses, and context are recorded to a local database.
After restart, you can resume the session exactly from where everything crashed.
Custom agents in JSON format
You can create profiles for specific tasks. For example, build a code review agent that only has access to file reading and grep search.
The configuration file goes in the agents directory:
{
"name": "code-reviewer",
"display_name": "Code Reviewer",
"description": "Проверяет код на ошибки и безопасность",
"system_prompt": [
"Ты опытный инженер, проводящий ревью кода.",
"Обращай внимание на безопасность и поддерживаемость.",
"Предлагай конкретные исправления."
],
"tools": ["list_files", "read_file", "grep", "agent_share_your_reasoning"]
}
Switching agents happens right during work via the /agent code-reviewer command.
Zero data collection
The author deliberately refused analytics and telemetry. No prompts, file paths, or call logs leave the project servers.
When using Ollama or vLLM, data doesn't leave your computer at all.
How to try it
You need Python 3.11 or newer to run it. The fastest way to launch the tool is via uv:
uvx code-puppy
After startup, you'll need to enter keys for the LLMs you use or specify a local endpoint.
Who is this for
The tool turned out bold and distinctive. By default, the agent is quite temperamental and refuses to modify files larger than 600 lines of code, forcing you to refactor on time.
The project will appeal to those who love CLI tools, don't want to pay for monthly subscriptions, and prefer to control API token spending themselves.
Related projects