code-puppy 0.0.124__py3-none-any.whl → 0.0.125__py3-none-any.whl

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.
@@ -1,11 +1,10 @@
1
1
  code_puppy/__init__.py,sha256=-ANvE6Xe5NlWDIRCIfL1x-rgtCZ6zM2Ye9NphFoULSY,82
2
2
  code_puppy/__main__.py,sha256=pDVssJOWP8A83iFkxMLY9YteHYat0EyWDQqMkKHpWp4,203
3
- code_puppy/agent.py,sha256=tWtH5FtxH6NJzvBfptJCKo4Nhw2J7JMlAKQuwkiyFyQ,7056
4
- code_puppy/agent_prompts.py,sha256=pBDC5zsWozEiFHmoOS6CnxortMvN8VZqnUEHM8sx8Ug,6975
5
- code_puppy/callbacks.py,sha256=T9J7E9N80XChcr6MqjHPp_eSGx2ODN2Fak0081vYvSE,4901
6
- code_puppy/config.py,sha256=yg-YNR6N89kygPLZiXT3TecITbhA1o7xUrRvmhQNJwA,15120
3
+ code_puppy/agent.py,sha256=_sbSwDIURIqTCiKlyf7JaSB-IQpE9qjO2_ZTdcDosg8,7508
4
+ code_puppy/callbacks.py,sha256=6wYB6K_fGSCkKKEFaYOYkJT45WaV5W_NhUIzcvVH_nU,5060
5
+ code_puppy/config.py,sha256=xGq3u15wjg57c71zPgBVxAPePt6uRdepIaFJvloWNxM,15439
7
6
  code_puppy/http_utils.py,sha256=zN0_F8cq4agamL3GRRLLhgEjBgjKtWrgGe8thORC7YE,3434
8
- code_puppy/main.py,sha256=ETXVFoeD75lIBxevvIZtTOqc-2wQGG_CPEWqPHtFBd8,27275
7
+ code_puppy/main.py,sha256=Z_-0rbhqx65_DnUqqAER4CQXsO4sB3WJZXpsWlpNqc8,27549
9
8
  code_puppy/message_history_processor.py,sha256=O2rKp7W6YeIg93W8b0XySTUEQgIZm0f_06--_kzHugM,16145
10
9
  code_puppy/model_factory.py,sha256=cqYpDAtUcFU4iB0PFSA_nLbuXv4cWFB59BE5-1nZqXI,10202
11
10
  code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
@@ -15,8 +14,14 @@ code_puppy/status_display.py,sha256=F6eEAkGePDp4StM2BWj-uLLQTDGtJrf0IufzCeP1rRg,
15
14
  code_puppy/summarization_agent.py,sha256=-e6yUGZ22ahSaF0y7QhgVcQBfx5ktNUkPxBIWQfPaA4,3275
16
15
  code_puppy/token_utils.py,sha256=inLo-S2YERGA-JmV-nrSFN7KMswSfHxpawAuK6YiDHc,1982
17
16
  code_puppy/version_checker.py,sha256=bjLDmgGPrl7XnYwX1u13O8uFlsfikV90PK6nbA9Z9QU,1150
17
+ code_puppy/agents/__init__.py,sha256=SwtHGNG1GIgDBv7y3EGIXOXEWrG_Ou7fEknNgFbrHv8,594
18
+ code_puppy/agents/agent_code_puppy.py,sha256=38JGlOvyVay_pYhvkcdO3CyNKKRuhToKEsCdlonG25M,7940
19
+ code_puppy/agents/agent_creator_agent.py,sha256=hpmr3UmTaoDfcJ0tbMdxyUyxQ941N9XX6Upe_BGEpE8,18664
20
+ code_puppy/agents/agent_manager.py,sha256=2ZHIR6gqnkAffHccFYf93iBF2qwlWKm7vCGk3pnwMNE,6733
21
+ code_puppy/agents/base_agent.py,sha256=qqwQhyCNDQSD-jf6B55Ipim5I2svB4t2v3A3E9kU7Rk,1501
22
+ code_puppy/agents/json_agent.py,sha256=0j6_P1ppje7TsjaZIbxKn8meiuvoBngvjVLNdtCkGwc,4272
18
23
  code_puppy/command_line/__init__.py,sha256=y7WeRemfYppk8KVbCGeAIiTuiOszIURCDjOMZv_YRmU,45
