Skip to main content

acp - Automatic Commit Pusher

Release Python Tests Code Lint Code Format Python Version License

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:

  1. Validate you have staged changes
  2. Create a temporary branch acp/{your-github-username}/{random-16-digits}
  3. Commit your staged changes with your message
  4. Push the branch to origin repo
  5. Create a pull request to upstream if present of origin otherwise.
  6. Switch you back to your original branch
  7. 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.8.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

GPLv2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acp_gh-1.8.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acp_gh-1.8.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file acp_gh-1.8.0.tar.gz.

File metadata

  • Download URL: acp_gh-1.8.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for acp_gh-1.8.0.tar.gz
Algorithm Hash digest
SHA256 195e89d48fd0c9fe4f4eabe499b28a880328aceea1342640f6b59a2bf4b9ba05
MD5 441c16e575027efcd06d3e4bf2f6d568
BLAKE2b-256 1555c199c00d02939c65fdaec609a057c297302702fc92938b79556cb514af67

See more details on using hashes here.

Provenance

The following attestation bundles were made for acp_gh-1.8.0.tar.gz:

Publisher: release.yaml on vbvictor/acp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file acp_gh-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: acp_gh-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for acp_gh-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd88bc7725b59118c958d6d7ef6cdf0cb1ac2ae8fcf8624686edd4d58928e302
MD5 483e9e7c809acf0db4020962a16643bf
BLAKE2b-256 2840d2f6164e75da6cb5f82af8881a7ecd3ae674b2ec7d2b9c65c9ba65712c14

See more details on using hashes here.

Provenance

The following attestation bundles were made for acp_gh-1.8.0-py3-none-any.whl:

Publisher: release.yaml on vbvictor/acp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.8.0

2 files

0.7.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page