百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cli-gitlab

> 编程语言
开源

GitLab CLI 库

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

GitLab CLI 库

cli-gitlab

Migrate to mdsb100/node-gitlab#cli for using [email protected] and gitlab-API@v4.

I create a pull-request to jdalrymple/node-gitlab, but so far jdalrymple/node-gitlab has not accepted it.

For now, you can use it locally by npm link

bash
git clone [email protected]:mdsb100/node-gitlab.git
cd node-gitlab && npm install
npm run build
npm link

gitlab -h
gitlab url http://gitlab.xxx.net/
gitlab token xxxxxxxxxxxxx
gitlab-users whoami

The following is the old document

Check node-gitlab Dependencie on node-gitlab 1.7.0 or late Quick Start

You need to be very careful to set 'gitlab url'.

Please make sure your settings are 'http' or 'https'.

bash
# Install from npm for global
npm install cli-gitlab -g
# You will see all command
gitlab --help
# For example
gitlab url "http://example.com"
gitlab token "abcdefghij123456"
gitlab me

{
  "avatar_url": "http://gitlab.baidao.com//uploads/user/avatar/9/764b89699bcc946e4239b04f28002ce9.jpeg",
  "bio": "",
  "can_create_group": true,
  "can_create_project": true,
  "color_scheme_id": 1,
  "created_at": "2014-08-06T03:30:19.417Z",
  "email": "[email protected]",
  "extern_uid": null,
  "id": 9,
  ......
}

Extend Usage

gitlab map test.json

test.json:

{
  "t": {
    "filter": true,
    "size": true,
    "param": [""],
    "desc": "Search user by email or username.",
    "nameSpaces": "users.search"
  }
}
gitlab t --help
  Usage: t [options] 

  Search user by email or username.

  Options:

    -h, --help          output usage information
     --size             (optional) - Output size of result.
     --filter   (optional) - Filter result. For example: --filter 'item.assignee.id == 9'

Check map rule

'nameSpaces' please check node-gitlab

For example:

# In Projects.coffee
# class Projects extends BaseModel ==> projects
# @members = @load 'ProjectMembers' ===> memebers

# In ProjectMembers
# update: (projectId, userId, accessLevel = 30, fn = null) => ===> update

# so nameSpaces is 'projects.memebers.update'

By the way, the 'extend' function is used by undersore.extend.

Filter Usage

…
…

Assigned to me. Created by me. Size

gitlab issues --assigned_to_me --created_by_me --state opened --size
…

Issues Usage

Refernce issues

…
…
…
…

List of commands

  • groups
  • showGroup
  • showGroupProjects
  • showGroupMembers
  • addGroupMember
  • createGroup
  • transferProjectToGroup
  • searchGroup
  • issueNotes
  • issues
  • showIssue
  • createIssue
  • editIssue
  • createLabel
  • createNote
  • keys
  • getKey
  • addKey
  • hooks
  • showHook
  • addHook
  • updateHook
  • removeHook
  • projectIssues
  • projectLabels
  • members
  • showMember
  • addMember
  • updateMember
  • removeMember
  • mergeRequests
  • showMergeRequest
  • addMergeRequest
  • updateMergeRequest
  • commentMergeRequest
  • milestones
  • showMilestones
  • addMilestones
  • updateMilestones
  • branches
  • showBranch
  • protectBranch
  • unprotectBranch
  • createBranch
  • deleteBranch
  • tags
  • commits
  • showCommit
  • diffCommit
  • trees
  • projects
  • showProject
  • createProject
  • createProjectForUser
  • updateProject
  • projectsAdminOnly
  • removeProject
  • forkProject
  • searchProject
  • triggersOfProject
  • showProjectService
  • removeProjectService
  • addUserKey
  • userKeys
  • addUserKey
  • users
  • me
  • showUser
  • createUser
  • session
  • searchUsers

Thank

Dave Irvine

License

MIT

Issues· 3 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言