GitLab Cli 工具的使用教程
GLab 是一个开源的 GitLab CLI 工具,将 GitLab 带到您的终端上,靠近您已经在使用 git
和代码的位置,而无需在 Windows 和浏览器选项卡之间切换。处理问题、合并请求、直接从 CLI 观察正在运行的管道以及其他功能。
glab
可用于托管在 GitLab.com 和自行管理的 GitLab 实例上的存储库。glab
支持多个经过身份验证的 GitLab 实例,并自动从工作 Git 目录中可用的远程仓库中检测经过身份验证的主机名。
运行 glab --help
以查看终端中的核心命令列表
GLab is an open source GitLab CLI tool that brings GitLab to your command line.
USAGE
glab <command> <subcommand> [flags]
CORE COMMANDS
alias: Create, list, and delete aliases.
api: Make an authenticated request to the GitLab API.
auth: Manage glab's authentication state.
changelog: Interact with the changelog API.
check-update: Check for latest glab releases.
ci: Work with GitLab CI/CD pipelines and jobs.
cluster: Manage GitLab Agents for Kubernetes and their clusters.
completion: Generate shell completion scripts.
config: Set and get glab settings.
duo: Generate terminal commands from natural language.
help: Help about any command
incident: Work with GitLab incidents.
issue: Work with GitLab issues.
job: Work with GitLab CI/CD jobs.
label: Manage labels on remote.
mr: Create, view, and manage merge requests.
release: Manage GitLab releases.
repo: Work with GitLab repositories and projects.
schedule: Work with GitLab CI/CD schedules.
snippet: Create, view and manage snippets.
ssh-key: Manage SSH keys registered with your GitLab account.
stack: Create, manage, and work with stacked diffs. (EXPERIMENTAL.)
token: Manage personal, project, or group tokens
user: Interact with a GitLab user account.
variable: Manage variables for a GitLab project or group.
version: Show version information for glab.
FLAGS
--help Show help for this command.
-v, --version show glab version information
安装
依赖 go1.22+
go install gitlab.com/gitlab-org/cli/cmd/glab@main
用例