https://github.com/bitbonsai/gitlink-cli
Small CLI tool to open the git repo page (github, gitlab, bitbucket) in default browser, or print its URL (in case you're in a remote terminal). Can also show a specific commit page if partiaal sha1 is provided
https://github.com/bitbonsai/gitlink-cli
cli git nodejs utils
Last synced: 11 months ago
JSON representation
Small CLI tool to open the git repo page (github, gitlab, bitbucket) in default browser, or print its URL (in case you're in a remote terminal). Can also show a specific commit page if partiaal sha1 is provided
- Host: GitHub
- URL: https://github.com/bitbonsai/gitlink-cli
- Owner: bitbonsai
- License: mit
- Created: 2018-03-13T09:59:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-26T03:44:19.000Z (about 4 years ago)
- Last Synced: 2025-07-08T09:47:42.209Z (12 months ago)
- Topics: cli, git, nodejs, utils
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gitlink-cli
This is a small command line utility to open the current remote repository in a browser from the command line.
The idea is that you're in terminal, working on a repo, then just type `gitlink` and your default browser magically opens the gitlab/github/bitbucket... url.
If you're not on a git repo, there's a nice and color error message.
Tested on mac only, created in a few minutes in node after banging my head on the table trying to make it work on bash.
## Installation
### Package managers (`yarn`, `npm`)
`yarn global add gitlink-cli`
`npm -g install gitlink-cli`
### Cloning
1. Clone this repo somewhere in your computer: `git clone https://github.com/bitbonsai/gitlink-cli.git`
2. `yarn link` in the directory is the fastest/easiest way to install (and be able to customize).
3. `npm link` also works, if you're not into yarn.
## Usage
Just go to a repo and type `gitlink` to open a browser window with the repo. If you're on an environment without a browser or pass `--print`, it will just print the URL, so you can command click (for my friends who work from ssh)
Or add part of a `sha1` to it and open a single commit page: `gitlink b844b99` (thanks for the idea, @ricardobeat)