{"id":16711674,"url":"https://github.com/ymtszw/ex_ghpr","last_synced_at":"2026-05-18T08:34:14.821Z","repository":{"id":57500554,"uuid":"61270997","full_name":"ymtszw/ex_ghpr","owner":"ymtszw","description":"CLI to work with Github Pull Request","archived":false,"fork":false,"pushed_at":"2018-02-26T09:27:26.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-18T17:01:48.580Z","etag":null,"topics":["cli","elixir","github"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/ex_ghpr","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ymtszw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-16T07:19:14.000Z","updated_at":"2018-02-13T13:35:38.000Z","dependencies_parsed_at":"2022-08-30T21:00:34.008Z","dependency_job_id":null,"html_url":"https://github.com/ymtszw/ex_ghpr","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ymtszw/ex_ghpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Fex_ghpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Fex_ghpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Fex_ghpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Fex_ghpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymtszw","download_url":"https://codeload.github.com/ymtszw/ex_ghpr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Fex_ghpr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33170879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","elixir","github"],"created_at":"2024-10-12T20:25:31.766Z","updated_at":"2026-05-18T08:34:14.804Z","avatar_url":"https://github.com/ymtszw.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExGHPR\n\n[![Hex.pm](https://img.shields.io/hexpm/v/ex_ghpr.svg)](https://hex.pm/packages/ex_ghpr)\n[![Build Status](https://travis-ci.org/ymtszw/ex_ghpr.svg?branch=master)](https://travis-ci.org/ymtszw/ex_ghpr)\n\n`ghpr` command to work with GitHub Pull Request.\n\nInspired by [github/hub](https://github.com/github/hub) CLI. Written in Elixir.\n\n## Features\n\n- Open Pull Request\n    - Automatically push, put title, write issue URL in description\n    - Also, copy resultant Pull Request URL to clipboard\n    - You can configure issue tracker URL and identities **per repository**\n        - This is my original intension for this tool over `hub`!\n- Search Pull Requests related to a SHA hash or file name\n\n## Installation\n\n0. Require Git (1.8+)\n1. Install [Erlang](http://erlang.org/) and [Elixir](http://elixir-lang.org/)\n    - Personally recommend [asdf](https://github.com/asdf-vm/asdf) with\n    [asdf-erlang](https://github.com/asdf-vm/asdf-erlang)/[asdf-elixir](https://github.com/asdf-vm/asdf-elixir)\n    - If you install via compiled binary, the only dependency is Erlang\n    - If you want to build by yourself, Elixir and `mix` required\n2. Install by either:\n    - `mix` (Elixir 1.3+)\n        - Commands:\n        ```\n        $ mix escript.install hex ex_ghpr\n        ```\n        - Installed binary should be `~/.mix/escripts/ghpr`\n        - Add `~/.mix/escripts` to your `PATH` env var (default escript installation path from Elixir 1.3)\n        - To uninstall, `mix escript.uninstall ghpr` (notice the command name, not repository name)\n    - `mix` (Elixir 1.2 or older)\n        - Commands:\n        ```\n        $ git clone https://github.com/ymtszw/ex_ghpr\n        $ cd ex_ghpr\n        $ mix deps.get\n        $ mix escript.build\n        ```\n        - Installed binary should be `~/.mix/escripts/ghpr`\n        - Add `~/.mix/escripts` to your `PATH` env var (default escript installation path from Elixir 1.3)\n        - To uninstall, just remove `ghpr` binary\n    - downloading compiled binary from [here](https://github.com/ymtszw/ex_ghpr/releases/latest)\n\n## Usage\n\n    $ ghpr\n\nThis will do:\n\n- Push your current branch to your `origin` repository\n    - Just calling system's `git` command\n    - That means, you should name a repository from which you send PR, as `origin`\n    - Implicitly sets upstream by `--set-upstream` option on push\n- Open Pull Request of the branch to the repository\n    - Remote, base, title, description, fork user can be set with options\n    - See below for default behaviors\n- `pbcopy` (OSX) or `clip` (Windows) the resultant Pull Request URL\n    - If neither exist, just print the URL\n\n### Sub-commands and options\n\n- `$ ghpr create`\n    - Explicitly create Pull Request (to differentiate from `search`)\n    - Always request to pull the current branch\n- Options for `create`\n    - `$ ghpr {-t|--title} \u003ctitle\u003e`\n        - Manually set title of the Pull Request\n        - Defaults to branch name\n    - `$ ghpr {-m|--message} \u003cdescription\u003e`\n        - Manually set description of the Pull Request\n        - Defaults to issue URL (if issue tracker URL is set\n        and the branch name starts with issue number)\n        - If issue tracker URL is not set, no description will be attached\n            - In Github, *\"No description provided\"* message will be shown\n    - `$ ghpr {-r|--remote} \u003cremote\u003e`\n        - Change target repository\n        - `\u003cremote\u003e` must exist as `git remote` in the repository\n        - Defaults to `origin`\n    - `$ ghpr {-b|--base} \u003cbase\u003e`\n        - Change Pull Request target reference\n        - Defaults to `master`. Can be branch name or tag\n    - `$ ghpr --fork \u003cusername\u003e`\n        - Specify fork user for Cross-repository Pull Request\n        - In API call, `head` parameter will become `\u003cusername\u003e:\u003ccurrent_branch\u003e`\n        - Obviously, you need to fork the original repository first,\n        if you are not authorized to push to it\n    - `$ ghpr {-c|--configure} {local|global|auth}`\n        - Re-configuration.\n        - To re-authenticate, use `auth` for a non-default user, and `global` for the default user.\n- `$ ghpr search \u003csha_hash\u003e`\n    - Search Pull Request related to a SHA hash, then open it in your browser\n    - If no Pull Request found for that commit hash, nothing happens\n- Options for `search`\n    - `$ ghpr search {-l|--line} \u003cnumber\u003e \u003cfile_name\u003e`\n        - Blame specified line of the file, then search Pull Request related to the SHA hash\n        - When you specify `--line`, `file_name` must be a valid file\n    - `$ ghpr search {-r|--remote} \u003csha_hash\u003e`\n        - Change target repository\n        - `\u003cremote\u003e` must exist as `git remote` in the repository\n        - Defaults to `origin`\n\n\n## Configuration\n\n- On the first invocation of `$ ghpr`, it should ask you:\n    - Your Github username and username\n        - Used to acquire a [personal access token](https://github.com/blog/1509-personal-api-tokens)\n        for `ex_ghpr` application, with `repo` access scope\n        - You can always revoke access token via [Github web console](https://github.com/settings/tokens)\n- On the first invocation of `$ ghpr` from the current git repo directory, it should ask you:\n    - Whether you want to use the default user, or different user for that repo\n    - Your issue tracker URL for the repo\n    (will be used to build an issue URL. Must not end with `/`)\n- Configurations and tokens will be stored in `~/.config/ghpr` as JSON format\n- Configurations are held per local repository\n\n## License\n\nBSD-3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymtszw%2Fex_ghpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymtszw%2Fex_ghpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymtszw%2Fex_ghpr/lists"}