aipr creates a GitHub pull request from your current branch using AI-generated title/body based on commits that differ from your configured base branch.
- Generates PR title and description with OpenRouter
- Uses
gh pr createto open the PR - Stores config globally in
~/.aipr/config.json - Lets you set a different base branch per repo path
gitgh(authenticated withgh auth login)- Go 1.22+
From this repo:
go install .Make sure your Go bin path is in PATH (usually $(go env GOPATH)/bin).
- Set your OpenRouter API key:
aipr config openrouter-api-key <your-api-key>- (Optional) Set the model globally:
aipr config model qwen/qwen3.5-flash-02-23- Set base branch for the current repo:
aipr config base develop- Run it:
aipraipr
aipr --head-owner <github-user-or-org>
aipr config base <branch>
aipr config openrouter-api-key <api-key>
aipr config model <openrouter-model># On feature branch: feat/better-readme
aipr config base master
aipr config model qwen/qwen3.5-flash-02-23
aiprExpected flow:
aiprfinds commits inmaster..feat/better-readme- sends commit context to OpenRouter
- receives generated PR title/body
- runs
gh pr create --base master --head feat/better-readme ...
Fork workflow:
# Branch exists on your fork, PR targets upstream repo
aipr --head-owner gtupakThis makes aipr call gh pr create --head gtupak:<current-branch> ....
- If no commits differ from base, no PR is created.
- If AI generation fails,
aiprexits with an error (no fallback). - Default base branch is
masterif none is configured for the repo.