Lab wraps Git, making it simple to clone, fork, and interact with repositories on GitLab, including seamless workflows for creating merge requests, issues and snippets.
$ lab clone gitlab-com/infrastructure # expands to: $ git clone [email protected]:gitlab-com/infrastructure
The hub tool made my life significantly easier and still does! lab is heavily inspired by hub and attempts to provide a similar feel.
brew install lab
nix-env -f '<nixpkgs>' -iA gitAndTools.lab
scoop bucket add zaquestion https://github.com/zaquestion/scoop-bucket.git scoop install lab
apk add lab
Installs lab into
curl -s https://raw.githubusercontent.com/zaquestion/lab/master/install.sh | sudo bash
NOTE: Please take care when executing scripts in this fashion. Make sure you trust the developer providing the script and consider peeking at the install script itself (ours is pretty simple ;)
Head to the releases page and download your preferred release
git clone [email protected]:zaquestion/lab cd lab go install -ldflags "-X \"main.version=$(git rev-parse --short=10 HEAD)\"" .
See the contribution guide.
lab needs your GitLab information in order to interact with to your GitLab
instance. There are several ways to provide this information to
labis running within a GitLab CI pipeline
.git/lab/lab.toml. The values in this file will override any values set in the user-specific configuration file.
If no suitable config values are found,
lab will prompt for your GitLab
information and save it into
$ lab Enter default GitLab host (default: https://gitlab.com): Enter default GitLab token:
Command-specific flags can be set in the config files.
[mr_show] comments = true # sets --comments on 'mr show' commands
# bash (~/.bashrc) source <(lab completion) # elvish (~/.elvish/rc.elv) eval (lab completion|slurp) # fish (~/.config/fish/config.fish) lab completion | source # oil source <(lab completion) # powershell (~/.config/powershell/Microsoft.PowerShell_profile.ps1) Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete lab completion | Out-String | Invoke-Expression # xonsh (~/.config/xonsh/rc.xsh) COMPLETIONS_CONFIRM=True exec($(lab completion xonsh)) # zsh (~/.zshrc) source <(lab completion zsh)
lab feels best when aliased as
git, however it's perfectly reasonable to use as a standalone tool. In your
NOTE: before aliasing, if you use git in your shell prompt command, be sure lab works by it's own first:
lab aims to feel familiar to a
git user and leverages
git to power many of it's commands.
glab will feel more familiar to
gh users and in turn is more interactive and likely more beginner friendly for that reason.
$ lab Enter GitLab host (default: https://gitlab.com):
To the extent possible under law, Zaq? Wiedmann has waived all copyright and related or neighboring rights to Lab. This work is published from: United States.