pdd-cli 0.0.5__py3-none-any.whl → 0.0.7__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/split_main.py CHANGED
@@ -13,7 +13,7 @@ def split_main(
13
13
  example_code_file: str,
14
14
  output_sub: Optional[str],
15
15
  output_modified: Optional[str]
16
- ) -> Tuple[str, str, float]:
16
+ ) -> Tuple[str, str, str, float]:
17
17
  """
18
18
  CLI wrapper for splitting a prompt into a sub_prompt and modified_prompt.
19
19
 
@@ -30,6 +30,7 @@ def split_main(
30
30
  - str: The sub-prompt content
31
31
  - str: The modified prompt content
32
32
  - float: The total cost of the operation
33
+ - str: The model name used (second to last element)
33
34
 
34
35
  Raises:
35
36
  SystemExit: If any error occurs during execution.
@@ -59,8 +60,8 @@ def split_main(
59
60
  strength = ctx.obj.get('strength', 0.5)
60
61
  temperature = ctx.obj.get('temperature', 0)
61
62
 
62
- # Call the split function
63
- sub_prompt, modified_prompt, total_cost = split(
63
+ # Call the split function and unpack the new tuple signature
64
+ sub_prompt, modified_prompt, model_name, total_cost = split(
64
65
  input_prompt=input_strings["input_prompt"],
65
66
  input_code=input_strings["input_code"],
66
67
  example_code=input_strings["example_code"],
@@ -83,9 +84,10 @@ def split_main(
83
84
  rprint("[bold green]Successfully split the prompt![/bold green]")
84
85
  rprint(f"[bold]Sub-prompt saved to:[/bold] {output_file_paths['output_sub']}")
85
86
  rprint(f"[bold]Modified prompt saved to:[/bold] {output_file_paths['output_modified']}")
87
+ rprint(f"[bold]Model used:[/bold] {model_name}")
86
88
  rprint(f"[bold]Total cost:[/bold] ${total_cost:.6f}")
87
89
 
88
- return sub_prompt, modified_prompt, total_cost
90
+ return sub_prompt, modified_prompt, total_cost, model_name
89
91
 
90
92
  except Exception as e:
91
93
  # Handle errors and provide appropriate feedback
@@ -0,0 +1,228 @@
1
+ Metadata-Version: 2.2
2
+ Name: pdd-cli
3
+ Version: 0.0.7
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/gltanaka/pdd
9
+ Project-URL: Repository, https://github.com/gltanaka/pdd.git
10
+ Project-URL: Issue-Tracker, https://github.com/gltanaka/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.12
16
+ Classifier: Topic :: Software Development :: Code Generators
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Requires-Python: >=3.12
19
+ Description-Content-Type: text/x-rst
20
+ License-File: LICENSE
21
+ Requires-Dist: GitPython==3.1.44
22
+ Requires-Dist: Requests==2.32.3
23
+ Requires-Dist: click==8.1.7
24
+ Requires-Dist: keyring==24.3.1
25
+ Requires-Dist: langchain==0.3.18
26
+ Requires-Dist: langchain_anthropic==0.3.7
27
+ Requires-Dist: langchain_community==0.3.17
28
+ Requires-Dist: langchain_core==0.3.34
29
+ Requires-Dist: langchain_fireworks==0.2.7
30
+ Requires-Dist: langchain_google_genai==2.0.9
31
+ Requires-Dist: langchain_google_vertexai==2.0.13
32
+ Requires-Dist: langchain_groq==0.2.4
33
+ Requires-Dist: langchain_ollama==0.2.3
34
+ Requires-Dist: langchain_openai==0.3.4
35
+ Requires-Dist: langchain_together==0.3.0
36
+ Requires-Dist: pandas==2.2.3
37
+ Requires-Dist: pydantic==2.10.6
38
+ Requires-Dist: rich==13.9.4
39
+ Requires-Dist: semver==3.0.2
40
+ Requires-Dist: setuptools==75.1.0
41
+ Requires-Dist: python-Levenshtein
42
+
43
+ .. image:: https://img.shields.io/badge/pdd--cli-v0.0.7-blue
44
+ :alt: PDD-CLI Version
45
+
46
+ PDD (Prompt-Driven Development) Command Line Interface
47
+ ======================================================
48
+
49
+ 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.
50
+
51
+ Key Features
52
+ ------------
53
+
54
+ - Cloud or Local Execution
55
+ • Run in the cloud (default) with no need to manage API keys.
56
+ • Switch to local mode with the ``--local`` flag for full control using your own API keys.
57
+
58
+ - GitHub Single Sign-On
59
+ • Secure authentication with GitHub SSO in cloud mode.
60
+ • Automatic token handling so you can focus on coding.
61
+
62
+ - Comprehensive Command Suite
63
+ • Generate: Create runnable code from prompt files.
64
+ • Example: Build examples that showcase generated code usage.
65
+ • Test: Produce or improve unit tests based on coverage goals.
66
+ • Fix & Crash: Automatically identify and correct errors, iterating if necessary.
67
+ • Update & Change: Keep your prompt files in sync with evolving codebases.
68
+ • Split & Detect: Manage and analyze complex prompts at scale.
69
+ • …and more!
70
+
71
+ - Automated Testing & Cost Tracking
72
+ • Generate coverage reports and additional test cases on the fly.
73
+ • Optional cost-tracking (CSV) for AI usage.
74
+
75
+ - Rich Configuration & Customization
76
+ • Environment variables to define default output paths and settings.
77
+ • Fine-tune AI model behavior with ``--strength`` and ``--temperature``.
78
+ • Built-in auto-update (configurable via env var).
79
+
80
+ - Cross-Language Support
81
+ • Python, Java, JavaScript, Ruby, Go, C++, and beyond.
82
+ • Prompt naming conventions let PDD infer language automatically.
83
+
84
+
85
+ Quick Installation
86
+ ------------------
87
+
88
+ .. code-block:: console
89
+
90
+ pip install pdd-cli
91
+
92
+ After installation, verify:
93
+
94
+ .. code-block:: console
95
+
96
+ pdd --version
97
+
98
+ You’ll see the current PDD version (e.g., 0.0.7).
99
+
100
+ Advanced Installation Tips
101
+ --------------------------
102
+
103
+
104
+ **Virtual Environment**
105
+
106
+ Create and activate a virtual environment, then install pdd-cli:
107
+
108
+ .. code-block:: console
109
+
110
+ python -m venv pdd-env
111
+
112
+ # Activate environment
113
+ # On Windows:
114
+ pdd-env\Scripts\activate
115
+ # On Unix/MacOS:
116
+ source pdd-env/bin/activate
117
+
118
+ # Install PDD
119
+ pip install pdd-cli
120
+
121
+
122
+ **Environment Variables**
123
+
124
+ Optionally, add environment variables to your shell startup (e.g., ``.bashrc``, ``.zshrc``):
125
+
126
+ .. code-block:: console
127
+
128
+ export PDD_AUTO_UPDATE=true
129
+ export PDD_GENERATE_OUTPUT_PATH=/path/to/generated/code/
130
+ export PDD_TEST_OUTPUT_PATH=/path/to/tests/
131
+
132
+ Tab Completion
133
+ ~~~~~~~~~~~~~~
134
+ Enable shell completion:
135
+
136
+ .. code-block:: console
137
+
138
+ pdd install_completion
139
+
140
+ Cloud vs Local
141
+ --------------
142
+
143
+ 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:
144
+
145
+ .. code-block:: console
146
+
147
+ pdd --local generate my_prompt_python.prompt
148
+
149
+ Be sure to configure API keys in your environment ahead of time:
150
+
151
+ .. code-block:: console
152
+
153
+ export OPENAI_API_KEY=your_api_key_here
154
+ export ANTHROPIC_API_KEY=your_api_key_here
155
+ # etc.
156
+
157
+ Basic Usage
158
+ -----------
159
+
160
+ All commands follow a standard pattern:
161
+
162
+ .. code-block:: console
163
+
164
+ pdd [GLOBAL OPTIONS] COMMAND [COMMAND OPTIONS] [ARGS]...
165
+
166
+ **Example – Generate Code**
167
+
168
+ Generate Python code from a prompt:
169
+
170
+ .. code-block:: console
171
+
172
+ pdd generate factorial_calculator_python.prompt
173
+
174
+ In cloud mode (no local keys required). Or locally if you prefer:
175
+
176
+ .. code-block:: console
177
+
178
+ pdd --local generate factorial_calculator_python.prompt
179
+
180
+ **Example – Test**
181
+
182
+ Automatically create or enhance tests:
183
+
184
+ .. code-block:: console
185
+
186
+ pdd test factorial_calculator_python.prompt src/factorial_calculator.py
187
+
188
+ Use coverage analysis:
189
+
190
+ .. code-block:: console
191
+
192
+ pdd test --coverage-report coverage.xml --existing-tests tests/test_factorial.py \
193
+ factorial_prompt.prompt src/factorial.py
194
+
195
+
196
+ **Example – Fix Iteratively**
197
+
198
+ Attempt to fix failing code or tests in multiple loops:
199
+
200
+ .. code-block:: console
201
+
202
+ pdd fix --loop \
203
+ factorial_calculator_python.prompt src/factorial_calculator.py tests/test_factorial.py errors.log
204
+
205
+ PDD will keep trying (with a budget limit configurable by ``--budget``) until tests pass or attempts are exhausted.
206
+
207
+ Why Prompt-Driven Development?
208
+ ------------------------------
209
+
210
+ * **Increased Productivity:** Automate tedious tasks and focus on higher-level design.
211
+ * **Improved Code Quality:** Leverage AI to generate well-structured and tested code.
212
+ * **Faster Development Cycles:** Rapidly prototype and iterate on your ideas.
213
+ * **Reduced Errors:** Automatically identify and fix errors in your code.
214
+ * **Enhanced Collaboration:** Work seamlessly with prompt files as a shared source of truth.
215
+
216
+ Getting Help
217
+ ------------
218
+
219
+ Use inline help to discover commands and options:
220
+
221
+ .. code-block:: console
222
+
223
+ pdd --help
224
+ pdd generate --help
225
+ pdd fix --help
226
+ ...
227
+
228
+ Happy Prompt-Driven Coding!
@@ -6,18 +6,18 @@ pdd/bug_main.py,sha256=myKU9--QWdkV4Wf3mD2PoLPJFNgRjwf4z8s7TC28G_s,3720
6
6
  pdd/bug_to_unit_test.py,sha256=o9bW065UxjvGAn9u8UIwYbIM6R-WcGB2YWuOSXAD484,5569
7
7
  pdd/change.py,sha256=JvHPxK9FfnuGJsEkzTpzWI4tg24OJahK0qTLDZSyNPg,4985
8
8
  pdd/change_main.py,sha256=yL_i1Ws5vt4vAkWiC826csNi2cHP6wKbwe_PfMqbbPY,11407
9
- pdd/cli.py,sha256=1PH1uymQD1bvZ2yizxTxf2lgNpZFXtGmkuJVQKPneLg,21011
9
+ pdd/cli.py,sha256=yPzXdQa4upOypYX0OLxO28WohzQiNaH04FNxxbSoRhc,16592
10
10
  pdd/cmd_test_main.py,sha256=aSCxRnSurg15AvPcJDAPp9xy8p_qqnjU1oV14Hi2R54,5301
11
- pdd/code_generator.py,sha256=drfDqaRJcHumuOYuObQ0Fp__qV1mD46_7Dn1QiChSHs,4244
12
- pdd/code_generator_main.py,sha256=MZ1ONZb4Nxg_9Yljj-ash_GAuV18CVa_qfPHfnh6sN0,2338
11
+ pdd/code_generator.py,sha256=_b5t9cZ6pExHKKAE2ulfdvfLfbsQj-uwrbk520n-R-Q,4375
12
+ pdd/code_generator_main.py,sha256=G2eRBPXc1cGszkk0PbIPmJZHPaf_dw5d2yZbsvQZA3c,4793
13
13
  pdd/comment_line.py,sha256=sX2hf4bG1fILi_rvI9MkkwCZ2IitgKkW7nOiw8aQKPY,1845
14
14
  pdd/conflicts_in_prompts.py,sha256=PyasqXGA92JkroXv8b4-B_fYYC4cDYTsGEl9fj01rlc,4654
15
15
  pdd/conflicts_main.py,sha256=O87s9baSa9DJMndxPIdsnYO_spoajcv9jii3XYt_-fM,3473
16
16
  pdd/construct_paths.py,sha256=8hxkTI_AF5XNpGR4JqCsF4olDBtL8NslXdOZGQt78WM,10039
17
- pdd/context_generator.py,sha256=WF3HDoYALAZ86rIfJPxHlf34IWANUd6IoYL1XqI-CpM,5515
17
+ pdd/context_generator.py,sha256=KEMitvUSMfmSYyyfvIkDpi6dTXED04Zi2-Qm2SVME10,5516
18
18
  pdd/context_generator_main.py,sha256=TtsY3jHictdEjmB4cHyNwXmZW_LfHJp3KW3UXyzR2cU,2735
19
19
  pdd/continue_generation.py,sha256=hAVySc6oEsM_Zpj5AWBKEZqMWgoLlQBHcFtkAZ9sZ0E,5192
20
- pdd/crash_main.py,sha256=QpJj4WJhLl2DJsvPao6GjC93_nKkdbk6EPvEsSWovo8,5012
20
+ pdd/crash_main.py,sha256=YngROG62ORLGm-IORLq1vlVVidBGc9g2k0GAmq1jFNM,5287
21
21
  pdd/detect_change.py,sha256=8AcFkT_CvaNDX7jL6FRrlD89TFXV62_8n2GO4fWIC2c,5261
22
22
  pdd/detect_change_main.py,sha256=1Z4ymhjJaVr2aliGyqkqeqSmQ7QMgcl23p0wdsmBas0,3653
23
23
  pdd/find_section.py,sha256=lz_FPY4KDCRAGlL1pWVZiutUNv7E4KsDFK-ymDWA_Ec,962
@@ -27,14 +27,16 @@ pdd/fix_error_loop.py,sha256=6Vy8e9IfM4cnOaL0bUqT-KnaOMQlDggy9v2Vf_8sSqE,8958
27
27
  pdd/fix_errors_from_unit_tests.py,sha256=vul8X9S2U_dr9dbfjwy0x4K8jIX2B810KLOOhboyySQ,8935
28
28
  pdd/fix_main.py,sha256=02OIViH12BcsykpDp4Osxw2ndEeThnNakMFkzdpYr48,5333
29
29
  pdd/generate_output_paths.py,sha256=zz42GTx9eGyWIYSl3jcWvtJRGnieC3eoPM6DIVcWz2k,7219
30
- pdd/generate_test.py,sha256=1vTMhZTpdGCkIAYy-BWhu_OmNggRx5UddT7OVGhPIiA,4794
30
+ pdd/generate_test.py,sha256=wvriQR2dLib-cwVg_BkUpUKGsQTmnSDmyC2Ok8NLdJw,4792
31
31
  pdd/get_comment.py,sha256=yuRtk68-SDkMaGzOSyIFdldRoymJBRSKjOYkr0narVc,2627
32
32
  pdd/get_extension.py,sha256=ZSsbi7n-tFw-7RQX7c3pV1qWsRt72qS_3AlAYjV53jA,2393
33
+ pdd/get_jwt_token.py,sha256=BGxqMh7qf2mG-TFw7JlV941O9XtrW22L_dRoS_UZNjM,11560
33
34
  pdd/get_language.py,sha256=yxyQqVEb5H3ep3Hc6XgAl3vMLTHD5OIs8ZSekB493GA,1438
34
35
  pdd/git_update.py,sha256=Ya7eI7YFtGIpT7FdziFJfnFkiZlj8I9Lh98lqtXfClc,2855
35
36
  pdd/increase_tests.py,sha256=sqlfkx4v84Zx22wW6_qwIsupbpLgy6IyPwp-11B22bs,3243
36
37
  pdd/insert_includes.py,sha256=bocHBAzs4MAudtIw-JjyHO0kYajwlOLS9jBzV33_LRU,5224
37
- pdd/llm_invoke.py,sha256=4pqOnYksDnrvRT2yBlPXBrGrPPjE5u6QEmg15HB6zys,12346
38
+ pdd/install_completion.py,sha256=joTIKRkx0e6kRrXj9NXtMODnIG-G0Twt7wBmj8TirmE,5102
39
+ pdd/llm_invoke.py,sha256=iYdBPVg1duhmG4d6a1Mbp4sLag-nI5Q3uWQPkmDVUW0,16300
38
40
  pdd/load_prompt_template.py,sha256=4NH8_t5eon_vcyTznqtemJ_yAPkTJm_hSdTRgzj3qEQ,1907
39
41
  pdd/pdd_completion.fish,sha256=rs-43fa3kcDBN1uy4oxiofLAWmaqW0U2j5Mu4wCHh5M,6121
40
42
  pdd/pdd_completion.sh,sha256=qurWrEksqptjryBZszxHv6i0MqgnIqJenMBDrzMgI98,4535
@@ -44,8 +46,8 @@ pdd/postprocess_0.py,sha256=OW17GyCFLYErCyWh2tL4syuho3q2yFf2wyekQ4BLdPM,2168
44
46
  pdd/preprocess.py,sha256=7_mkREBFlWjIUIyZsYBlnCvIGtpVgPeToHUpaq_ZHC0,8177
45
47
  pdd/preprocess_main.py,sha256=dAgFGmjuJB1taZl31c1sY2jMGtQgjnWLbpeB7EFtojY,2977
46
48
  pdd/process_csv_change.py,sha256=10XTzVFQ0rE4lPSF93yhIW7VJmxmfe-hk1B7ui_qxJI,8415
47
- pdd/split.py,sha256=a1xy6PcuIkhQQEZ_X_1wyngDftlhpH4kCLMTb2u5MrY,4271
48
- pdd/split_main.py,sha256=6wPPGEOK8GQBWt93Weem3yKqzZeVGHKyosNruQx432g,3934
49
+ pdd/split.py,sha256=M4OGBgC9D0bfY1RhArfGphbmbEGX_U8f2LksGaL_Hnw,4692
50
+ pdd/split_main.py,sha256=dV9G2YJDp12ik6x1a_dgBtyu27BSt4Fyd2trgxL7qFI,4123
49
51
  pdd/summarize_directory.py,sha256=3KUOP30RgkBXpz0_btmpubnO1vWAQ3tKyVI84Zp-E9Q,9041
50
52
  pdd/trace.py,sha256=DMgL8cEk8gwdpyOumEi3am8wTq68e4OJzoc61H0vLAA,5011
51
53
  pdd/trace_main.py,sha256=3gpd8DsdPfRpq4tjZ2rwC-7Juz90DTVubwsW3LXl8CE,4429
@@ -55,7 +57,7 @@ pdd/update_main.py,sha256=5a4nsOOaAXULdk0BS9pj4blZ_QHBFeET37uaAqoJI2g,3912
55
57
  pdd/update_prompt.py,sha256=OdPRIAMu7OBx7E4SOU95hWgdtBY4oO8XOe1dvPChMlU,4351
56
58
  pdd/xml_tagger.py,sha256=LADAXgw15O0Jh6IxdKrbKIpL76QbEZB1mdq5BvuMmsY,4241
57
59
  pdd/data/language_format.csv,sha256=xUTmFHXSBVBRfPV-NKG3oWo5_ped5ukP-ekFcIlVzJk,877
58
- pdd/data/llm_model.csv,sha256=-m1DoDr_PJ5OUyB155oP3RFzPAh3G_xph1BeaymoKUs,1268
60
+ pdd/data/llm_model.csv,sha256=t5ASN-7kTKizb2ocmKnv8gsyPqDCB2yz4KtYr98vKWI,1647
59
61
  pdd/prompts/auto_include_LLM.prompt,sha256=0t-Jmm5o6vVTmqsISTUiewqPT8bB389UZnJoHZvgtu4,13967
60
62
  pdd/prompts/bug_to_unit_test_LLM.prompt,sha256=--ysObDv9WzOEyJMuaKEdDHkRrR_1j0dmOtlAFr4YRg,1205
61
63
  pdd/prompts/change_LLM.prompt,sha256=W3sE6XZ2fb35XdqOykK1hDPtqkHSv9MZGD3sT8B8WjY,2083
@@ -64,7 +66,7 @@ pdd/prompts/continue_generation_LLM.prompt,sha256=Jsd3eeu23heqw2frfOLzZ5c9dn0QZr
64
66
  pdd/prompts/detect_change_LLM.prompt,sha256=-q8VqXAv6ufEE193DNbTcgpbxiKISR5-5j3M0TTqa8s,4522
65
67
  pdd/prompts/example_generator_LLM.prompt,sha256=48mUvjEYxQYf_HhDLP6RGOz6_d_go6JNExZ9g8aicCg,610
66
68
  pdd/prompts/extract_auto_include_LLM.prompt,sha256=BamIIt8qrML2ZtNe3D4K30iMobJ4URtkyomHCDaf0iw,313
67
- pdd/prompts/extract_code_LLM.prompt,sha256=aq3a9WTcGvlBQLHgLQhQpCA-V0KPvX9h2htZ--UmjPI,2450
69
+ pdd/prompts/extract_code_LLM.prompt,sha256=rRql9Dv2Rn01F2hFeaGzfh9apxCkjY7WzAG0SAvIe8M,2470
68
70
  pdd/prompts/extract_conflict_LLM.prompt,sha256=V_xXdU7V4IZK9SVFxJtXKRn_wFkP3zp4FJrxeNM9XYc,1023
69
71
  pdd/prompts/extract_detect_change_LLM.prompt,sha256=2HXSb9bGjHZsKrUGvfBdBAAcGBCrQ2AxC8vUJRAfB1U,1003
70
72
  pdd/prompts/extract_program_code_fix_LLM.prompt,sha256=ra_aDz2x8MfOa5dh7JCtxjoUFa4dWeKPJOpLohMnrig,1137
@@ -76,7 +78,7 @@ pdd/prompts/extract_unit_code_fix_LLM.prompt,sha256=1gWS0-Qs6vMynNNqp1Xc-2hcsyH_
76
78
  pdd/prompts/extract_xml_LLM.prompt,sha256=eRcHaL-khShpb7C1_b7wmBJHfo2Kh1Wvjo_aOcWZovU,561
77
79
  pdd/prompts/fix_code_module_errors_LLM.prompt,sha256=m-oqZ3cOkWbqke_l9z0Nmunf7NsnR9JWTNVVlfcteAY,1405
78
80
  pdd/prompts/fix_errors_from_unit_tests_LLM.prompt,sha256=TedT4AhgFXkuAmXt07Q2sTij90n8El3nfOzPPXr8_Ws,4679
79
- pdd/prompts/generate_test_LLM.prompt,sha256=sp1favU-GJenqKlqDU4t9qZ0blQ5HagwfRGW90J4V_Y,764
81
+ pdd/prompts/generate_test_LLM.prompt,sha256=y9SZ40zrRDOdp9DJnqq5_IMpsTORhAOphlo3QZlq7Ac,895
80
82
  pdd/prompts/increase_tests_LLM.prompt,sha256=rekFzLRuZy99KifEKNlmPYoQdl8wa04112mtCdIY6S8,955
81
83
  pdd/prompts/insert_includes_LLM.prompt,sha256=g-p2gXKENsqvfK5Q9FYbqFsIJ5CP7rbxmd4rROA-W80,1453
82
84
  pdd/prompts/split_LLM.prompt,sha256=vhDLSqrfftvbDRagb0IfQpotnC-2z-xwKxGRsppkpDM,6135
@@ -87,9 +89,9 @@ pdd/prompts/trim_results_start_LLM.prompt,sha256=WwFlOHha4wzMLtRHDMI6GtcNdl2toE8
87
89
  pdd/prompts/unfinished_prompt_LLM.prompt,sha256=-JgBpiPTQZdWOAwOG1XpfpD9waynFTAT3Jo84eQ4bTw,1543
88
90
  pdd/prompts/update_prompt_LLM.prompt,sha256=_lGaxeVP4oF8yGqiN6yj6UE0j79lxfGdjsYr5w5KSYk,1261
89
91
  pdd/prompts/xml_convertor_LLM.prompt,sha256=YGRGXJeg6EhM9690f-SKqQrKqSJjLFD51UrPOlO0Frg,2786
90
- pdd_cli-0.0.5.dist-info/LICENSE,sha256=-1bjYH-CEjGEQ8VixtnRYuu37kN6F9NxmZSDkBuUQ9o,1062
91
- pdd_cli-0.0.5.dist-info/METADATA,sha256=kGh7hPGuaKIHt2ymyTb6CoShN885e29-TQ8ybj48u5A,9172
92
- pdd_cli-0.0.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
93
- pdd_cli-0.0.5.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
94
- pdd_cli-0.0.5.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
95
- pdd_cli-0.0.5.dist-info/RECORD,,
92
+ pdd_cli-0.0.7.dist-info/LICENSE,sha256=-1bjYH-CEjGEQ8VixtnRYuu37kN6F9NxmZSDkBuUQ9o,1062
93
+ pdd_cli-0.0.7.dist-info/METADATA,sha256=htBM1cfAYwIToyMVQUjqtPPYt_ErIdy3vD96Zg0TT7M,6840
94
+ pdd_cli-0.0.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
95
+ pdd_cli-0.0.7.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
96
+ pdd_cli-0.0.7.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
97
+ pdd_cli-0.0.7.dist-info/RECORD,,
@@ -1,222 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: pdd-cli
3
- Version: 0.0.5
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/gltanaka/pdd
9
- Project-URL: Repository, https://github.com/gltanaka/pdd.git
10
- Project-URL: Issue-Tracker, https://github.com/gltanaka/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.12
16
- Classifier: Topic :: Software Development :: Code Generators
17
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
- Requires-Python: >=3.12
19
- Description-Content-Type: text/x-rst
20
- License-File: LICENSE
21
- Requires-Dist: GitPython==3.1.43
22
- Requires-Dist: click==8.1.7
23
- Requires-Dist: langchain==0.3.1
24
- Requires-Dist: langchain_anthropic==0.2.1
25
- Requires-Dist: langchain_community==0.3.1
26
- Requires-Dist: langchain_core==0.3.7
27
- Requires-Dist: langchain_fireworks==0.2.0
28
- Requires-Dist: langchain_google_genai==2.0.0
29
- Requires-Dist: langchain_groq==0.2.0
30
- Requires-Dist: langchain_openai==0.2.1
31
- Requires-Dist: langchain_together==0.2.0
32
- Requires-Dist: pandas==2.2.3
33
- Requires-Dist: pydantic==2.9.2
34
- Requires-Dist: rich==13.9.1
35
- Requires-Dist: tiktoken==0.7.0
36
- Requires-Dist: python-Levenshtein
37
- Requires-Dist: langchain_ollama
38
- Requires-Dist: langchain-google-vertexai
39
- Requires-Dist: semver
40
- Requires-Dist: setuptools>=43.0.0
41
-
42
- PDD (Prompt-Driven Development) Command Line Interface
43
- ======================================================
44
-
45
- .. image:: https://img.shields.io/badge/pdd--cli-v0.0.4-blue
46
- :alt: PDD-CLI Version
47
-
48
- **Unlock the power of prompt-driven development with the PDD-CLI!**
49
-
50
- PDD (Prompt-Driven Development) is a revolutionary approach to software development that leverages the power of AI to streamline your workflow. The `pdd-cli` package provides a powerful command-line interface to interact with the PDD ecosystem, allowing you to generate code, create examples, run tests, and manage prompt files with ease.
51
-
52
- Key Features
53
- ------------
54
-
55
- * **Code Generation:** Effortlessly generate runnable code from natural language prompts using the `generate` command.
56
- * **Example Creation:** Automatically create example files from existing code and prompts with the `example` command.
57
- * **Automated Testing:** Generate and enhance unit tests with the `test` command, including coverage analysis and improvement.
58
- * **Prompt Management:** Preprocess, split, change, and update prompt files using commands like `preprocess`, `split`, `change`, and `update`.
59
- * **Error Fixing:** Automatically fix errors in code and unit tests with the `fix` command, featuring iterative fixing and budget control.
60
- * **Conflict Resolution:** Analyze and resolve conflicts between prompts using the `conflicts` command.
61
- * **Crash Recovery:** Fix errors that caused a program to crash with the `crash` command, featuring iterative fixing and budget control.
62
- * **Trace Analysis:** Find the associated line number between a prompt file and the generated code with the `trace` command.
63
- * **Bug Reproduction:** Generate a unit test based on observed and desired outputs with the `bug` command.
64
- * **Dependency Management:** Automatically analyze and insert dependencies into prompts with the `auto-deps` command.
65
- * **Multi-Language Support:** Work with a wide range of programming languages, including Python, JavaScript, Java, C++, Ruby, and Go.
66
- * **AI Model Control:** Fine-tune the AI model's output with options like `--strength` and `--temperature`.
67
- * **Cost Tracking:** Monitor and report the cost of operations with the `--output-cost` option.
68
- * **Example Review:** Review and control the use of few-shot examples with the `--review-examples` option.
69
- * **Automatic Example Submission:** Automatically submit successful fixes to the PDD Cloud platform with the `--auto-submit` option.
70
- * **Environment Variable Configuration:** Customize output locations and other settings using environment variables.
71
- * **Git Integration:** Use git history to find the original code file with the `--git` option in the `update` command.
72
- * **Auto-Update:** Stay up-to-date with the latest features and security patches (controllable via environment variable).
73
- * **Comprehensive Help:** Access detailed help for all commands and options.
74
- * **Tab Completion:** Enjoy tab completion for commands and options in compatible shells.
75
- * **Colorized Output:** Benefit from colorized output for improved readability.
76
-
77
- Installation
78
- ------------
79
-
80
- Install `pdd-cli` using pip:
81
-
82
- .. code-block:: bash
83
-
84
- pip install pdd-cli
85
-
86
- Verify the installation:
87
-
88
- .. code-block:: bash
89
-
90
- pdd --version
91
-
92
- Advanced Installation
93
- ---------------------
94
-
95
- For more control, you can install `pdd-cli` in a virtual environment:
96
-
97
- .. code-block:: bash
98
-
99
- # Create virtual environment
100
- python -m venv pdd-env
101
-
102
- # Activate environment
103
- # On Windows:
104
- pdd-env\Scripts\activate
105
- # On Unix/MacOS:
106
- source pdd-env/bin/activate
107
-
108
- # Install PDD
109
- pip install pdd-cli
110
-
111
- API Key Setup
112
- -------------
113
-
114
- `pdd-cli` requires an API key for the language model. Set up your environment variable:
115
-
116
- .. code-block:: bash
117
-
118
- # For OpenAI
119
- export OPENAI_API_KEY=your_api_key_here
120
-
121
- # For Anthropic
122
- export ANTHROPIC_API_KEY=your_api_key_here
123
-
124
- # For other supported providers
125
- export PROVIDER_API_KEY=your_api_key_here
126
-
127
- Add these to your `.bashrc`, `.zshrc`, or equivalent for persistence.
128
-
129
- Post-Installation Setup
130
- ------------------------
131
-
132
- 1. Enable tab completion:
133
-
134
- .. code-block:: bash
135
-
136
- pdd install_completion
137
-
138
- 2. Configure environment variables (optional):
139
-
140
- .. code-block:: bash
141
-
142
- # Add to .bashrc, .zshrc, or equivalent
143
- export PDD_AUTO_UPDATE=true
144
- export PDD_GENERATE_OUTPUT_PATH=/path/to/generated/code/
145
- export PDD_TEST_OUTPUT_PATH=/path/to/tests/
146
-
147
- Basic Usage
148
- -----------
149
-
150
- .. code-block:: bash
151
-
152
- pdd [GLOBAL OPTIONS] COMMAND [OPTIONS] [ARGS]...
153
-
154
- Global Options
155
- --------------
156
-
157
- * `--force`: Overwrite existing files without asking.
158
- * `--strength FLOAT`: Set the AI model strength (0.0 to 1.0, default 0.5).
159
- * `--temperature FLOAT`: Set the AI model temperature (default 0.0).
160
- * `--verbose`: Increase output verbosity.
161
- * `--quiet`: Decrease output verbosity.
162
- * `--output-cost PATH_TO_CSV_FILE`: Enable cost tracking.
163
- * `--review-examples`: Review and optionally exclude few-shot examples.
164
-
165
- Commands
166
- --------
167
-
168
- Here's a quick overview of the core commands. Use `pdd COMMAND --help` for detailed information on each command.
169
-
170
- 1. **generate**: Create code from a prompt file.
171
- 2. **example**: Create an example file from code and its prompt.
172
- 3. **test**: Generate or enhance unit tests.
173
- 4. **preprocess**: Preprocess prompt files.
174
- 5. **fix**: Fix errors in code and unit tests.
175
- 6. **split**: Split large prompt files.
176
- 7. **change**: Modify a prompt based on a change prompt.
177
- 8. **update**: Update a prompt based on modified code.
178
- 9. **detect**: Determine which prompts need changes.
179
- 10. **conflicts**: Find conflicts between prompts.
180
- 11. **crash**: Fix errors that caused a program to crash.
181
- 12. **trace**: Find the associated line number between a prompt file and the generated code.
182
- 13. **bug**: Generate a unit test based on observed and desired outputs.
183
- 14. **auto-deps**: Analyze and insert dependencies into prompts.
184
-
185
- Example Workflow
186
- ----------------
187
-
188
- Here's a simple example of generating code and tests:
189
-
190
- .. code-block:: bash
191
-
192
- # Generate code
193
- pdd generate --output src/factorial.py factorial_python.prompt
194
-
195
- # Generate tests
196
- pdd test --output tests/test_factorial.py factorial_python.prompt src/factorial.py
197
-
198
- Multi-Command Chaining Example
199
- ------------------------------
200
-
201
- You can chain multiple commands for complex workflows:
202
-
203
- .. code-block:: bash
204
-
205
- pdd generate --output src/calculator.py calculator_python.prompt test --output tests/test_calculator.py calculator_python.prompt src/calculator.py test --coverage-report coverage.xml --existing-tests tests/test_calculator.py --merge --target-coverage 95.0 calculator_python.prompt src/calculator.py
206
-
207
- Why Choose PDD-CLI?
208
- -------------------
209
-
210
- * **Increased Productivity:** Automate tedious tasks and focus on higher-level design.
211
- * **Improved Code Quality:** Leverage AI to generate well-structured and tested code.
212
- * **Faster Development Cycles:** Rapidly prototype and iterate on your ideas.
213
- * **Reduced Errors:** Automatically identify and fix errors in your code.
214
- * **Enhanced Collaboration:** Work seamlessly with prompt files as a shared source of truth.
215
- * **Cost-Effective:** Track and optimize your AI model usage.
216
-
217
- Get Started Today!
218
- ------------------
219
-
220
- Install `pdd-cli` and revolutionize your development workflow with the power of prompt-driven development. Explore the comprehensive documentation and examples to unlock the full potential of PDD.
221
-
222
- For more information, visit the `pdd-cli` repository: [https://github.com/gltanaka/pdd](https://github.com/gltanaka/pdd)