Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cli-gitlab

> 编程语言
Open source

GitLab CLI library

100 stars0 likes2 views
WebsiteGitHub

About

GitLab CLI library

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

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