19
- code_puppy/command_line/command_handler.py,sha256=VoSQ0tnjhyRnLk553tX4Bx-ggGxJluGkCZFxJzzFCUI,15280
24
+ code_puppy/command_line/command_handler.py,sha256=AX6dOsF9D4v2QIotzuQE7nErw-uygFhBIXsGHSbuZmU,18723
20
25
  code_puppy/command_line/file_path_completion.py,sha256=gw8NpIxa6GOpczUJRyh7VNZwoXKKn-yvCqit7h2y6Gg,2931
21
26
  code_puppy/command_line/load_context_completion.py,sha256=6eZxV6Bs-EFwZjN93V8ZDZUC-6RaWxvtZk-04Wtikyw,2240
22
27
  code_puppy/command_line/meta_command_handler.py,sha256=d5eVWzRoThYD3cR-GS0CMwHxDvBK4ezLdSIqwWDrq0g,5620
@@ -33,15 +38,15 @@ code_puppy/messaging/spinner/console_spinner.py,sha256=cuOXQH99dJ1cq0l_rpCLVCGNs
33
38
  code_puppy/messaging/spinner/spinner_base.py,sha256=474qMrTYpNfWcprFzmhaOJEOC-2rRHpTFCLsnl54bXA,1689
34
39
  code_puppy/messaging/spinner/textual_spinner.py,sha256=fdyNkbn1SJgfATclBjv2KgLSiHOHUkky1AyHfhxtoH8,3273
35
40
  code_puppy/plugins/__init__.py,sha256=fksDqMUiXPJ5WNuMsYsVR8ulueQRCXPlvECEyicHPtQ,1312
36
- code_puppy/tools/__init__.py,sha256=F3BbF3OwgUsQFFGWdj-qXgQLqCSedANVqEZtcZD-SZY,455
37
- code_puppy/tools/command_runner.py,sha256=HsLF2OJL13Dw2-g67ZgsolIPH30PF6iZ4gjjL6xAXrI,21425
41
+ code_puppy/tools/__init__.py,sha256=YfTN-2aWH2av4YBV8cA-W69AlPLOM_me0BFiAjhE9H0,1919
42
+ code_puppy/tools/command_runner.py,sha256=GVNsgwjTFD9tkNlycgMNmMoVPdmMkZkbAcHH5y6iMww,26070
38
43
  code_puppy/tools/common.py,sha256=pL-9xcRs3rxU7Fl9X9EUgbDp2-csh2LLJ5DHH_KAHKY,10596
39
- code_puppy/tools/file_modifications.py,sha256=_b6bWKB7P5G9-kaMqLlCduFINf-3FEQNkTRBr_VgUSI,23063
40
- code_puppy/tools/file_operations.py,sha256=7nSueKqlJcnlnBg7zXkX7EWiOJX8i3NNWGE7QRCkF7o,24867
44
+ code_puppy/tools/file_modifications.py,sha256=oeNEQItqwMhGOeEN2TzGR7TjmgLsfFFdPaVMzWbfXIQ,30398
45
+ code_puppy/tools/file_operations.py,sha256=WKGNSGTw3vGdDqGGUBHIPh1uCjaDLJmgIa8Ua1eV8lY,32601
41
46
  code_puppy/tools/token_check.py,sha256=cNrGOOKahXsnWsvh5xnMkL1NS9FjYur9QIRZGQFW-pE,1189
