GLab open source custom Gitlab Cli tool written in Go (golang) to help work seamlessly with Gitlab from the command line.
glab <command> <subcommand> [flags]
glab mr [list, create, close, reopen, delete]
glab issue [list, create, close, reopen, delete]
glab config
glab help
$ glab issue create --title="This is an issue title" --description="This is a really long description"
$ glab issue list --closed
Download a binary suitable for your OS at https://github.com/profclems/glab/releases/latest.
Available as an installable executable file or a Portable archived file in tar and zip formats at the releases page. Download and install now at the releases page.
The installable executable file sets the PATH automatically.
Download the zip, unzip and install:
- Download the
.zip
file from the releases page unzip glab-*-linux-amd64.zip
to unzip the downloaded filesudo mv glab-*-linux-amd64/glab /usr/bin
to move to the bin path so you can executeglab
globally
Or download the tar ball, untar and install:
- Download the
.tar.gz
file from the releases page unzip glab-*-linux-amd64.tar.gz
to unzip the downloaded filesudo mv glab-*-linux-amd64/glab /usr/bin
- Download the
.tar.gz
or.zip
file from the releases page and unzip or untar - ls /usr/local/bin/ || sudo mkdir /usr/local/bin/; to make sure the bin folder exists
sudo mv glab-*-darwin-amd64/glab /usr/bin
If a supported binary for your OS is not found at the releases page, you can build from source:
-
Verify that you have Go 1.13.8+ installed
$ go version go version go1.14
If
go
is not installed, follow instructions on the Go website. -
Clone this repository
$ git clone https://github.com/profclems/glab.git glab-cli $ cd glab-cli
or
$ git clone https://gitlab.com/profclems/glab.git $ cd glab-cli
-
Build the project
$ make build
-
Move the resulting
bin/glab
executable to somewhere in your PATH$ sudo mv ./bin/glab /usr/local/bin/
or
$ sudo mv ./bin/glab /usr/bin/
-
Run
glab help
to check if it worked.
After successfull installation, run:
glab config --token=<YOUR-GITLAB-ACCESS-TOKEN> --url=https://gitlab.com --pid=<YOUR-GITLAB-PROJECT-ID> --repo=OWNER/REPO
glab config --token=sometoken --url=https://gitlab.com --pid=someprojectid --repo=profclems/glab
NB: Change gitlab.com to company or group's gitlab url if self-hosted
GITLAB_TOKEN: an authentication token for API requests. Setting this avoids being
prompted to authenticate and overrides any previously stored credentials.
GITLAB_REPO: specify the Gitlab repository in "OWNER/REPO" format for commands that
otherwise operate on a local repository.
GITLAB_URI: specify the url of the gitlab server if self hosted (eg: gitlab.example.com)
Use "glab --help" for more information about a command. Read the documentation at https://clementsam.tech/glab
Thanks for considering contributing to this project!
Please read the contibutions guide and Code of conduct.
Feel free to open an issue or submit a pull request!
Built with ❤ by Clement Sam