Automatic Commit Pusher (acp) - CLI tool to create GitHub PRs from staged changes in a single command
Project description
acp - Automatic Commit Pusher
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/12
That's it. PR created, you're back on your original branch.
What it does
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.
Getting Started
Prerequisites: Python 3.10+, Git, and GitHub CLI (gh)
Authenticate GitHub CLI (if you haven't already):
gh auth login
Install from PyPI via pip or pipx:
pip install acp-gh
Or install the latest release directly from GitHub via pip or pipx:
pip install https://github.com/vbvictor/acp/releases/latest/download/acp_gh-1.7.0-py3-none-any.whl
Usage
Create 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" -v
Skip automatic PR creation and have a GitHub link to crate PR manually:
acp pr "feat: new feature" --interactive
Merge 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 rebase
When merging branch immediately, temporary local branch and
remote tracking branch will also be deleted to keep workspace clean.
Contributing
Contributions welcome! Please open an issue if you have an idea or submit a pull request.
Shell autocomplete
To enable tab completion for the acp command:
Bash:
echo 'eval "$(register-python-argcomplete --no-defaults acp)"' >> ~/.bashrc
source ~/.bashrc
Zsh:
echo 'eval "$(register-python-argcomplete --no-defaults acp)"' >> ~/.zshrc
source ~/.zshrc
Fish:
register-python-argcomplete --shell fish acp > ~/.config/fish/completions/acp.fish
Developer environment
To create a virtual environment, install dev dependencies, and run tests:
make activate # Create venv and install dev dependencies
make test # Run tests
make lint # Run ruff/black
Submit your PR
Use acp itself to create your PR:
git add .
acp pr "feat: your awesome feature"
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acp_gh-1.7.0.tar.gz.
File metadata
- Download URL: acp_gh-1.7.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c63927f00ae8bf0de427dcd4439ee724c1185029670c0d3990651e0c0907e415
|
|
| MD5 |
22f57b9cf20fb909874897aa623ecc77
|
|
| BLAKE2b-256 |
45f6f26d9e818d2ea5af254ea08de168a9cefc5c96f6d8e11579654e95a72571
|
Provenance
The following attestation bundles were made for acp_gh-1.7.0.tar.gz:
Publisher:
release.yaml on vbvictor/acp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acp_gh-1.7.0.tar.gz -
Subject digest:
c63927f00ae8bf0de427dcd4439ee724c1185029670c0d3990651e0c0907e415 - Sigstore transparency entry: 1568627097
- Sigstore integration time:
-
Permalink:
vbvictor/acp@230e23854a3abed75916e80b84b419c7a12aca74 -
Branch / Tag:
refs/tags/v1.7.0 - Owner: https://github.com/vbvictor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@230e23854a3abed75916e80b84b419c7a12aca74 -
Trigger Event:
push
-
Statement type:
File details
Details for the file acp_gh-1.7.0-py3-none-any.whl.
File metadata
- Download URL: acp_gh-1.7.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40fdf7e72c2c9fb6de996f6efdbda5ed2af701ec076c2f693abe9b9e704d8be0
|
|
| MD5 |
f0ab3f4eaef1ce64268f5893a0cf4d47
|
|
| BLAKE2b-256 |
57c87c919cfd5a6c58dc467ade6dc2233f2aedc7ef78081d3d86fd40cb749c54
|
Provenance
The following attestation bundles were made for acp_gh-1.7.0-py3-none-any.whl:
Publisher:
release.yaml on vbvictor/acp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acp_gh-1.7.0-py3-none-any.whl -
Subject digest:
40fdf7e72c2c9fb6de996f6efdbda5ed2af701ec076c2f693abe9b9e704d8be0 - Sigstore transparency entry: 1568627150
- Sigstore integration time:
-
Permalink:
vbvictor/acp@230e23854a3abed75916e80b84b419c7a12aca74 -
Branch / Tag:
refs/tags/v1.7.0 - Owner: https://github.com/vbvictor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@230e23854a3abed75916e80b84b419c7a12aca74 -
Trigger Event:
push
-
Statement type: