Turn your staged changes into a GitHub pull request with a single command.
No more branch naming, no browser tabs, no clicking through forms.
git add .
acp pr "fix: typo in readme"
PR created: https://github.com/vbvictor/acp/pull/12That's it. PR created, you're back on your original branch.
When you run acp pr <commit message>, acp will:
- Validate you have staged changes
- Create a temporary branch
acp/{your-github-username}/{random-16-digits} - Commit your staged changes with your message
- Push the branch to origin repo
- Create a pull request to upstream if present of origin otherwise.
- Switch you back to your original branch
- Print the PR URL
The tool can also merge freshly created PR via --merge or --auto-merge options, see --help for more information.
Prerequisites: Python 3.9+, Git, and GitHub CLI (gh)
Authenticate GitHub CLI (if you haven't already):
gh auth loginDownload and install the latest release directly via pip or pipx:
pip install https://github.com/vbvictor/acp/releases/latest/download/acp-0.6.0-py3-none-any.whlCreate basic PR:
git add .
acp pr "fix: correct calculation bug"Create PR body message and run acp with verbose output:
acp pr "fix: resolve issue" -b "Closes #123" -vSkip automatic PR creation and have a GitHub link to crate PR manually:
acp pr "feat: new feature" --interactiveMerge PR immediately after creation or use GitHub auto-merge feature:
# Squash and merge immediately (default merge method)
acp pr "fix: urgent hotfix" --merge
# Use different merge methods: merge, squash, or rebase
acp pr "fix: hotfix" --merge --merge-method merge
acp pr "feat: feature" --auto-merge --merge-method rebaseWhen merging branch immediately, temporary local branch and
remote tracking branch will also be deleted to keep workspace clean.
Contributions welcome! Please open an issue if you have an idea or submit a pull request.
Create a virtual environment, install dev dependencies, and run tests:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
pytest test_acp.py -vUse acp itself to create your PR:
git add .
acp pr "feat: your awesome feature"