code-puppy 0.0.148__tar.gz → 0.0.150__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_puppy-0.0.148 → code_puppy-0.0.150}/PKG-INFO +6 -76
- {code_puppy-0.0.148 → code_puppy-0.0.150}/README.md +5 -75
- {code_puppy-0.0.148 → code_puppy-0.0.150}/pyproject.toml +1 -1
- {code_puppy-0.0.148 → code_puppy-0.0.150}/.gitignore +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/LICENSE +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/__main__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agent.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/agent_code_puppy.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/agent_creator_agent.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/agent_manager.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/agent_orchestrator.json +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/base_agent.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/json_agent.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/agents/runtime_manager.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/callbacks.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/command_handler.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/file_path_completion.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/load_context_completion.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/add_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/base.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/handler.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/help_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/install_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/list_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/logs_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/remove_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/restart_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/search_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/start_all_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/start_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/status_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/stop_all_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/stop_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/test_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/utils.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/mcp/wizard_utils.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/meta_command_handler.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/model_picker_completion.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/motd.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/utils.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/config.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/http_utils.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/main.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/async_lifecycle.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/blocking_startup.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/captured_stdio_server.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/circuit_breaker.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/config_wizard.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/dashboard.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/error_isolation.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/examples/retry_example.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/health_monitor.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/managed_server.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/manager.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/registry.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/retry_manager.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/server_registry_catalog.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/status_tracker.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/mcp/system_tools.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/message_history_processor.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/message_queue.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/queue_console.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/renderers.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/spinner/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/spinner/console_spinner.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/spinner/spinner_base.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/messaging/spinner/textual_spinner.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/model_factory.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/models.json +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/plugins/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/reopenable_async_client.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/round_robin_model.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/state_management.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/status_display.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/summarization_agent.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/token_utils.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/agent_tools.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/command_runner.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/common.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/file_modifications.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/file_operations.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/token_check.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tools/tools_content.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/app.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/chat_view.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/command_history_modal.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/copy_button.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/custom_widgets.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/human_input_modal.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/input_area.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/sidebar.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/status_bar.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/messages.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/models/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/models/chat_message.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/models/command_history.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/models/enums.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/screens/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/screens/help.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/screens/mcp_install_wizard.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/screens/settings.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/screens/tools.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/__init__.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_agent_command.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_chat_message.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_chat_view.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_command_history.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_copy_button.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_custom_widgets.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_disclaimer.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_enums.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_file_browser.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_help.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_history_file_reader.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_input_area.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_settings.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_sidebar.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_sidebar_history.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_sidebar_history_navigation.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_status_bar.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_timestamped_history.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_tools.py +0 -0
- {code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/version_checker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-puppy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.150
|
|
4
4
|
Summary: Code generation agent
|
|
5
5
|
Project-URL: repository, https://github.com/mpfaffenberger/code_puppy
|
|
6
6
|
Project-URL: HomePage, https://github.com/mpfaffenberger/code_puppy
|
|
@@ -92,37 +92,6 @@ export AZURE_OPENAI_ENDPOINT=...
|
|
|
92
92
|
|
|
93
93
|
code-puppy --interactive
|
|
94
94
|
```
|
|
95
|
-
Running in a super weird corporate environment?
|
|
96
|
-
|
|
97
|
-
Try this:
|
|
98
|
-
```bash
|
|
99
|
-
export MODEL_NAME=my-custom-model
|
|
100
|
-
export YOLO_MODE=true
|
|
101
|
-
export MODELS_JSON_PATH=/path/to/custom/models.json
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"my-custom-model": {
|
|
107
|
-
"type": "custom_openai",
|
|
108
|
-
"name": "o4-mini-high",
|
|
109
|
-
"max_requests_per_minute": 100,
|
|
110
|
-
"max_retries": 3,
|
|
111
|
-
"retry_base_delay": 10,
|
|
112
|
-
"custom_endpoint": {
|
|
113
|
-
"url": "https://my.custom.endpoint:8080",
|
|
114
|
-
"headers": {
|
|
115
|
-
"X-Api-Key": "<Your_API_Key>",
|
|
116
|
-
"Some-Other-Header": "<Some_Value>"
|
|
117
|
-
},
|
|
118
|
-
"ca_certs_path": "/path/to/cert.pem"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
|
|
124
|
-
|
|
125
|
-
Open an issue if your environment is somehow weirder than mine.
|
|
126
95
|
|
|
127
96
|
Run specific tasks or engage in interactive mode:
|
|
128
97
|
|
|
@@ -133,7 +102,7 @@ code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it
|
|
|
133
102
|
|
|
134
103
|
## Requirements
|
|
135
104
|
|
|
136
|
-
- Python 3.
|
|
105
|
+
- Python 3.11+
|
|
137
106
|
- OpenAI API key (for GPT models)
|
|
138
107
|
- Gemini API key (for Google's Gemini models)
|
|
139
108
|
- Cerebras API key (for Cerebras models)
|
|
@@ -151,50 +120,19 @@ For examples and more information about agent rules, visit [https://agent.md](ht
|
|
|
151
120
|
|
|
152
121
|
## Using MCP Servers for External Tools
|
|
153
122
|
|
|
154
|
-
|
|
123
|
+
Use the `/mcp` command to manage MCP (list, start, stop, status, etc.)
|
|
155
124
|
|
|
156
|
-
|
|
157
|
-
An MCP server is a standalone process (can be local or remote) that offers specialized functionality (plugins, doc search, code analysis, etc.). Code Puppy can connect to one or more MCP servers at startup, unlocking these extra commands inside your coding agent.
|
|
125
|
+
In the TUI you can click on MCP settings on the footer and interact with a mini-marketplace.
|
|
158
126
|
|
|
159
|
-
|
|
160
|
-
Create a config file at `~/.code_puppy/mcp_servers.json`. Here’s an example that connects to a local Context7 MCP server:
|
|
127
|
+
Watch this video for examples! https://www.youtube.com/watch?v=1t1zEetOqlo
|
|
161
128
|
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"mcp_servers": {
|
|
165
|
-
"context7": {
|
|
166
|
-
"url": "https://mcp.context7.com/sse"
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
You can list multiple objects (one per server).
|
|
173
|
-
|
|
174
|
-
### How to Use
|
|
175
|
-
- Drop the config file in `~/.code_puppy/mcp_servers.json`.
|
|
176
|
-
- Start your MCP (like context7, or anything compatible).
|
|
177
|
-
- Run Code Puppy as usual. It’ll discover and use all configured MCP servers.
|
|
178
|
-
|
|
179
|
-
#### Example usage
|
|
180
|
-
```bash
|
|
181
|
-
code-puppy --interactive
|
|
182
|
-
# Then ask: Use context7 to look up FastAPI docs!
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
That’s it!
|
|
186
|
-
If you need to run more exotic setups or connect to remote MCPs, just update your `mcp_servers.json` accordingly.
|
|
187
|
-
|
|
188
|
-
**NOTE:** Want to add your own server or tool? Just follow the config pattern above—no code changes needed!
|
|
189
|
-
|
|
190
|
-
---
|
|
191
129
|
|
|
192
130
|
## Round Robin Model Distribution
|
|
193
131
|
|
|
194
132
|
Code Puppy supports **Round Robin model distribution** to help you overcome rate limits and distribute load across multiple AI models. This feature automatically cycles through configured models with each request, maximizing your API usage while staying within rate limits.
|
|
195
133
|
|
|
196
134
|
### Configuration
|
|
197
|
-
Add a round-robin model configuration to your
|
|
135
|
+
Add a round-robin model configuration to your `~/.code_puppy/extra_models.json` file:
|
|
198
136
|
|
|
199
137
|
```bash
|
|
200
138
|
export CEREBRAS_API_KEY1=csk-...
|
|
@@ -244,14 +182,6 @@ Then just use /model and tab to select your round-robin model!
|
|
|
244
182
|
|
|
245
183
|
The `rotate_every` parameter controls how many requests are made to each model before rotating to the next one. In this example, the round-robin model will use each Qwen model for 5 consecutive requests before moving to the next model in the sequence.
|
|
246
184
|
|
|
247
|
-
### Benefits
|
|
248
|
-
- **Rate Limit Protection**: Automatically distribute requests across multiple models
|
|
249
|
-
- **Load Balancing**: Share workload between different model providers
|
|
250
|
-
- **Fallback Resilience**: Continue working even if one model has temporary issues
|
|
251
|
-
- **Cost Optimization**: Use different models for different types of tasks
|
|
252
|
-
|
|
253
|
-
**NOTE:** Unlike fallback models, round-robin models distribute load but don't automatically retry with another model on failure. If a request fails, it will raise the exception directly.
|
|
254
|
-
|
|
255
185
|
---
|
|
256
186
|
|
|
257
187
|
## Create your own Agent!!!
|
|
@@ -51,37 +51,6 @@ export AZURE_OPENAI_ENDPOINT=...
|
|
|
51
51
|
|
|
52
52
|
code-puppy --interactive
|
|
53
53
|
```
|
|
54
|
-
Running in a super weird corporate environment?
|
|
55
|
-
|
|
56
|
-
Try this:
|
|
57
|
-
```bash
|
|
58
|
-
export MODEL_NAME=my-custom-model
|
|
59
|
-
export YOLO_MODE=true
|
|
60
|
-
export MODELS_JSON_PATH=/path/to/custom/models.json
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"my-custom-model": {
|
|
66
|
-
"type": "custom_openai",
|
|
67
|
-
"name": "o4-mini-high",
|
|
68
|
-
"max_requests_per_minute": 100,
|
|
69
|
-
"max_retries": 3,
|
|
70
|
-
"retry_base_delay": 10,
|
|
71
|
-
"custom_endpoint": {
|
|
72
|
-
"url": "https://my.custom.endpoint:8080",
|
|
73
|
-
"headers": {
|
|
74
|
-
"X-Api-Key": "<Your_API_Key>",
|
|
75
|
-
"Some-Other-Header": "<Some_Value>"
|
|
76
|
-
},
|
|
77
|
-
"ca_certs_path": "/path/to/cert.pem"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
|
|
83
|
-
|
|
84
|
-
Open an issue if your environment is somehow weirder than mine.
|
|
85
54
|
|
|
86
55
|
Run specific tasks or engage in interactive mode:
|
|
87
56
|
|
|
@@ -92,7 +61,7 @@ code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it
|
|
|
92
61
|
|
|
93
62
|
## Requirements
|
|
94
63
|
|
|
95
|
-
- Python 3.
|
|
64
|
+
- Python 3.11+
|
|
96
65
|
- OpenAI API key (for GPT models)
|
|
97
66
|
- Gemini API key (for Google's Gemini models)
|
|
98
67
|
- Cerebras API key (for Cerebras models)
|
|
@@ -110,50 +79,19 @@ For examples and more information about agent rules, visit [https://agent.md](ht
|
|
|
110
79
|
|
|
111
80
|
## Using MCP Servers for External Tools
|
|
112
81
|
|
|
113
|
-
|
|
82
|
+
Use the `/mcp` command to manage MCP (list, start, stop, status, etc.)
|
|
114
83
|
|
|
115
|
-
|
|
116
|
-
An MCP server is a standalone process (can be local or remote) that offers specialized functionality (plugins, doc search, code analysis, etc.). Code Puppy can connect to one or more MCP servers at startup, unlocking these extra commands inside your coding agent.
|
|
84
|
+
In the TUI you can click on MCP settings on the footer and interact with a mini-marketplace.
|
|
117
85
|
|
|
118
|
-
|
|
119
|
-
Create a config file at `~/.code_puppy/mcp_servers.json`. Here’s an example that connects to a local Context7 MCP server:
|
|
86
|
+
Watch this video for examples! https://www.youtube.com/watch?v=1t1zEetOqlo
|
|
120
87
|
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"mcp_servers": {
|
|
124
|
-
"context7": {
|
|
125
|
-
"url": "https://mcp.context7.com/sse"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
You can list multiple objects (one per server).
|
|
132
|
-
|
|
133
|
-
### How to Use
|
|
134
|
-
- Drop the config file in `~/.code_puppy/mcp_servers.json`.
|
|
135
|
-
- Start your MCP (like context7, or anything compatible).
|
|
136
|
-
- Run Code Puppy as usual. It’ll discover and use all configured MCP servers.
|
|
137
|
-
|
|
138
|
-
#### Example usage
|
|
139
|
-
```bash
|
|
140
|
-
code-puppy --interactive
|
|
141
|
-
# Then ask: Use context7 to look up FastAPI docs!
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
That’s it!
|
|
145
|
-
If you need to run more exotic setups or connect to remote MCPs, just update your `mcp_servers.json` accordingly.
|
|
146
|
-
|
|
147
|
-
**NOTE:** Want to add your own server or tool? Just follow the config pattern above—no code changes needed!
|
|
148
|
-
|
|
149
|
-
---
|
|
150
88
|
|
|
151
89
|
## Round Robin Model Distribution
|
|
152
90
|
|
|
153
91
|
Code Puppy supports **Round Robin model distribution** to help you overcome rate limits and distribute load across multiple AI models. This feature automatically cycles through configured models with each request, maximizing your API usage while staying within rate limits.
|
|
154
92
|
|
|
155
93
|
### Configuration
|
|
156
|
-
Add a round-robin model configuration to your
|
|
94
|
+
Add a round-robin model configuration to your `~/.code_puppy/extra_models.json` file:
|
|
157
95
|
|
|
158
96
|
```bash
|
|
159
97
|
export CEREBRAS_API_KEY1=csk-...
|
|
@@ -203,14 +141,6 @@ Then just use /model and tab to select your round-robin model!
|
|
|
203
141
|
|
|
204
142
|
The `rotate_every` parameter controls how many requests are made to each model before rotating to the next one. In this example, the round-robin model will use each Qwen model for 5 consecutive requests before moving to the next model in the sequence.
|
|
205
143
|
|
|
206
|
-
### Benefits
|
|
207
|
-
- **Rate Limit Protection**: Automatically distribute requests across multiple models
|
|
208
|
-
- **Load Balancing**: Share workload between different model providers
|
|
209
|
-
- **Fallback Resilience**: Continue working even if one model has temporary issues
|
|
210
|
-
- **Cost Optimization**: Use different models for different types of tasks
|
|
211
|
-
|
|
212
|
-
**NOTE:** Unlike fallback models, round-robin models distribute load but don't automatically retry with another model on failure. If a request fails, it will raise the exception directly.
|
|
213
|
-
|
|
214
144
|
---
|
|
215
145
|
|
|
216
146
|
## Create your own Agent!!!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/load_context_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/model_picker_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/command_line/prompt_toolkit_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/components/command_history_modal.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.148 → code_puppy-0.0.150}/code_puppy/tui/tests/test_sidebar_history_navigation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|