CreatePR

A simple command-line utility that opens GitHub's "New Pull Request" page in your browser directly from your terminal. Skip the manual navigation and instantly create PRs for your current branch.
β¨ Features
- π One Command: Run
createpr and immediately open the correct GitHub PR creation page
- π Auto-detection: Automatically detects GitHub repository URL from Git remotes
- πΏ Branch Aware: Uses your current branch as the source branch for the PR
- π Secure: Works with both HTTPS and SSH remote URLs
- π Fast: No dependencies other than Git itself
π¦ Installation
Using Homebrew (macOS)
brew tap internetblacksmith/internetblacksmith
brew install createpr
Using Scoop (Windows)
scoop bucket add internetblacksmith https://github.com/internetblacksmith/scoop-bucket
scoop install internetblacksmith/createpr
Using Pre-built Binaries
- Go to the Releases page
- Download the appropriate binary for your system:
createpr_linux_amd64.tar.gz for Linux (64-bit)
createpr_darwin_amd64.tar.gz for macOS (Intel)
createpr_darwin_arm64.tar.gz for macOS (Apple Silicon)
createpr_windows_amd64.zip for Windows (64-bit)
- Extract the archive
- Move the
createpr executable to a directory in your PATH
Using Go Install
If you have Go installed:
go install github.com/internetblacksmith/createpr@latest
π Usage
Navigate to any Git repository in your terminal and run:
createpr
This will:
- Detect the GitHub repository URL from your Git remote
- Identify your current branch
- Open your default web browser to GitHub's "New Pull Request" page with your branch pre-selected
Examples
# Basic usage
cd ~/projects/my-repo
createpr
π§ͺ Development
Prerequisites
Building from Source
# Clone the repository
git clone https://github.com/internetblacksmith/createpr.git
cd createpr
# Build
go build
# Run tests
go test
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Inspired by a rant from Theo in one of his streams
- Built with Go
- Released with GoReleaser
Made with β€οΈ by Internet Blacksmith
```
Planned improvements
- Add option to open the extended PR view
- Handle other services BitBucket/Gitlab etc...