PR Pilot Command-Line Interface #866
Labels
AI-Agents
Autonomous AI agents using LLMs
Automation
Automate the things
CLI-UX
Command Line Interface user experience and best practices
code-generation
code generation models and tools like copilot and aider
Git-Repo
Source code repository like gitlab or gh
github
gh tools like cli, Actions, Issues, Pages
prompt
Collection of llm prompts and notes
prompt-engineering
Developing and optimizing prompts to efficiently use language models for various applications and re
Software2.0
Software development driven by AI and neural networks.
source-code
Code snippets
PR Pilot Command-Line Interface
PR Pilot is simple and intuitive CLI that assists you in your daily work:
pilot edit main.py "Add docstrings to all functions and classes"
It works with the dev tools you trust and love - exactly when and where you want it.
pilot task "Find all bug issues on Github and Linear opened yesterday, post them to #bugs-daily on Slack."
Prompt templates let you can create powerful,
executable prompt-based commands, defined as Jinja templates:
Send PR Pilot off to give any PR a title and description according to your guidelines:
➜ PR_NUMBER=153 pilot task -f generate-pr-description.md.jinja2 --save-command ✔ Task created: 7d5573d2-2717-4a96-8bae-035886420c74 (0:00:00.00) ✔ Update PR #153 title and description to reflect changes made (0:00:17.87) ╭──────────────────────────── Result ──────────────────────────────────────────╮ │ The PR title and description have been updated. You can view the PR here. │ ╰──────────────────────────────────────────────────────────────────────────────╯
The
--save-command
parameter makes this call re-usable:➜ pilot task -f generate-pr-description.md.jinja2 --save-command Save the task parameters as a command: Name (e.g. generate-pr-desc): pr-description Short description: Generate title and description for a pull request Command saved to .pilot-commands.yaml
You can now run this command for any PR with
pilot run pr-description
:To learn more, please visit our User Guide and demo repository.
📦 Installation
First, make sure you have installed PR Pilot in your repository.
Then, install the CLI using one of the following methods:
pip
Homebrew:
⚙️ Options and Parameters
The CLI has global parameters and options that can be used to customize its behavior.
🛠️ Usage
In your repository, use the
pilot
command:For more detailed examples, please visit our demo repository.
⬇️ Grab commands from other repositories
Once saved in a repository, commands can be grabbed from anywhere:
Our core repository contains an ever-growing, curated list of commands
that we tested and handcrafted for you. You can grab them and use them in your own repositories.
📝 Advanced Usage: Execute a step-by-step plan
Break down more complex tasks into smaller steps with a plan:
You can run this plan with:
PR Pilot will then autonomously:
prompts/generate-pr-description.md.jinja2
Save this as part of your code base. Next time you need a new page, simply adjust the plan and run it again.
If you don't like the result, simply close the PR and delete the branch.
You can iterate on the plan until you are satisfied with the result.
⚙️ 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.
Suggested labels
None
The text was updated successfully, but these errors were encountered: