Skip to main content

CLI for PR Pilot, a text-to-task automation platform for Github.

Project description

PR Pilot Logo

Install | Documentation | Blog | Website

PR Pilot Command-Line Interface

PR Pilot gives you a natural language interface for your Github projects. Given a prompt, it uses LLMs (Large Language Models) to autonomously fulfill tasks by interacting with your code base and Github issues.

Using prompt templates, you can create powerful, reusable commands that can be executed by PR Pilot.

🛠️ Usage

Open a terminal and ls into a repository you have installed PR Pilot.

In your repository, use the pilot command:

pilot "Tell me about this project!"

📝 Ask PR Pilot to edit a local file for you:

pilot --edit cli/cli.py "Make sure all functions and classes have docstrings."

⚡ Generate code quickly and save it as a file:

pilot -o test_utils.py --code "Write some unit tests for the utils.py file."

🔍 Capture part of your screen and add it to a prompt:

pilot -o component.html --code --snap "Write a Bootstrap5 component that looks like this."

📊 Get an organized view of your Github issues:

pilot "Find all open Github issues labeled as 'bug', categorize and prioritize them"

📝 Generate parts of your documentation with a template:

pilot --direct -f prompts/README.md.jinja2 -o README.md

To learn more about templates, check out the prompts directory.

📝 Execute a step-by-step plan:

Break down more complex tasks into smaller steps with a plan:

# document_cli.yaml

name: Document the CLI
prompt: |
  The CLI is great, but we need a comprehensive user documentation.
  The documentation should be stored as Markdown files in the repository.

steps:
  - name: Identify documentation needs
    output_file: doc_instructions.md
    prompt: |
      1. Read `cli/cli.py`
      2. Identify the key features of the CLI and how it works
      3. List the documentation files that need to be created and outline their content
      4. Create step-by-step instructions for creating the documentation

  - name: Document the CLI
    template: doc_instructions.md

Run it with pilot --plan document_cli.yaml.

⚙️ Options and Parameters

You can customize your interact with PR Pilot using parameters and options:

Usage: pilot [OPTIONS] [PROMPT]...

  Create a new task for PR Pilot - https://docs.pr-pilot.ai

Options:
  --wait / --no-wait        Wait for PR Pilot to finish the task.
  --repo TEXT               Github repository in the format owner/repo.
  --snap                    Select a portion of your screen to add as an image
                            to the task.
  -p, --plan PATH           Path to YAML file containing step-by-step plan for
                            PR Pilot.
  -e, --edit PATH           Let PR Pilot edit a file for you.
  --spinner / --no-spinner  Display a loading indicator.
  --quiet                   Disable all output on the terminal.
  --cheap                   Use the cheapest GPT model (gpt-3.5-turbo)
  --code                    Optimize prompt and settings for generating code
  -f, --file PATH           Generate prompt from a template file.
  --direct                  Do not feed the rendered template as a prompt into
                            PR Pilot, but render it directly as output.
  -o, --output PATH         Output file for the result.
  -m, --model TEXT          GPT model to use.
  --debug                   Display debug information.
  --help                    Show this message and exit.

⚙️ Configuration

The configuration file is located at ~/.pr-pilot.yaml.

# Your API Key from https://app.pr-pilot.ai/dashboard/api-keys/
api_key: YOUR_API_KEY

# Default Github repository if not running CLI in a repository directory
default_repo: owner/repo

🤝 Contributing

Contributors are welcome to improve the CLI by submitting pull requests or reporting issues. For more details, check the project's GitHub repository.

📜 License

The PR Pilot CLI is open-source software licensed under the GPL-3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pr_pilot_cli-1.7.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

pr_pilot_cli-1.7.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file pr_pilot_cli-1.7.0.tar.gz.

File metadata

  • Download URL: pr_pilot_cli-1.7.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for pr_pilot_cli-1.7.0.tar.gz
Algorithm Hash digest
SHA256 b30e90923e6b3eb5411a5170151dd3253b1b3ad0f43766dd9dabd3257cae7b45
MD5 befaf1da125fa847e439e80fa1fc19a0
BLAKE2b-256 e89e2dce24d8b14e6933356ce868373351cb505742fa8fe2d241ae06b7307062

See more details on using hashes here.

File details

Details for the file pr_pilot_cli-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pr_pilot_cli-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73ed1a6f72636120d40139a47abf6c4b042cd122f92e53b3477bbc67d870736a
MD5 4afd30875adc4aee0c5ca63a41b66cd8
BLAKE2b-256 bf033d771e3380f4f4ea9b2c77b6e9d57c41a6163eeaa42c3dfb2e42bde474e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page