code-puppy 0.0.78__tar.gz → 0.0.80__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.
Files changed (30) hide show
  1. {code_puppy-0.0.78 → code_puppy-0.0.80}/PKG-INFO +5 -3
  2. {code_puppy-0.0.78 → code_puppy-0.0.80}/README.md +4 -2
  3. code_puppy-0.0.80/code_puppy/command_line/motd.py +52 -0
  4. {code_puppy-0.0.78 → code_puppy-0.0.80}/pyproject.toml +1 -1
  5. code_puppy-0.0.78/code_puppy/command_line/motd.py +0 -49
  6. {code_puppy-0.0.78 → code_puppy-0.0.80}/.gitignore +0 -0
  7. {code_puppy-0.0.78 → code_puppy-0.0.80}/LICENSE +0 -0
  8. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/__init__.py +0 -0
  9. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/agent.py +0 -0
  10. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/agent_prompts.py +0 -0
  11. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/command_line/__init__.py +0 -0
  12. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/command_line/file_path_completion.py +0 -0
  13. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/command_line/meta_command_handler.py +0 -0
  14. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/command_line/model_picker_completion.py +0 -0
  15. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
  16. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/command_line/utils.py +0 -0
  17. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/config.py +0 -0
  18. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/main.py +0 -0
  19. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/message_history_processor.py +0 -0
  20. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/model_factory.py +0 -0
  21. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/models.json +0 -0
  22. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/session_memory.py +0 -0
  23. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/state_management.py +0 -0
  24. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/tools/__init__.py +0 -0
  25. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/tools/command_runner.py +0 -0
  26. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/tools/common.py +0 -0
  27. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/tools/file_modifications.py +0 -0
  28. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/tools/file_operations.py +0 -0
  29. {code_puppy-0.0.78 → code_puppy-0.0.80}/code_puppy/tools/ts_code_map.py +0 -0
  30. {code_puppy-0.0.78 → code_puppy-0.0.80}/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.78
3
+ Version: 0.0.80
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -67,8 +67,9 @@ Code Puppy is an AI-powered code generation agent, designed to understand progra
67
67
 
68
68
  ## Usage
69
69
  ```bash
70
- export MODEL_NAME=gpt-4.1 # or gemini-2.5-flash-preview-05-20 as an example for Google Gemini models
70
+ export MODEL_NAME=gpt-5 # or gemini-2.5-flash-preview-05-20 as an example for Google Gemini models
71
71
  export OPENAI_API_KEY=<your_openai_api_key> # or GEMINI_API_KEY for Google Gemini models
72
+ export CEREBRAS_API_KEY=<your_cerebras_api_key> # for Cerebras models
72
73
  export YOLO_MODE=true # to bypass the safety confirmation prompt when running shell commands
73
74
 
74
75
  # or ...
@@ -106,7 +107,7 @@ export MODELS_JSON_PATH=/path/to/custom/models.json
106
107
  }
107
108
  }
108
109
  ```
109
- Note that the `OPENAI_API_KEY` env variable must be set when using `custom_openai` endpoints.
110
+ Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
110
111
 
111
112
  Open an issue if your environment is somehow weirder than mine.
112
113
 
@@ -122,6 +123,7 @@ code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it
122
123
  - Python 3.9+
123
124
  - OpenAI API key (for GPT models)