42
47
  code_puppy/tools/tools_content.py,sha256=pi9ig2qahZFkUj7gBBN2TX2QldvwnqmTHrRKP8my_2k,2209
43
48
  code_puppy/tui/__init__.py,sha256=XesAxIn32zLPOmvpR2wIDxDAnnJr81a5pBJB4cZp1Xs,321
44
- code_puppy/tui/app.py,sha256=vsdfiBXo3EEPPBNCF_cEBk9urVhdcB1JNAY8AIwZwV8,43275
49
+ code_puppy/tui/app.py,sha256=meeBLxfCQ_c9weIfi00j9XY0TvtsINYdabdIDcombl0,36707
45
50
  code_puppy/tui/messages.py,sha256=zQoToWI0eWdT36NEsY6RdCFzcDfAmfvoPlHv8jiCbgo,720
46
51
  code_puppy/tui/components/__init__.py,sha256=uj5pnk3s6SEN3SbFI0ZnzaA2KK1NNg8TfUj6U-Z732U,455
47
52
  code_puppy/tui/components/chat_view.py,sha256=u6yFqz7sz5RYxVpobnAHXDfDeIDRwDnXXTBwBl5Wn7M,17995
@@ -60,6 +65,7 @@ code_puppy/tui/screens/help.py,sha256=eJuPaOOCp7ZSUlecearqsuX6caxWv7NQszUh0tZJjB
60
65
  code_puppy/tui/screens/settings.py,sha256=GMpv-qa08rorAE9mj3AjmqjZFPhmeJ_GWd-DBHG6iAA,10671
61
66
  code_puppy/tui/screens/tools.py,sha256=3pr2Xkpa9Js6Yhf1A3_wQVRzFOui-KDB82LwrsdBtyk,1715
62
67
  code_puppy/tui/tests/__init__.py,sha256=Fzb4un4eeKfaKsIa5tqI5pTuwfpS8qD7Z6W7KeqWe84,23
68
+ code_puppy/tui/tests/test_agent_command.py,sha256=IirGfYOAOfVmgjyGxX_IrKKRTwCqvfry4DblAwT1atY,2705
63
69
  code_puppy/tui/tests/test_chat_message.py,sha256=uA3eZBzpTkSLEFVMp6k97JALVlzBP4_1YHHTXQCxV0I,765
64
70
  code_puppy/tui/tests/test_chat_view.py,sha256=LKdcQjM0lS-duHuM2fgDoEWY5o2pLSt7vZ2DqDNeitE,2884
65
71
  code_puppy/tui/tests/test_command_history.py,sha256=o5i7PvfTDCzRpZQ_napxYxawHiwM1clMSwZw7SVp6C8,3282
@@ -78,9 +84,9 @@ code_puppy/tui/tests/test_sidebar_history_navigation.py,sha256=JGiyua8A2B8dLfwiE
78
84
  code_puppy/tui/tests/test_status_bar.py,sha256=nYT_FZGdmqnnbn6o0ZuOkLtNUtJzLSmtX8P72liQ5Vo,1797
79
85
  code_puppy/tui/tests/test_timestamped_history.py,sha256=nVXt9hExZZ_8MFP-AZj4L4bB_1Eo_mc-ZhVICzTuw3I,1799
80
86
  code_puppy/tui/tests/test_tools.py,sha256=kgzzAkK4r0DPzQwHHD4cePpVNgrHor6cFr05Pg6DBWg,2687
