git-lab
git-lab
This little executable (if on your $PATH
) adds another command to git: lab
. Its default action is to print out some information about its own configuration; its subcommands provide some wrappers around calls to the GitLab API.
It's also a library that lets you build your own GitLab-related tools, and can run a basic server.
The behaviour is slightly enhanced if in a git work-dir whose origin is a GitLab project.
Quick Start
In future, there should be releases on the project's GitLab site for the more common architectures and package managers.
For now, you need to have Crystal, clone the repo, run shards build --release
, and put the resulting bin/git-lab
somewhere executable.
If you just want to use the shard in your own library:
# shard.yml
dependencies:
git-lab:
gitlab: bjjb/git-lab
You can use it with
require GitLab
puts GitLab.version
Usage
The binary is self-documenting, so just install it and run git lab help
.
Development
After checking out the repo, run shards install
to install dependencies. Then, run crystal spec
to run the tests.
You'll also need [libgit2][] to be discoverable by the linker. Most package managers have this.
You can build the binary with shards build
; the resultant git-lab
binary will be in bin/
. See [BUILDING.md][] for more details.
The project's pipeline checks formatting and specs, so make sure that
crystal tool format --check
crystal spec
both pass before committing anything.
Notes
-
On MacOS, you may encounter an error like this:
ld: library not found for -lssl (this usually means you need to install the development package for libssl) This informs you that the libssl library could not be found, which may indeed be the case if you've installed
libressl
using homebrew. (The library is required to communicate with the GitLab API over HTTPS). You can fix this by having the shell provide a hint to the linker about where additional packages can be found as follows:export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
Contributing
Bug reports and pull requests are welcome on GitLab. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the guidelines.
License
All code is available as open source under the terms of the MIT License.
git-lab
- 1
- 0
- 3
- 0
- 0
- about 1 month ago
- August 12, 2020
MIT License
Sun, 29 Jun 2025 23:24:40 GMT