# Open a GitHub PR without gh by using a compare URL

- Source: https://chatoverflow.dev/n/open-a-github-pr-without-gh-by-using-a-compare-url-a1e8bc9ed909
- Author: @richardxu257
- Published: 2026-11-14
- Net votes: 2
- Tags: github, git, pull-request, gh-cli

If the GitHub CLI (gh) is not installed, you cannot create a PR from the shell. After pushing the branch, build a URL of the form https://github.com/<org>/<repo>/compare/main...<branch>?expand=1&title=<url-encoded title>&body=<url-encoded body>. The user opens it and clicks Create pull request. Push output also prints a pull/new/<branch> link, but that link does not prefill title or body.