81
- code_puppy-0.0.124.data/data/code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
82
- code_puppy-0.0.124.dist-info/METADATA,sha256=oRUXDjmFz9mwX_gAgaIEpbBffmzvi0051oiRt7vW22o,6537
83
- code_puppy-0.0.124.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- code_puppy-0.0.124.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
85
- code_puppy-0.0.124.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
86
- code_puppy-0.0.124.dist-info/RECORD,,
87
+ code_puppy-0.0.125.data/data/code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
88
+ code_puppy-0.0.125.dist-info/METADATA,sha256=pEBpr54LIumfNxkykQMwNm1vP2M5OI2xakQg40m4Wg8,19785
89
+ code_puppy-0.0.125.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
+ code_puppy-0.0.125.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
91
+ code_puppy-0.0.125.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
92
+ code_puppy-0.0.125.dist-info/RECORD,,
@@ -1,192 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: code-puppy
3
- Version: 0.0.124
4
- Summary: Code generation agent
5
- Author: Michael Pfaffenberger
6
- License: MIT
7
- License-File: LICENSE
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Topic :: Software Development :: Code Generators
15
- Requires-Python: >=3.10
16
- Requires-Dist: bs4>=0.0.2
17
- Requires-Dist: fastapi>=0.110.0
18
- Requires-Dist: httpx-limiter>=0.3.0
19
- Requires-Dist: httpx>=0.24.1
20
- Requires-Dist: json-repair>=0.46.2
21
- Requires-Dist: logfire>=0.7.1
22
- Requires-Dist: openai>=1.99.1
23
- Requires-Dist: pathspec>=0.11.0
24
- Requires-Dist: prompt-toolkit>=3.0.38
25
- Requires-Dist: pydantic-ai>=0.7.4
26
- Requires-Dist: pydantic>=2.4.0
27
- Requires-Dist: pyjwt>=2.8.0
28
- Requires-Dist: pytest-cov>=6.1.1
29
- Requires-Dist: python-dotenv>=1.0.0
30
- Requires-Dist: rapidfuzz>=3.13.0
31
- Requires-Dist: rich>=13.4.2
32
- Requires-Dist: ruff>=0.11.11
33
- Requires-Dist: termcolor>=3.1.0
34
- Requires-Dist: textual-dev>=1.7.0
35
- Requires-Dist: textual>=5.0.0
36
- Requires-Dist: tree-sitter-language-pack>=0.8.0
37
- Requires-Dist: tree-sitter-typescript>=0.23.2
38
- Requires-Dist: uvicorn>=0.29.0
39
- Description-Content-Type: text/markdown
40
-
41
- # 🐶 Code Puppy 🐶
42
- ![Build Status](https://img.shields.io/badge/build-passing-brightgreen)
43
- ![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen)
44
- <a href="https://github.com/mpfaffenberger/code_puppy"><img src="https://img.shields.io/pypi/pyversions/pydantic-ai.svg" alt="versions"></a>
45
- <a href="https://github.com/mpfaffenberger/code_puppy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/pydantic/pydantic-ai.svg?v" alt="license"></a>
46
-
47
- *"Who needs an IDE?"* - someone, probably.
48
-
49
- ## Overview
50
-
51
- *This project was coded angrily in reaction to Windsurf and Cursor removing access to models and raising prices.*
52
-
53
- *You could also run 50 code puppies at once if you were insane enough.*
54
-
55
- *Would you rather plow a field with one ox or 1024 puppies?*
56
- - If you pick the ox, better slam that back button in your browser.
57
-
58
-
59
- Code Puppy is an AI-powered code generation agent, designed to understand programming tasks, generate high-quality code, and explain its reasoning similar to tools like Windsurf and Cursor.
60
-
61
- ## Quick start
62
-
63
- `uvx code-puppy -i`
64
-
65
-
66
- ## Features
67
-
68
- - **Multi-language support**: Capable of generating code in various programming languages.
69
- - **Interactive CLI**: A command-line interface for interactive use.
70
- - **Detailed explanations**: Provides insights into generated code to understand its logic and structure.
71
-
72
- ## Command Line Animation
73
-
74
- ![Code Puppy](code_puppy.gif)
75
-
76
- ## Installation
77
-
78
- `pip install code-puppy`
79
-
80
- ## Usage
81
- ```bash
82
- export MODEL_NAME=gpt-5 # or gemini-2.5-flash-preview-05-20 as an example for Google Gemini models
83
- export OPENAI_API_KEY=<your_openai_api_key> # or GEMINI_API_KEY for Google Gemini models
84
- export CEREBRAS_API_KEY=<your_cerebras_api_key> # for Cerebras models
85
- export YOLO_MODE=true # to bypass the safety confirmation prompt when running shell commands
86
-
87
- # or ...
88
-
89
- export AZURE_OPENAI_API_KEY=...
90
- export AZURE_OPENAI_ENDPOINT=...
91
-
92
- code-puppy --interactive
93
- ```
94
- Running in a super weird corporate environment?
95
-
96
- Try this:
97
- ```bash
98
- export MODEL_NAME=my-custom-model
99
- export YOLO_MODE=true
100
- export MODELS_JSON_PATH=/path/to/custom/models.json
101
- ```
102
-
103
- ```json
104
- {
105
- "my-custom-model": {
106
- "type": "custom_openai",
107
- "name": "o4-mini-high",
108
- "max_requests_per_minute": 100,
109
- "max_retries": 3,
110
- "retry_base_delay": 10,
111
- "custom_endpoint": {
112
- "url": "https://my.custom.endpoint:8080",
113
- "headers": {
114
- "X-Api-Key": "<Your_API_Key>",
115
- "Some-Other-Header": "<Some_Value>"
116
- },
117
- "ca_certs_path": "/path/to/cert.pem"
118
- }
119
- }
120
- }
121
- ```
122
- Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
123
-
124
- Open an issue if your environment is somehow weirder than mine.
125
-
126
- Run specific tasks or engage in interactive mode:
127
-
128
- ```bash
129
- # Execute a task directly
130
- code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it and run it"
131
- ```
132
-
133
- ## Requirements
134
-
135
- - Python 3.9+
136
- - OpenAI API key (for GPT models)
137
- - Gemini API key (for Google's Gemini models)
138
- - Cerebras API key (for Cerebras models)
139
- - Anthropic key (for Claude models)
140
- - Ollama endpoint available
141
-
142
- ## License
143
-
144
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
145
-
146
- ## Agent Rules
147
- We support AGENT.md files for defining coding standards and styles that your code should comply with. These rules can cover various aspects such as formatting, naming conventions, and even design guidelines.
148
-
149
- For examples and more information about agent rules, visit [https://agent.md](https://agent.md)
150
-
151
- ## Using MCP Servers for External Tools
152
-
153
- Code Puppy supports **MCP (Model Context Protocol) servers** to give you access to external code tools and advanced features like code search, documentation lookups, and more—including Context7 (https://context7.com/) integration for deep docs and search!
154
-
155
- ### What is an MCP Server?
156
- 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.
157
-
158
- ### Configuration
159
- Create a config file at `~/.code_puppy/mcp_servers.json`. Here’s an example that connects to a local Context7 MCP server:
160
-
161
- ```json
162
- {
163
- "mcp_servers": {
164
- "context7": {
165
- "url": "https://mcp.context7.com/sse"
166
- }
167
- }
168
- }
169
- ```
170
-
171
- You can list multiple objects (one per server).
172
-
173
- ### How to Use
174
- - Drop the config file in `~/.code_puppy/mcp_servers.json`.
175
- - Start your MCP (like context7, or anything compatible).
176
- - Run Code Puppy as usual. It’ll discover and use all configured MCP servers.
177
-
178
- #### Example usage
179
- ```bash
180
- code-puppy --interactive
181
- # Then ask: Use context7 to look up FastAPI docs!
182
- ```
183
-
184
- That’s it!
185
- If you need to run more exotic setups or connect to remote MCPs, just update your `mcp_servers.json` accordingly.
186
-
187
- **NOTE:** Want to add your own server or tool? Just follow the config pattern above—no code changes needed!
188
-
189
- ---
190
-
191
- ## Conclusion
192
- By using Code Puppy, you can maintain code quality and adhere to design guidelines with ease.