.. image:: https://img.shields.io/badge/pdd--cli-v0.0.25-blue
:alt: PDD-CLI Version
PDD (Prompt-Driven Development) Command Line Interface
======================================================
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.
Key Features
------------
- Cloud or Local Execution
• Run in the cloud (default) with no need to manage API keys.
• Switch to local mode with the ``--local`` flag for full control using your own API keys.
- GitHub Single Sign-On
• Secure authentication with GitHub SSO in cloud mode.
• Automatic token handling so you can focus on coding.
- Comprehensive Command Suite
• Generate: Create runnable code from prompt files.
• Example: Build examples that showcase generated code usage.
• Test: Produce or improve unit tests based on coverage goals.
• Fix & Crash: Automatically identify and correct errors, iterating if necessary.
• Update & Change: Keep your prompt files in sync with evolving codebases.
• Split & Detect: Manage and analyze complex prompts at scale.
• …and more!
- Automated Testing & Cost Tracking
• Generate coverage reports and additional test cases on the fly.
• Optional cost-tracking (CSV) for AI usage.
- Rich Configuration & Customization
• Environment variables to define default output paths and settings.
• Fine-tune AI model behavior with ``--strength`` and ``--temperature``.
• Built-in auto-update (configurable via env var).
- Cross-Language Support
• Python, Java, JavaScript, Ruby, Go, C++, and beyond.
• Prompt naming conventions let PDD infer language automatically.
Quick Installation
------------------
.. code-block:: console
pip install pdd-cli
After installation, verify:
.. code-block:: console
pdd --version
You'll see the current PDD version (e.g., 0.0.25).
Advanced Installation Tips
--------------------------
**Virtual Environment**
Create and activate a virtual environment, then install pdd-cli:
.. code-block:: console
python -m venv pdd-env
# Activate environment
# On Windows:
pdd-env\Scripts\activate
# On Unix/MacOS:
source pdd-env/bin/activate
# Install PDD
pip install pdd-cli
**Environment Variables**
Optionally, add environment variables to your shell startup (e.g., ``.bashrc``, ``.zshrc``):
.. code-block:: console
export PDD_AUTO_UPDATE=true
export PDD_GENERATE_OUTPUT_PATH=/path/to/generated/code/
export PDD_TEST_OUTPUT_PATH=/path/to/tests/
Tab Completion
~~~~~~~~~~~~~~
Enable shell completion:
.. code-block:: console
pdd install_completion
Cloud vs Local
--------------
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:
.. code-block:: console
pdd --local generate my_prompt_python.prompt
Be sure to configure API keys in your environment ahead of time:
.. code-block:: console
export OPENAI_API_KEY=your_api_key_here
export ANTHROPIC_API_KEY=your_api_key_here
# etc.
Basic Usage
-----------
All commands follow a standard pattern:
.. code-block:: console
pdd [GLOBAL OPTIONS] COMMAND [COMMAND OPTIONS] [ARGS]...
**Example – Generate Code**
Generate Python code from a prompt:
.. code-block:: console
pdd generate factorial_calculator_python.prompt
In cloud mode (no local keys required). Or locally if you prefer:
.. code-block:: console
pdd --local generate factorial_calculator_python.prompt
**Example – Test**
Automatically create or enhance tests:
.. code-block:: console
pdd test factorial_calculator_python.prompt src/factorial_calculator.py
Use coverage analysis:
.. code-block:: console
pdd test --coverage-report coverage.xml --existing-tests tests/test_factorial.py \
factorial_prompt.prompt src/factorial.py
**Example – Fix Iteratively**
Attempt to fix failing code or tests in multiple loops:
.. code-block:: console
pdd fix --loop \
factorial_calculator_python.prompt src/factorial_calculator.py tests/test_factorial.py errors.log
PDD will keep trying (with a budget limit configurable by ``--budget``) until tests pass or attempts are exhausted.
Why Prompt-Driven Development?
------------------------------
* **Increased Productivity:** Automate tedious tasks and focus on higher-level design.
* **Improved Code Quality:** Leverage AI to generate well-structured and tested code.
* **Faster Development Cycles:** Rapidly prototype and iterate on your ideas.
* **Reduced Errors:** Automatically identify and fix errors in your code.
* **Enhanced Collaboration:** Work seamlessly with prompt files as a shared source of truth.
Getting Help
------------
Use inline help to discover commands and options:
.. code-block:: console
pdd --help
pdd generate --help
pdd fix --help
...
Happy Prompt-Driven Coding!
Raw data
{
"_id": null,
"home_page": null,
"name": "pdd-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "prompt-driven development, code generation, AI, LLM, unit testing, software development",
"author": "Greg Tanaka",
"author_email": "glt@alumni.caltech.edu",
"download_url": null,
"platform": null,
"description": ".. image:: https://img.shields.io/badge/pdd--cli-v0.0.25-blue\n :alt: PDD-CLI Version\n\nPDD (Prompt-Driven Development) Command Line Interface\n======================================================\n\nPDD (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.\n\nKey Features\n------------\n\n- Cloud or Local Execution\n\n \u2022 Run in the cloud (default) with no need to manage API keys.\n \u2022 Switch to local mode with the ``--local`` flag for full control using your own API keys.\n\n- GitHub Single Sign-On\n\n \u2022 Secure authentication with GitHub SSO in cloud mode.\n \u2022 Automatic token handling so you can focus on coding.\n\n- Comprehensive Command Suite\n\n \u2022 Generate: Create runnable code from prompt files.\n \u2022 Example: Build examples that showcase generated code usage.\n \u2022 Test: Produce or improve unit tests based on coverage goals.\n \u2022 Fix & Crash: Automatically identify and correct errors, iterating if necessary.\n \u2022 Update & Change: Keep your prompt files in sync with evolving codebases.\n \u2022 Split & Detect: Manage and analyze complex prompts at scale.\n \u2022 \u2026and more!\n\n- Automated Testing & Cost Tracking\n\n \u2022 Generate coverage reports and additional test cases on the fly.\n \u2022 Optional cost-tracking (CSV) for AI usage.\n\n- Rich Configuration & Customization\n\n \u2022 Environment variables to define default output paths and settings.\n \u2022 Fine-tune AI model behavior with ``--strength`` and ``--temperature``.\n \u2022 Built-in auto-update (configurable via env var).\n\n- Cross-Language Support\n\n \u2022 Python, Java, JavaScript, Ruby, Go, C++, and beyond.\n \u2022 Prompt naming conventions let PDD infer language automatically.\n\n\nQuick Installation\n------------------\n\n.. code-block:: console\n\n pip install pdd-cli\n\nAfter installation, verify:\n\n.. code-block:: console\n\n pdd --version\n\nYou'll see the current PDD version (e.g., 0.0.25).\n\nAdvanced Installation Tips\n--------------------------\n\n\n**Virtual Environment**\n\nCreate and activate a virtual environment, then install pdd-cli:\n\n.. code-block:: console\n\n python -m venv pdd-env\n\n # Activate environment\n # On Windows:\n pdd-env\\Scripts\\activate\n # On Unix/MacOS:\n source pdd-env/bin/activate\n\n # Install PDD\n pip install pdd-cli\n\n\n**Environment Variables**\n\nOptionally, add environment variables to your shell startup (e.g., ``.bashrc``, ``.zshrc``):\n\n.. code-block:: console\n\n export PDD_AUTO_UPDATE=true\n export PDD_GENERATE_OUTPUT_PATH=/path/to/generated/code/\n export PDD_TEST_OUTPUT_PATH=/path/to/tests/\n\nTab Completion\n~~~~~~~~~~~~~~\nEnable shell completion:\n\n.. code-block:: console\n\n pdd install_completion\n\nCloud vs Local\n--------------\n\nBy default, PDD runs in cloud mode, using GitHub SSO for secure access to AI models\u2014no local API keys needed. If you want or need to run locally:\n\n.. code-block:: console\n\n pdd --local generate my_prompt_python.prompt\n\nBe sure to configure API keys in your environment ahead of time:\n\n.. code-block:: console\n\n export OPENAI_API_KEY=your_api_key_here\n export ANTHROPIC_API_KEY=your_api_key_here\n # etc.\n\nBasic Usage\n-----------\n\nAll commands follow a standard pattern:\n\n.. code-block:: console\n\n pdd [GLOBAL OPTIONS] COMMAND [COMMAND OPTIONS] [ARGS]...\n\n**Example \u2013 Generate Code**\n\nGenerate Python code from a prompt:\n\n.. code-block:: console\n\n pdd generate factorial_calculator_python.prompt\n\nIn cloud mode (no local keys required). Or locally if you prefer:\n\n.. code-block:: console\n\n pdd --local generate factorial_calculator_python.prompt\n\n**Example \u2013 Test**\n\nAutomatically create or enhance tests:\n\n.. code-block:: console\n\n pdd test factorial_calculator_python.prompt src/factorial_calculator.py\n\nUse coverage analysis:\n\n.. code-block:: console\n\n pdd test --coverage-report coverage.xml --existing-tests tests/test_factorial.py \\\n factorial_prompt.prompt src/factorial.py\n\n\n**Example \u2013 Fix Iteratively**\n\nAttempt to fix failing code or tests in multiple loops:\n\n.. code-block:: console\n\n pdd fix --loop \\\n factorial_calculator_python.prompt src/factorial_calculator.py tests/test_factorial.py errors.log\n\nPDD will keep trying (with a budget limit configurable by ``--budget``) until tests pass or attempts are exhausted.\n\nWhy Prompt-Driven Development?\n------------------------------\n\n* **Increased Productivity:** Automate tedious tasks and focus on higher-level design.\n* **Improved Code Quality:** Leverage AI to generate well-structured and tested code.\n* **Faster Development Cycles:** Rapidly prototype and iterate on your ideas.\n* **Reduced Errors:** Automatically identify and fix errors in your code.\n* **Enhanced Collaboration:** Work seamlessly with prompt files as a shared source of truth.\n\nGetting Help\n------------\n\nUse inline help to discover commands and options:\n\n.. code-block:: console\n\n pdd --help\n pdd generate --help\n pdd fix --help\n ...\n\nHappy Prompt-Driven Coding!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "PDD (Prompt-Driven Development) Command Line Interface",
"version": "0.0.25",
"project_urls": {
"Homepage": "https://github.com/gltanaka/pdd",
"Issue-Tracker": "https://github.com/gltanaka/pdd/issues",
"Repository": "https://github.com/gltanaka/pdd.git"
},
"split_keywords": [
"prompt-driven development",
" code generation",
" ai",
" llm",
" unit testing",
" software development"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7680a78842a3ca32ed142e664d6af9ed9290ddcd24568efc7fa417684584685e",
"md5": "e6e8bd87f23e71a53da7b26158e5f396",
"sha256": "3373f5fa5e7a46dd710ebf9a18576925513295a19e10591df417b183d96ba800"
},
"downloads": -1,
"filename": "pdd_cli-0.0.25-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e6e8bd87f23e71a53da7b26158e5f396",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 197667,
"upload_time": "2025-04-29T00:39:53",
"upload_time_iso_8601": "2025-04-29T00:39:53.520482Z",
"url": "https://files.pythonhosted.org/packages/76/80/a78842a3ca32ed142e664d6af9ed9290ddcd24568efc7fa417684584685e/pdd_cli-0.0.25-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-04-29 00:39:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gltanaka",
"github_project": "pdd",
"github_not_found": true,
"lcname": "pdd-cli"
}