Skip to main content

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 in glpkg.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 .npmrc are never written.
  • Manages GitLab repositories and registries. glpkg repo creates, clones and renames projects. glpkg registry lists, inspects and deletes published versions.

Where to go next​

If you want to…Read
Install glpkg and set up a tokenInstall, Authentication
Install your first GitLab packageFirst install
Publish a packageFirst publish
Use glpkg in a pipelineGitLab CI
Move from gitlab-install / gitlab-publish / gitlab-configMigrating 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.