CLI tool that collects all changes from a local branch, creates a pull request description following a configurable template, and opens the PR using the gh CLI.
- Automatically detects commits and file changes between your branch and the base branch (
main,master, ordevelop). - Renders a structured PR description from a built-in default template (or a custom one you supply).
- Opens the draft description in your
$EDITORso you can fill it in before the PR is created. - Creates the PR via
gh pr createwith the correct title, body, and base branch. - Supports draft PRs and a
--dry-runmode for previewing without creating anything.
- Python 3.8+
- GitHub CLI (
gh) installed and authenticated.
pip install .To use aider-pr from any directory, install it into a global/user environment:
pipx install .or
python -m pip install --user .aider-gh-cli create-pr [OPTIONS]
agc create-pr [OPTIONS]
aider-pr is a short alias for aider-gh-cli.
| Option | Description |
|---|---|
--base BRANCH |
Base branch to compare against (default: auto-detected main/master/develop). |
--repo PATH |
Target git repository path (default: current directory). |
--title TEXT |
PR title. Defaults to the subject of the most recent commit. |
--template FILE |
Path to a custom Markdown template file. |
--no-edit |
Skip opening an editor; submit the template as-is. |
--draft |
Open the pull request as a draft. |
--dry-run |
Print the PR title and body without actually creating the PR. |
# Auto-detect base branch, open editor to fill in description, then create PR
aider-gh-cli create-pr
aider-pr create-pr
# Preview what will be submitted without creating the PR
aider-gh-cli create-pr --dry-run
aider-pr create-pr --dry-run
# Use a custom template and skip the editor
aider-gh-cli create-pr --template .github/pull_request_template.md --no-edit
# Create a draft PR against a specific base branch
aider-gh-cli create-pr --base develop --draft
# Run from anywhere by explicitly selecting the repository
aider-pr create-pr --repo /path/to/your/repo --dry-runThe built-in PR description template looks like this:
# Pull Request
## Summary
Describe what changed and why.
## Type Of Change
- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Test only
## User Impact
What should users notice after this change?
## Validation
List commands run and outcomes.
\`\`\`bash
python -m unittest discover -s tests -p "*.py"
\`\`\`
## Checklist
- [ ] Tests added or updated
- [ ] Docs updated (README or docs)
- [ ] No secrets committed
- [ ] Generated artifacts excluded from gitpython -m unittest discover -s tests -p "*.py"