Lab wraps Git or Hub, 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
lab will look for hub and uses that as your git binary when available so you don't have to give up hub to use lab
$ lab version
git version 2.11.0
hub version 2.3.0-pre9
lab version 0.14.0
The hub tool made my life significantly easier and still does! lab is heavily inspired by hub and attempts to provide a similar feel.
Dependencies
git
orhub
brew install zaquestion/tap/lab
scoop bucket add zaquestion https://github.com/zaquestion/scoop-bucket.git
scoop install lab
Installs lab into /usr/local/bin/
curl -s https://raw.githubusercontent.com/zaquestion/lab/master/install.sh | bash
Head to the releases page and download your preferred release
Required
git clone [email protected]:zaquestion/lab
cd lab
go install -ldflags "-X \"main.version=$(git rev-parse --short=10 HEAD)\"" .
or
make install
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 lab
:
- Environment variables:
LAB_CORE_HOST
,LAB_CORE_USER
,LAB_CORE_TOKEN
- Environment variables:
CI_PROJECT_URL
,CI_REGISTRY_USER
,CI_JOB_TOKEN
- Note: these are meant for when
lab
is running within a GitLab CI pipeline
- Note: these are meant for when
- HCL config file:
./lab.hcl
- HCL config file:
~/.config/lab.hcl
These are checked in order. If no suitable config values are found, lab
will
prompt for your GitLab information and save it into ~/.config/lab.hcl
.
For example:
$ lab
Enter default GitLab host (default: https://gitlab.com):
Enter default GitLab user: zaq
Enter default GitLab token:
Like hub, lab feels best when aliased as git
. In your .bashrc
or .bash_profile
alias git=lab