GLab: A GitLab Cli Tool

栏目: IT技术 · 发布时间: 4年前

内容简介:GLab open source custom Gitlab Cli tool written in Go (golang) to help work seamlessly with Gitlab from the command line.Download a binary suitable for your OS at

GLab

GLab open source custom Gitlab Cli tool written in Go (golang) to help work seamlessly with Gitlab from the command line.

GLab: A GitLab Cli Tool

Usage

glab <command> <subcommand> [flags]

Core Commands

glab mr [list, create, close, reopen, delete]
glab issue [list, create, close, reopen, delete]
glab config
glab help

Examples

$ glab issue create --title="This is an issue title" --description="This is a really long description"
$ glab issue list --closed

Installation

Download a binary suitable for your OS at https://github.com/profclems/glab/releases/latest .

Windows

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.

Linux

Download the zip, unzip and install:

  1. Download the .zip file from the releases page
  2. unzip glab-*-linux-amd64.zip to unzip the downloaded file
  3. sudo mv glab-*-linux-amd64/glab /usr/bin to move to the bin path so you can execute glab globally

Or download the tar ball, untar and install:

  1. Download the .tar.gz file from the releases page
  2. unzip glab-*-linux-amd64.tar.gz to unzip the downloaded file
  3. sudo mv glab-*-linux-amd64/glab /usr/bin

MacOS

  1. Download the .tar.gz or .zip file from the releases page and unzip or untar
  2. ls /usr/local/bin/ || sudo mkdir /usr/local/bin/; to make sure the bin folder exists
  3. sudo mv glab-*-darwin-amd64/glab /usr/bin

Building From Source

If a supported binary for your OS is not found at the releases page , you can build from source:

  1. 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 .

  2. 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
  3. Build the project

    $ make build
  4. 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/
  5. Run glab help to check if it worked.

Setting Up

After successfull installation, run:

glab config --token=<YOUR-GITLAB-ACCESS-TOKEN> --url=https://gitlab.com --pid=<YOUR-GITLAB-PROJECT-ID> --repo=OWNER/REPO

Example

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

Envronment Variables

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)

Learn More

Use "glab --help" for more information about a command. Read the documentation at https://clementsam.tech/glab

Contributions

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!

License

MIT

Author

Built with by Clement Sam


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

UNIX系统编程: 通信、并发与线程

UNIX系统编程: 通信、并发与线程

【美】Kay Robbins、Steve Robbins / 师蓉 / 电子工业出版社 / 2018-5 / 198

《UNIX系统编程: 通信、并发与线程》是一本基于最新UNIX标准的完备的参考书,对UNIX编程的要点进行了清晰易懂的介绍,从一些用于说明如何使用系统调用的短小代码段开始,逐渐过渡到能帮助读者扩展自己技能水平的实际项目中。《UNIX系统编程: 通信、并发与线程》中对通信、并发和线程问题进行了深入探讨,对复杂的概念(如信号和并发)进行了全面且清晰的解释,还覆盖了与文件、信号、信号量、POSIX线程和......一起来看看 《UNIX系统编程: 通信、并发与线程》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

MD5 加密
MD5 加密

MD5 加密工具