Skip to content

RonaldHensbergen/aider-gh-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aider-gh-cli

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.

Features

  • Automatically detects commits and file changes between your branch and the base branch (main, master, or develop).
  • Renders a structured PR description from a built-in default template (or a custom one you supply).
  • Opens the draft description in your $EDITOR so you can fill it in before the PR is created.
  • Creates the PR via gh pr create with the correct title, body, and base branch.
  • Supports draft PRs and a --dry-run mode for previewing without creating anything.

Requirements

Installation

pip install .

To use aider-pr from any directory, install it into a global/user environment:

pipx install .

or

python -m pip install --user .

Usage

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.

Examples

# 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-run

Default Template

The 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 git

Running Tests

python -m unittest discover -s tests -p "*.py"

About

Cli tool that collects all changes from a local branch, creates the documents following a particular template and creates a PR using gh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages