glpkg
glpkg is one command-line tool, glpkg, for installing and publishing packages with
GitLab package registries. It covers npm, PyPI, Go, NuGet and GitLab generic packages.
npm install -g @glpkg/cli
glpkg config save <your-gitlab-token>
glpkg install @your-org/utils --group your-org
glpkg publish --bump patch
What glpkg does
- Installs from GitLab with an explicit source. You say where each package comes from: a
GitLab group (
--group) or the ecosystem's own registry (--external). glpkg records that choice inglpkg.lock.json, so later installs need no flags. See Package sources. - Never installs a look-alike. If a GitLab group does not host a package, the install fails. glpkg does not fall back to a same-named package on another registry.
- Publishes to the project registry of the current Git repository. It can bump the version and create the release commit, tag and push.
- Keeps your npm config clean. Registry and token settings go into a temporary npm
config file that is deleted after the command. Your project and user
.npmrcare never written. - Manages GitLab repositories and registries.
glpkg repocreates, clones and renames projects.glpkg registrylists, inspects and deletes published versions.
Where to go next
| If you want to… | Read |
|---|---|
| Install glpkg and set up a token | Install, Authentication |
| Install your first GitLab package | First install |
| Publish a package | First publish |
| Use glpkg in a pipeline | GitLab CI |
Move from gitlab-install / gitlab-publish / gitlab-config | Migrating from the gitlab-* CLIs |
Older CLIs
The separate gitlab-install, gitlab-publish and gitlab-config CLIs
(@glpkg/installer, @glpkg/publisher, @glpkg/config) are no longer maintained
and deprecated on npm. To switch, see
Migrating from the gitlab-* CLIs.
Check which version you have with glpkg --version.