pdd-cli 0.0.41__py3-none-any.whl → 0.0.43__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.
Potentially problematic release.
This version of pdd-cli might be problematic. Click here for more details.
- pdd/__init__.py +1 -1
- pdd/auto_deps_main.py +1 -1
- pdd/bug_main.py +1 -1
- pdd/change_main.py +1 -1
- pdd/cli.py +81 -3
- pdd/cmd_test_main.py +3 -3
- pdd/code_generator_main.py +3 -2
- pdd/conflicts_main.py +1 -1
- pdd/construct_paths.py +245 -19
- pdd/context_generator_main.py +27 -12
- pdd/crash_main.py +44 -51
- pdd/detect_change_main.py +1 -1
- pdd/fix_code_module_errors.py +12 -0
- pdd/fix_main.py +2 -2
- pdd/fix_verification_main.py +1 -1
- pdd/generate_output_paths.py +113 -21
- pdd/generate_test.py +53 -16
- pdd/llm_invoke.py +162 -0
- pdd/preprocess_main.py +1 -1
- pdd/prompts/sync_analysis_LLM.prompt +4 -4
- pdd/split_main.py +1 -1
- pdd/sync_determine_operation.py +921 -456
- pdd/sync_main.py +333 -0
- pdd/sync_orchestration.py +639 -0
- pdd/trace_main.py +1 -1
- pdd/update_main.py +7 -2
- pdd_cli-0.0.43.dist-info/METADATA +307 -0
- {pdd_cli-0.0.41.dist-info → pdd_cli-0.0.43.dist-info}/RECORD +32 -30
- pdd_cli-0.0.41.dist-info/METADATA +0 -269
- {pdd_cli-0.0.41.dist-info → pdd_cli-0.0.43.dist-info}/WHEEL +0 -0
- {pdd_cli-0.0.41.dist-info → pdd_cli-0.0.43.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.41.dist-info → pdd_cli-0.0.43.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.41.dist-info → pdd_cli-0.0.43.dist-info}/top_level.txt +0 -0
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pdd-cli
|
|
3
|
-
Version: 0.0.41
|
|
4
|
-
Summary: PDD (Prompt-Driven Development) Command Line Interface
|
|
5
|
-
Author: Greg Tanaka
|
|
6
|
-
Author-email: glt@alumni.caltech.edu
|
|
7
|
-
License: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/promptdriven/pdd.git
|
|
9
|
-
Project-URL: Repository, https://github.com/promptdriven/pdd.git
|
|
10
|
-
Project-URL: Issue-Tracker, https://github.com/promptdriven/pdd/issues
|
|
11
|
-
Keywords: prompt-driven development,code generation,AI,LLM,unit testing,software development
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Topic :: Software Development :: Code Generators
|
|
18
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
-
Requires-Python: >=3.12
|
|
20
|
-
Description-Content-Type: text/x-rst
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
Requires-Dist: GitPython==3.1.44
|
|
23
|
-
Requires-Dist: Requests==2.32.3
|
|
24
|
-
Requires-Dist: aiofiles==24.1.0
|
|
25
|
-
Requires-Dist: click==8.1.7
|
|
26
|
-
Requires-Dist: firecrawl-py
|
|
27
|
-
Requires-Dist: firebase_admin==6.6.0
|
|
28
|
-
Requires-Dist: keyring==25.6.0
|
|
29
|
-
Requires-Dist: langchain_core==0.3.56
|
|
30
|
-
Requires-Dist: nest_asyncio==1.6.0
|
|
31
|
-
Requires-Dist: pandas==2.2.3
|
|
32
|
-
Requires-Dist: psutil==5.9.0
|
|
33
|
-
Requires-Dist: pydantic==2.11.2
|
|
34
|
-
Requires-Dist: litellm
|
|
35
|
-
Requires-Dist: rich==14.0.0
|
|
36
|
-
Requires-Dist: semver==3.0.2
|
|
37
|
-
Requires-Dist: setuptools
|
|
38
|
-
Requires-Dist: pytest
|
|
39
|
-
Requires-Dist: boto3==1.35.99
|
|
40
|
-
Requires-Dist: python-Levenshtein
|
|
41
|
-
Provides-Extra: dev
|
|
42
|
-
Requires-Dist: commitizen; extra == "dev"
|
|
43
|
-
Requires-Dist: pytest-cov; extra == "dev"
|
|
44
|
-
Requires-Dist: pytest-mock; extra == "dev"
|
|
45
|
-
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
46
|
-
Requires-Dist: z3-solver; extra == "dev"
|
|
47
|
-
Dynamic: license-file
|
|
48
|
-
|
|
49
|
-
.. image:: https://img.shields.io/badge/pdd--cli-v0.0.41-blue
|
|
50
|
-
:alt: PDD-CLI Version
|
|
51
|
-
|
|
52
|
-
.. image:: https://img.shields.io/badge/Discord-join%20chat-7289DA.svg?logo=discord&logoColor=white&link=https://discord.gg/Yp4RTh8bG7
|
|
53
|
-
:alt: Join us on Discord
|
|
54
|
-
:target: https://discord.gg/Yp4RTh8bG7
|
|
55
|
-
|
|
56
|
-
PDD (Prompt-Driven Development) Command Line Interface
|
|
57
|
-
======================================================
|
|
58
|
-
|
|
59
|
-
PDD (Prompt-Driven Development) is a command-line interface that harnesses AI models to generate and maintain code from prompt files. Whether you want to create new features, fix bugs, enhance unit tests, or manage complex prompt structures, pdd-cli streamlines your workflow through an intuitive interface and powerful automation.
|
|
60
|
-
|
|
61
|
-
Key Features
|
|
62
|
-
------------
|
|
63
|
-
|
|
64
|
-
- Cloud or Local Execution
|
|
65
|
-
|
|
66
|
-
• Run in the cloud (default) with no need to manage API keys.
|
|
67
|
-
• Switch to local mode with the ``--local`` flag for full control using your own API keys.
|
|
68
|
-
|
|
69
|
-
- GitHub Single Sign-On
|
|
70
|
-
|
|
71
|
-
• Secure authentication with GitHub SSO in cloud mode.
|
|
72
|
-
• Automatic token handling so you can focus on coding.
|
|
73
|
-
|
|
74
|
-
- Comprehensive Command Suite
|
|
75
|
-
|
|
76
|
-
• Generate: Create runnable code from prompt files.
|
|
77
|
-
• Example: Build examples that showcase generated code usage.
|
|
78
|
-
• Test: Produce or improve unit tests based on coverage goals.
|
|
79
|
-
• Fix & Crash: Automatically identify and correct errors, iterating if necessary.
|
|
80
|
-
• Update & Change: Keep your prompt files in sync with evolving codebases.
|
|
81
|
-
• Split & Detect: Manage and analyze complex prompts at scale.
|
|
82
|
-
• …and more!
|
|
83
|
-
|
|
84
|
-
- Automated Testing & Cost Tracking
|
|
85
|
-
|
|
86
|
-
• Generate coverage reports and additional test cases on the fly.
|
|
87
|
-
• Optional cost-tracking (CSV) for AI usage.
|
|
88
|
-
|
|
89
|
-
- Rich Configuration & Customization
|
|
90
|
-
|
|
91
|
-
• Environment variables to define default output paths and settings.
|
|
92
|
-
• Fine-tune AI model behavior with ``--strength`` and ``--temperature``.
|
|
93
|
-
• Built-in auto-update (configurable via env var).
|
|
94
|
-
|
|
95
|
-
- Cross-Language Support
|
|
96
|
-
|
|
97
|
-
• Python, Java, JavaScript, Ruby, Go, C++, and beyond.
|
|
98
|
-
• Prompt naming conventions let PDD infer language automatically.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
Quick Installation
|
|
102
|
-
------------------
|
|
103
|
-
|
|
104
|
-
**Recommended: Using uv (Faster & Better Dependency Management)**
|
|
105
|
-
|
|
106
|
-
We recommend installing PDD using the `uv <https://github.com/astral-sh/uv>`_ package manager for better dependency management and automatic environment configuration:
|
|
107
|
-
|
|
108
|
-
.. code-block:: console
|
|
109
|
-
|
|
110
|
-
# Install uv if you haven't already
|
|
111
|
-
curl -sSf https://astral.sh/uv/install.sh | sh
|
|
112
|
-
|
|
113
|
-
# Install PDD using uv tool install
|
|
114
|
-
uv tool install pdd-cli
|
|
115
|
-
|
|
116
|
-
This installation method ensures:
|
|
117
|
-
|
|
118
|
-
- Faster installations with optimized dependency resolution
|
|
119
|
-
- Automatic environment setup without manual configuration
|
|
120
|
-
- Proper handling of the PDD_PATH environment variable
|
|
121
|
-
- Better isolation from other Python packages
|
|
122
|
-
|
|
123
|
-
**Alternative: Using pip**
|
|
124
|
-
|
|
125
|
-
If you prefer, you can install with pip:
|
|
126
|
-
|
|
127
|
-
.. code-block:: console
|
|
128
|
-
|
|
129
|
-
pip install pdd-cli
|
|
130
|
-
|
|
131
|
-
After installation, verify:
|
|
132
|
-
|
|
133
|
-
.. code-block:: console
|
|
134
|
-
|
|
135
|
-
pdd --version
|
|
136
|
-
|
|
137
|
-
You'll see the current PDD version (e.g., 0.0.41).
|
|
138
|
-
|
|
139
|
-
Advanced Installation Tips
|
|
140
|
-
--------------------------
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
**Virtual Environment**
|
|
144
|
-
|
|
145
|
-
Create and activate a virtual environment, then install pdd-cli:
|
|
146
|
-
|
|
147
|
-
.. code-block:: console
|
|
148
|
-
|
|
149
|
-
python -m venv pdd-env
|
|
150
|
-
|
|
151
|
-
# Activate environment
|
|
152
|
-
# On Windows:
|
|
153
|
-
pdd-env\Scripts\activate
|
|
154
|
-
# On Unix/MacOS:
|
|
155
|
-
source pdd-env/bin/activate
|
|
156
|
-
|
|
157
|
-
# Install PDD (with uv - recommended)
|
|
158
|
-
uv tool install pdd-cli
|
|
159
|
-
# OR with pip
|
|
160
|
-
pip install pdd-cli
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
**Environment Variables**
|
|
164
|
-
|
|
165
|
-
Optionally, add environment variables to your shell startup (e.g., ``.bashrc``, ``.zshrc``):
|
|
166
|
-
|
|
167
|
-
.. code-block:: console
|
|
168
|
-
|
|
169
|
-
export PDD_AUTO_UPDATE=true
|
|
170
|
-
export PDD_GENERATE_OUTPUT_PATH=/path/to/generated/code/
|
|
171
|
-
export PDD_TEST_OUTPUT_PATH=/path/to/tests/
|
|
172
|
-
|
|
173
|
-
Tab Completion
|
|
174
|
-
~~~~~~~~~~~~~~
|
|
175
|
-
Enable shell completion:
|
|
176
|
-
|
|
177
|
-
.. code-block:: console
|
|
178
|
-
|
|
179
|
-
pdd install_completion
|
|
180
|
-
|
|
181
|
-
Cloud vs Local
|
|
182
|
-
--------------
|
|
183
|
-
|
|
184
|
-
By default, PDD runs in cloud mode, using GitHub SSO for secure access to AI models—no local API keys needed. If you want or need to run locally:
|
|
185
|
-
|
|
186
|
-
.. code-block:: console
|
|
187
|
-
|
|
188
|
-
pdd --local generate my_prompt_python.prompt
|
|
189
|
-
|
|
190
|
-
Be sure to configure API keys in your environment ahead of time:
|
|
191
|
-
|
|
192
|
-
.. code-block:: console
|
|
193
|
-
|
|
194
|
-
export OPENAI_API_KEY=your_api_key_here
|
|
195
|
-
export ANTHROPIC_API_KEY=your_api_key_here
|
|
196
|
-
# etc.
|
|
197
|
-
|
|
198
|
-
Basic Usage
|
|
199
|
-
-----------
|
|
200
|
-
|
|
201
|
-
All commands follow a standard pattern:
|
|
202
|
-
|
|
203
|
-
.. code-block:: console
|
|
204
|
-
|
|
205
|
-
pdd [GLOBAL OPTIONS] COMMAND [COMMAND OPTIONS] [ARGS]...
|
|
206
|
-
|
|
207
|
-
**Example – Generate Code**
|
|
208
|
-
|
|
209
|
-
Generate Python code from a prompt:
|
|
210
|
-
|
|
211
|
-
.. code-block:: console
|
|
212
|
-
|
|
213
|
-
pdd generate factorial_calculator_python.prompt
|
|
214
|
-
|
|
215
|
-
In cloud mode (no local keys required). Or locally if you prefer:
|
|
216
|
-
|
|
217
|
-
.. code-block:: console
|
|
218
|
-
|
|
219
|
-
pdd --local generate factorial_calculator_python.prompt
|
|
220
|
-
|
|
221
|
-
**Example – Test**
|
|
222
|
-
|
|
223
|
-
Automatically create or enhance tests:
|
|
224
|
-
|
|
225
|
-
.. code-block:: console
|
|
226
|
-
|
|
227
|
-
pdd test factorial_calculator_python.prompt src/factorial_calculator.py
|
|
228
|
-
|
|
229
|
-
Use coverage analysis:
|
|
230
|
-
|
|
231
|
-
.. code-block:: console
|
|
232
|
-
|
|
233
|
-
pdd test --coverage-report coverage.xml --existing-tests tests/test_factorial.py \
|
|
234
|
-
factorial_prompt.prompt src/factorial.py
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
**Example – Fix Iteratively**
|
|
238
|
-
|
|
239
|
-
Attempt to fix failing code or tests in multiple loops:
|
|
240
|
-
|
|
241
|
-
.. code-block:: console
|
|
242
|
-
|
|
243
|
-
pdd fix --loop \
|
|
244
|
-
factorial_calculator_python.prompt src/factorial_calculator.py tests/test_factorial.py errors.log
|
|
245
|
-
|
|
246
|
-
PDD will keep trying (with a budget limit configurable by ``--budget``) until tests pass or attempts are exhausted.
|
|
247
|
-
|
|
248
|
-
Why Prompt-Driven Development?
|
|
249
|
-
------------------------------
|
|
250
|
-
|
|
251
|
-
* **Increased Productivity:** Automate tedious tasks and focus on higher-level design.
|
|
252
|
-
* **Improved Code Quality:** Leverage AI to generate well-structured and tested code.
|
|
253
|
-
* **Faster Development Cycles:** Rapidly prototype and iterate on your ideas.
|
|
254
|
-
* **Reduced Errors:** Automatically identify and fix errors in your code.
|
|
255
|
-
* **Enhanced Collaboration:** Work seamlessly with prompt files as a shared source of truth.
|
|
256
|
-
|
|
257
|
-
Getting Help
|
|
258
|
-
------------
|
|
259
|
-
|
|
260
|
-
Use inline help to discover commands and options:
|
|
261
|
-
|
|
262
|
-
.. code-block:: console
|
|
263
|
-
|
|
264
|
-
pdd --help
|
|
265
|
-
pdd generate --help
|
|
266
|
-
pdd fix --help
|
|
267
|
-
...
|
|
268
|
-
|
|
269
|
-
Happy Prompt-Driven Coding!
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|