@gitbeaker/cli

中文文档
44.1.3发布于 2026/11/16MITES Module近 30 天下载 8347

CLI implementation of the GitLab API.

原始使用文档
文档目录3 节
  1. Table of Contents
  2. Usage
  3. Contributors


gitbeaker



CircleCI CLI Coverage Auto All Contributors Prettier Licence: MIT Install Size: CLI

A CLI Wrapper for the @gitbeaker/rest SDK.

Table of Contents

Usage

Node 18+

Install with npm install -g @gitbeaker/cli, yarn add -g @gitbeaker/cli, or pnpm add -g @gitbeaker/cli

gitbeaker [service name] [method name] --config_args pos_arg1 pos_argN --opts_arg1 --opts_argN

# A shorthand can also be used:
gb [service name] [method name] --config_args pos_arg1 pos_argN --opts_arg1 --opts_argN

Where:

  • service name is any of the supported API names of the @gitbeaker/rest sdk
  • method name is any of the supported commands on that API service (See source for exceptions, but generally all, show, remove, update)
  • --config_args is any of general configuration arguments such as your personal token. These are outlined in this table and can also be found by looking at the cli help menu. These arguments must also include a gb or gl prefix. ie.
# To get all the projects
gitbeaker projects all --gb-token="personaltoken"
  • pos_arg1 ... pos_argN are any of the arguments you would normally supply to the function. The names of the args should match the names in the method headers. These positional arguments can also be written as flag arguments: --pos_arg1 ... --pos_argN, BUT must be written in the correct order.
  • --opts_arg1 ...--opts_argN are any of the optional arguments that you would normally supply to the function. Their names should match what the GitLab API docs request.
# To get all the projects id=2 and optional parameter "search" = "cool"
gitbeaker projects all --gb-token="personaltoken" 2 --search="cool"

To reduce the annoyance of having to pass those configuration properties each time, it is also possible to pass the token and host information through environment variables in the form of GITLAB_[option name] or GITBEAKER_[option name] ie:

GITLAB_HOST=http://example.com
GITLAB_TOKEN=personaltoken
GITBEAKER_CAMELIZE=true

Contributors

Justin Dalrymple Dylan DesRosier Mike Wyatt Cory Zibeill Martin Bour akira345 Pavel Birukov Joseph Petersen Louis Cherel Adam Dehnel Ev Haus Loïc Mahieu Giuseppe Angri jennparise Oscar Daniel Ruf schindld Alvaro Daniel Moore Dylan M. Taylor Corentin Mors xatavian Yevgeny Petukhov Mickaël Tricot Andrea Flavien Bridault s-kazuki Kipras Melnikovas xieyu st1gok Max Wittig Niklas Lochschmidt Ilya Dus Omar Awamry Hennadii Varava xiezht Martin Helmich Sean McGivern Clemens Lieb Vojtěch Sajdl divido Vincent Boulaye Aliyss Snow Mahmoud Saada Feng Yu Roy Jacobs Paul Lemke Ian Jenkins nilennoct Laffargue Michael Martin Howarth Christoph Lehmann Frank V Salim Benabbou Tamás Török-Vistai Martin Benninger fewieden Jeff Pelton Claude Abounegm Stefan Hall Jordan Wallet zhao0 Joshua Grosso Isaac Ouellet Therrien Rajat Sharma Cesar B. Igor Katsuba Michael Townsend bodtx Artem Munif Tanjim Quentin Dreyer Norm MacLennan jnovick Fabian Aussems Michael Matzka CraigAllardyce Bruno Guimarães Lukas Eipert Maximilian Krauß Evolution Engineering WEBER Logan Anton Zhukov Nicholas Loomans Carl Kittelberger Patrik Votoček Kyrylo Fedorov Claudio Vellage Seb0uil Rafael Mello Théis Bazin Spencer Salisbury Simone Corsi Bambii Will ArnaudTA Benjamin Beret Alessandro Diez artlist-scottambrose Martin Dreher Elan Ruusamäe artemoire Pieter Willekens David Claybourne Dom Harrington Kohei Seino JounQin Elaine Mattos DK Koen Brouwer Sefa Eyeoglu Carmi Raz Arnold Hendriks Baylee Schmeisser Andy roberta-pavel Youssef Miguel Giannis Kepas Talysson de Oliveira Cassiano Marco Endrik Einberg Bryan Lee Zack Kay W. Florian Imdahl lanthier ShaoWei Teo Daniel Rentz Matěj Smíšek

This started as a fork from node-gitlab-legacy but I ended up rewriting much of the code. Here are the original work's contributors.

版本与发布记录

@gitbeaker/cli 共发布 313 个版本,首次发布于 2020/03/22;过去 12 个月发布了 29 个版本。

版本发布日期距今
44.1.3latest2026/11/16今天
44.1.22026/11/16今天
44.1.12026/11/16今天
44.1.02026/11/16今天
44.0.72026/11/16今天
44.0.62026/11/151 天前

其他发布通道:canary → 0.0.0-canary-20260813022219,pre → 44.0.0-pre.0。

关于 @gitbeaker/cli 的常见问题

@gitbeaker/cli 是什么?

CLI implementation of the GitLab API.

如何安装 @gitbeaker/cli?

在项目目录运行 npm install @gitbeaker/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gb、gitbeaker,可以用 npx gb 直接运行。

@gitbeaker/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/gitbeaker__cli 是否存在。

@gitbeaker/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@gitbeaker/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=v24.16.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@gitbeaker/cli 可以商用吗?

@gitbeaker/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gitbeaker/cli 的下载量有多少?

根据 npm 官方下载统计,@gitbeaker/cli 在 2026/10/17 – 2026/11/15 这 30 天内被下载 8,347 次,日均约 278 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gitbeaker/cli 还在维护吗?

最新版本 44.1.3 发布于 2026/11/16(今天);至今共发布 313 个版本,其中过去 12 个月发布了 29 个;首次发布于 2020/03/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。