CLI for PR Pilot, a text-to-task automation platform for Github.
Project description
Install | Documentation | Blog | Website
PR Pilot CLI
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 templates, you can create powerful, reusable commands that can be executed by PR Pilot. Here is how it works:
Write a template file:
Take a look at our test results:
---
{{ sh('pytest') }}
---
Understand why the tests are failing by reading the relevant code files.
Give a short, concise, structured analysis of the test results.
Execute the file:
pilot -f analyze_test_results.md.jinja2
For more examples, check out the prompts directory in this repository.
Installation
Make sure you have PR Pilot installed in your repository
To install the CLI, run the following command:
pip install --upgrade pr-pilot-cli
By default, the CLI will prompt you to input your API key if it is not already configured.
Usage
After installation, open a terminal and ls
into a repository you have installed PR Pilot in and talk to PR Pilot:
Examples
Translate a file:
pilot --raw "translate the README into German" > README_German.md
Let it write some unit tests:
pilot "Write some unit tests for the utils.py file."
Find some information in your Github issues:
pilot "Do we have any open Github issues regarding the AuthenticationView class?"
For more information, check out our User Guide.
Options and Parameters
You can change the default settings with parameters and options:
Usage: pilot [OPTIONS] [PROMPT]...
Options:
--wait / --no-wait Wait for the result.
--repo TEXT Github repository in the format owner/repo.
--chatty Print more information.
--raw For piping. No pretty-print, no status indicator.
--code Disable formatting, enable RAW mode, use GPT-4 model.
-f, --file PATH Load prompt from a template file.
--direct Do not use the rendered template as a prompt for PR
Pilot, but render it directly as output.
-o, --output PATH Output file for the result.
--model TEXT GPT model to use.
--debug Display debug information.
--help Show this message and exit.
Features
- Configuration Management: Automatically manages API key configuration by prompting the user to input their API key if not already configured.
- Task Creation: Users can create tasks by specifying a repository and a prompt. The CLI handles task creation and optionally waits for the result.
- Result Retrieval: If the
--wait
option is used, the CLI waits for the task to complete and displays the result directly in the terminal. - Dashboard Link: For tasks that are not awaited, the CLI provides a link to the task's dashboard for further monitoring.
Configuration
The configuration file is located at ~/.pr-pilot.yaml
.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pr_pilot_cli-1.3.3.tar.gz
.
File metadata
- Download URL: pr_pilot_cli-1.3.3.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f354a7bf3b5baecab0146092ad16f7d5102937be16d5b283da10a23f32c81a7 |
|
MD5 | 9f0141b548e577268cdf054b0a4d9bf3 |
|
BLAKE2b-256 | 219dbb483305f6edf1ede2bd3c485c0390f5470d778a5e5f75974b6f957081ab |
File details
Details for the file pr_pilot_cli-1.3.3-py3-none-any.whl
.
File metadata
- Download URL: pr_pilot_cli-1.3.3-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bac2a12521dc2c2c69072e4dd8dd8113f7549305f182455d0ef532be093b1a3 |
|
MD5 | 0baca083dd6b75f6afe763b085e2d396 |
|
BLAKE2b-256 | 7168949bf17eeb6e69ea92ccea9609332bf0f2776d1f126ca8eebdf3d7502307 |