gitlabhq/cli(新しいタブで開きます)
主要言語: Go
Read only mirror of https://gitlab.com/gitlab-org/cli
- star 数
- 50
- watcher 数
- 3
- fork 数
- 15
- issue 数
- 0
- 最終更新
- 2026/10/31
主要言語: Go
Read only mirror of https://gitlab.com/gitlab-org/cli
GLab is an open source GitLab CLI tool. It brings GitLab to your terminal, next to where you are already working with git and your code, without switching between windows and browser tabs. While it's powerful for issues and merge requests, glab does even more:
glab is available for repositories hosted on GitLab.com, GitLab Dedicated, and GitLab Self-Managed. It supports multiple authenticated GitLab instances, and automatically detects the authenticated hostname from the remotes available in your working Git directory.
glab officially supports GitLab versions 16.0 and later. Certain commands might require
more recent versions. While many commands might work properly in GitLab versions
15.x and earlier, no support is provided for these versions.
To get started with glab:
glab further to meet your needs:
glab.You're ready!
Run glab --help to view a list of core commands in your terminal.
glab alias: Create, list, and delete aliases.glab api: Make an authenticated request to the GitLab API.glab artifact-registry: Authenticate with GitLab Artifact Registry. (EXPERIMENTAL)glab attestation: Manage software attestations. (EXPERIMENTAL)glab auth: Manage authentication for glab.glab changelog: Generate changelogs from your project's commit history.glab check-update: Check for the latest glab version.glab ci: Work with GitLab CI/CD pipelines and jobs.glab cluster: Manage GitLab Agents for Kubernetes and their clusters.glab completion: Generate shell completion scripts.glab config: Manage glab settings.glab container-registry: Work with GitLab container registries.glab dependency-firewall: Configure and monitor GitLab Dependency Firewall for local package managers. (BETA)glab deploy-key: Manage deploy keys.glab deploy-token: Manage deploy tokens.glab duo: Work with GitLab Duo.glab govern: Manage AI governance. (EXPERIMENTAL)glab gpg-key: Manage GPG keys registered with your GitLab account.glab incident: Work with GitLab incidents.glab issue: Work with GitLab issues.glab iteration: Retrieve iteration information.glab job: Work with GitLab CI/CD jobs.glab label: Manage project and group labels.glab milestone: Manage group or project milestones.glab mr: Create, view, and manage merge requests.glab opentofu: Work with the OpenTofu or Terraform integration.glab orbit: Query the GitLab Orbit context graph. (EXPERIMENTAL)glab packages: Manage packages in the GitLab package registry.glab release: Manage GitLab releases.glab repo: Work with GitLab repositories and projects.glab runner: Manage GitLab CI/CD runners.glab runner-controller: Manage runner controllers. (EXPERIMENTAL)glab schedule: Work with GitLab CI/CD schedules.glab search: Search for code and resources in a GitLab project. (BETA)glab securefile: Manage secure files for a project.glab security: Manage GitLab security scan profiles for a project. (EXPERIMENTAL)glab skills: Manage glab agent skills. (EXPERIMENTAL)glab snippet: Create snippets.glab ssh-key: Manage SSH keys registered with your GitLab account.glab stack: Create, manage, and work with stacked diffs. (EXPERIMENTAL)glab todo: Manage your to-do list.glab token: Manage personal, project, or group tokens.glab user: Interact with a GitLab user account.glab variable: Manage variables for a GitLab project or group.glab version: Show version information for glab.glab whatsnew: Show release notes for new versions of glab.glab work-items: Manage work items. (EXPERIMENTAL)Commands follow this pattern:
glab <command> <subcommand> [flags]
Many core commands also have sub-commands. Some examples:
glab mr list --assignee=@meglab mr list --reviewer=@meglab mr approve 235glab issue create -m release-2.0.0 -t "My title here" --label importantThe GitLab CLI also includes support for using the GitLab Duo Agent Platform directly in your terminal.
Use glab duo cli to ask GitLab Duo questions about your codebase and to autonomously perform actions on your behalf.
For more information, see GitLab Duo CLI.
Read the documentation for usage instructions or check out glab help.
Download a binary suitable for your OS at the releases page. Other installation methods depend on your operating system.
Homebrew is the officially supported package manager for macOS, Linux, and Windows (through Windows Subsystem for Linux)
brew install glabbrew upgrade glabOther options to install the GitLab CLI that may not be officially supported or are maintained by the community are also available.
If a supported binary for your OS is not found at the releases page, you can build from source:
makego.mod or later.
Official releases build with the version in .tool-versions.To build from source:
go version to verify that you have the minimum required Go version.
If Go is not installed, see Download and install.git clone https://gitlab.com/gitlab-org/cli.gitmake buildglab in $GOPATH/bin: make install$GOPATH/bin or $GOBIN is not in your $PATH,
run export PATH=$PWD/bin:$PATH.glab versionTo authenticate glab with OAuth, a personal access token, or a CI job token, see
Authenticate with GitLab.
For configuration levels, the configuration search order, and platform-specific file locations, see Configure the CLI.
For connecting to a GitLab Self-Managed or GitLab Dedicated instance, and for mTLS and self-signed certificates, see Connect to your GitLab instance.
For authenticating proxies, including custom HTTP headers and Google Identity-Aware Proxy, see Connect through a proxy.
glab reads its configuration from environment variables as well as the configuration
file. Every configuration key has a matching variable, and the variable wins over the
stored value. Setting them centrally is a good way to give everyone in an organization
the same setup.
For the full reference, see
Environment variables.
For how glab picks which token to use, see
Token precedence.
When the GLAB_DEBUG environment variable is set to true, glab outputs more logging information, including:
For help with common authentication issues, see Troubleshooting in the GitLab CLI documentation.
If you have an issue: report it on the issue tracker
To report a security vulnerability in glab, follow the process in
the security policy. Please do not open a public issue.
To learn how the project handles dependency updates and container-scanner CVE
reports, see dependency management
and reporting a vulnerability
in CONTRIBUTING.md.
Feel like contributing? That's awesome! We have a contributing guide and Code of conduct to help guide you.
When updating command help text or documentation, follow the GitLab CLI documentation style guide.
This project follows the SemVer specification.
MAJOR revision.MINOR revision.PATCH revision.We do our best to introduce breaking changes only when releasing a new MAJOR version.
Unfortunately, there are situations where this is not possible, and we may introduce
a breaking change in a MINOR or PATCH version. Some of situations where we may do so:
Breaking changes are a last resort, and we try our best to only introduce them when absolutely necessary.
The GitLab CLI was adopted from Clement Sam in 2022 to serve as the official CLI of GitLab. Over the years the project has been inspired by both the GitHub CLI and Zaq? Wiedmann's lab.
Lab has served as the foundation for many of the GitLab CI/CD commands including ci view and ci trace.