124
125
  - Gemini API key (for Google's Gemini models)
126
+ - Cerebras API key (for Cerebras models)
125
127
  - Anthropic key (for Claude models)
126
128
  - Ollama endpoint available
127
129
 
@@ -34,8 +34,9 @@ Code Puppy is an AI-powered code generation agent, designed to understand progra
34
34
 
35
35
  ## Usage
36
36
  ```bash
37
- export MODEL_NAME=gpt-4.1 # or gemini-2.5-flash-preview-05-20 as an example for Google Gemini models
37
+ export MODEL_NAME=gpt-5 # or gemini-2.5-flash-preview-05-20 as an example for Google Gemini models
38
38
  export OPENAI_API_KEY=<your_openai_api_key> # or GEMINI_API_KEY for Google Gemini models
39
+ export CEREBRAS_API_KEY=<your_cerebras_api_key> # for Cerebras models
39
40
  export YOLO_MODE=true # to bypass the safety confirmation prompt when running shell commands
40
41
 
41
42
  # or ...
@@ -73,7 +74,7 @@ export MODELS_JSON_PATH=/path/to/custom/models.json
73
74
  }
74
75
  }
75
76
  ```
76
- Note that the `OPENAI_API_KEY` env variable must be set when using `custom_openai` endpoints.
77
+ Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
77
78
 
78
79
  Open an issue if your environment is somehow weirder than mine.
79
80
 
@@ -89,6 +90,7 @@ code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it
89
90
  - Python 3.9+
90
91
  - OpenAI API key (for GPT models)
91
92
  - Gemini API key (for Google's Gemini models)
93
+ - Cerebras API key (for Cerebras models)
92
94
  - Anthropic key (for Claude models)
93
95
  - Ollama endpoint available
94
96
 
@@ -0,0 +1,52 @@
1
+ """
2
+ MOTD (Message of the Day) feature for code-puppy.
3
+ Stores seen versions in ~/.puppy_cfg/motd.txt.
4
+ """
5
+
6
+ import os
7
+
8
+ MOTD_VERSION = "20250815"
9
+ MOTD_MESSAGE = """
10
+
11
+ 🐾 Happy Friday, Aug 15, 2025!
12
+
13
+ Biscuit the code puppy is on full zoomie mode!
14
+ Major paws-ups:
15
+ 1. We now integrate Cerebras gpt-oss-120b!
16
+ It's a bit underwhelming compared to Qwen3-Coder-480b (obviously), but it's still good for basic fetches.
17
+ 2. We also added support for OpenAI gpt-5!
18
+ It's so good, it'll make you want to teach it to sit!
19
+
20
+ • To use one of the Cerebras models just have a CEREBRAS_API_KEY set in the environment variables.
21
+ • Use ~m to swap models in the middle of your session!
22
+ • Take stretch breaks – you'll need 'em!
23
+ • DRY your code, but keep your pup hydrated.
24
+ • If you hit a bug, treat yourself for finding it!
25
+
26
+ Today: sniff, code, roll over, and let these fancy AI models do the heavy lifting. Fire up a ~motd anytime
27
+ you need some puppy hype!
28
+
29
+ """
30
+ MOTD_TRACK_FILE = os.path.expanduser("~/.puppy_cfg/motd.txt")
31
+
32
+
33
+ def has_seen_motd(version: str) -> bool:
34
+ if not os.path.exists(MOTD_TRACK_FILE):
35
+ return False
36
+ with open(MOTD_TRACK_FILE, "r") as f:
37
+ seen_versions = {line.strip() for line in f if line.strip()}
38
+ return version in seen_versions
39
+
40
+
41
+ def mark_motd_seen(version: str):
42
+ os.makedirs(os.path.dirname(MOTD_TRACK_FILE), exist_ok=True)
43
+ with open(MOTD_TRACK_FILE, "a") as f:
44
+ f.write(f"{version}\n")
45
+
46
+
47
+ def print_motd(console, force: bool = False) -> bool:
48
+ if force or not has_seen_motd(MOTD_VERSION):
49
+ console.print(MOTD_MESSAGE)
50
+ mark_motd_seen(MOTD_VERSION)
51
+ return True
52
+ return False
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code-puppy"
7
- version = "0.0.78"
7
+ version = "0.0.80"
8
8
  description = "Code generation agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,49 +0,0 @@
1
- """
2
- MOTD (Message of the Day) feature for code-puppy.
3
- Stores seen versions in ~/.puppy_cfg/motd.txt.
4
- """
5
-
6
- import os
7
-
8
- MOTD_VERSION = "20250802"
9
- MOTD_MESSAGE = """
10
- /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\\
11
- | 🐾 Happy Sat-urday, Aug 2, 2025! |
12
- | |
13
- | Biscuit the code puppy is on full zoomie mode! |
14
- | Major paws-up: We now integrate Cerebras Qwen3 Coder |
15
- | 480b! YES, that’s 480 billion parameters of tail-wagging|
16
- | code speed. It’s so fast, even my fetch can’t keep up! |
17
- | |
18
- | • Take stretch breaks – you’ll need ‘em! |
19
- | • DRY your code, but keep your pup hydrated. |
20
- | • If you hit a bug, treat yourself for finding it! |
21
- | |
22
- | Today: sniff, code, roll over, and let Cerebras Qwen3 |
23
- | Coder 480b do the heavy lifting. Fire up a ~motd anytime|
24
- | you need some puppy hype! |
25
- \___________________________________________________________/
26
- """
27
- MOTD_TRACK_FILE = os.path.expanduser("~/.puppy_cfg/motd.txt")
28
-
29
-
30
- def has_seen_motd(version: str) -> bool:
31
- if not os.path.exists(MOTD_TRACK_FILE):
32
- return False
33
- with open(MOTD_TRACK_FILE, "r") as f:
34
- seen_versions = {line.strip() for line in f if line.strip()}
35
- return version in seen_versions
36
-
37
-
38
- def mark_motd_seen(version: str):
39
- os.makedirs(os.path.dirname(MOTD_TRACK_FILE), exist_ok=True)
40
- with open(MOTD_TRACK_FILE, "a") as f:
41
- f.write(f"{version}\n")
42
-
43
-
44
- def print_motd(console, force: bool = False) -> bool:
45
- if force or not has_seen_motd(MOTD_VERSION):
46
- console.print(MOTD_MESSAGE)
47
- mark_motd_seen(MOTD_VERSION)
48
- return True
49
- return False
File without changes
File without changes