4 releases (breaking)
new 0.5.0 | Dec 10, 2024 |
---|---|
0.4.0 | Oct 24, 2023 |
0.3.0 | Apr 24, 2023 |
0.2.4 | Jan 11, 2023 |
#402 in Command line utilities
215 downloads per month
145KB
116 lines
gho
A simple multi-platform cli utility written in Rust that opens your browser in your project’s repo on gitlab or github.
While a bash script like the following could work, that will not work on Windows:
gho ()
{
( set -e;
git remote -v | grep push;
remote=${1:-origin};
echo "Using remote $remote";
URL=$(git config remote.$remote.url | sed "s/git@\(.*\):\(.*\).git/https:\/\/\1\/\2/");
echo "Opening $URL...";
open $URL )
}
gho
on the other hand, should work fine (testers and feedback are welcome).
The url is fetched on your remotes.
Install
cargo install --locked --git https://github.com/chevdor/gho
Usage
-
gho
to simply open the first remote -
gho upstream
to open yourupstream
remote
Command line utility to quickly open your github/gitlab repo in a browser
Usage: gho [REMOTE]
Arguments:
[REMOTE] Name of a remote
Options:
-h, --help Print help
-V, --version Print version
Dependencies
~7–18MB
~232K SLoC