# GitLab CLI (glab)
\{\{\< details >}}
* Tier: Free, Premium, Ultimate
* Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
\{\{\< /details >}}
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:
* View, manage, and retry CI/CD pipelines directly from your CLI.
* Create changelogs.
* Create and manage releases.
* Ask GitLab Duo Chat questions about Git.
* Manage GitLab agents for Kubernetes.
`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.
## Install the CLI
Installation instructions are available in the GLab
[`README`](https://gitlab.com/gitlab-org/cli/#installation).
## Authenticate with GitLab
GLab supports multiple authentication methods including OAuth and personal access tokens.
To get started, run `glab auth login` and follow the interactive setup.
For detailed authentication instructions, see the [Authentication section](https://gitlab.com/gitlab-org/cli#authentication)
in the main README.
## Environment Variables
| Variable | Description |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BROWSER` | The web browser to use for opening links. Can be set in the config with 'glab config set browser mybrowser'. |
| `DEBUG` | Set to true to output more logging information, including underlying Git commands, expanded aliases and DNS error details. |
| `FORCE_HYPERLINKS` | Set to true to force hyperlinks in output, even when not outputting to a TTY. |
| `GITLAB_CLIENT_ID` | Provide custom 'client\_id' generated by GitLab OAuth 2.0 application. Defaults to the 'client-id' for GitLab.com. |
| `GITLAB_HOST or GL_HOST` | If GitLab Self-Managed or GitLab Dedicated, specify the URL of the GitLab server. (Example: [https://gitlab.example.com](https://gitlab.example.com)) Defaults to [https://gitlab.com](https://gitlab.com). |
| `GITLAB_TOKEN` | An authentication token for API requests. Set this variable to avoid prompts to authenticate. Overrides any previously-stored credentials. Can be set in the config with 'glab config set token xxxxxx'. |
| `GLAB_CHECK_UPDATE` | Set to true to force an update check. By default the cli tool checks for updates once a day. |
| `GLAB_CONFIG_DIR` | Set to a directory path to override the global configuration location. |
| `GLAB_DEBUG_HTTP` | Set to true to output HTTP transport information (request / response). |
| `GLAB_SEND_TELEMETRY` | Set to false to disable telemetry being sent to your GitLab instance. Can be set in the config with 'glab config set telemetry false'. See [https://docs.gitlab.com/administration/settings/usage\_statistics/](https://docs.gitlab.com/administration/settings/usage_statistics/) for more information |
| `GLAMOUR_STYLE` | The environment variable to set your desired Markdown renderer style. Available options: dark, light, notty. To set a custom style, read [https://github.com/charmbracelet/glamour#styles](https://github.com/charmbracelet/glamour#styles) |
| `NO_COLOR` | Set to any value to avoid printing ANSI escape sequences for color output. |
| `NO_PROMPT` | Set to true to disable prompts. |
| `REMOTE_ALIAS or GIT_REMOTE_URL_VAR` | A 'git remote' variable or alias that contains the GitLab URL. Can be set in the config with 'glab config set remote\_alias origin'. |
| `VISUAL, EDITOR (in order of precedence)` | The editor tool to use for authoring text. Can be set in the config with 'glab config set editor vim'. |
## Options
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-v, --version show glab version information
```
## Commands
* [`glab alias`](/docs/alias)
* [`glab api`](/docs/api)
* [`glab auth`](/docs/auth)
* [`glab changelog`](/docs/changelog)
* [`glab check-update`](/docs/check-update)
* [`glab ci`](/docs/ci)
* [`glab cluster`](/docs/cluster)
* [`glab completion`](/docs/completion)
* [`glab config`](/docs/config)
* [`glab deploy-key`](/docs/deploy-key)
* [`glab duo`](/docs/duo)
* [`glab gpg-key`](/docs/gpg-key)
* [`glab incident`](/docs/incident)
* [`glab issue`](/docs/issue)
* [`glab iteration`](/docs/iteration)
* [`glab job`](/docs/job)
* [`glab label`](/docs/label)
* [`glab mcp`](/docs/mcp)
* [`glab milestone`](/docs/milestone)
* [`glab mr`](/docs/mr)
* [`glab opentofu`](/docs/opentofu)
* [`glab release`](/docs/release)
* [`glab repo`](/docs/repo)
* [`glab schedule`](/docs/schedule)
* [`glab securefile`](/docs/securefile)
* [`glab snippet`](/docs/snippet)
* [`glab ssh-key`](/docs/ssh-key)
* [`glab stack`](/docs/stack)
* [`glab token`](/docs/token)
* [`glab user`](/docs/user)
* [`glab variable`](/docs/variable)
* [`glab version`](/docs/version)
## Report issues
Open an issue in the [`gitlab-org/cli` repository](https://gitlab.com/gitlab-org/cli/issues/new)
to send us feedback.
# Installation Options
## Other options to install the GitLab CLI
These installation instructions are either not officially supported by GitLab, or
are maintained by the community.
## Table of contents
* [macOS](#macos)
* [Windows](#windows)
* [Linux](#linux)
* [Homebrew](#homebrew)
* [mise-en-place](#mise-en-place)
* [ASDF](#asdf)
* [Snapcraft (currently out of date)](#snapcraft)
* [Arch Linux](#arch-linux)
* [Alpine Linux](#alpine-linux)
* [Install a pinned version from edge](#install-a-pinned-version-from-edge)
* [Alpine Linux Docker-way](#alpine-linux-docker-way)
* [Fedora](#fedora)
* [Nix/NixOS](#nixnixos)
* [WakeMeOps (Debian/Ubuntu)](#wakemeops-debianubuntu)
* [MPR (Debian/Ubuntu)](#mpr-debianubuntu)
* [Prebuilt-MPR](#prebuilt-mpr)
* [Spack](#spack)
* [Docker](#docker)
* [GitLab CICD](#gitlab-cicd)
## macOS
* Homebrew (officially supported)
* Install with: `brew install glab`
* Update with: `brew upgrade glab`
* [MacPorts](https://ports.macports.org/port/glab/details/):
* Install with: `sudo port install glab`
* Update with: `sudo port selfupdate && sudo port upgrade glab`
* [mise-en-place](https://mise.jdx.dev/)
* Add to the `[tools]` section of one of mise's configuration files: `"ubi:gitlab-org/cli" = { version = "latest", exe = "glab", provider = "gitlab" }`.
* Install with `mise install`
* [ASDF tool version manager](https://asdf-vm.com/guide/introduction.html):
* Install with: `asdf plugin add glab; asdf install glab latest; asdf global glab latest`
* Install into `usr/bin` with a shell script:
`curl -s "https://gitlab.com/gitlab-org/cli/-/raw/main/scripts/install.sh" | sudo sh`
Before running any install script, review its contents.
## Windows
* Homebrew (through [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install)) (officially supported)
* Install with: `brew install glab`
* Update with: `brew upgrade glab`
* [WinGet](https://github.com/microsoft/winget-cli)
* Install with: `winget install glab.glab`
* Update with: `winget install glab.glab`
* [Chocolatey](https://chocolatey.org)
* Install with: `choco install glab`
* Update with: `choco upgrade glab`
* [scoop](https://scoop.sh)
* Install with: `scoop install glab`
* Update with: `scoop update glab`
* [mise-en-place](https://mise.jdx.dev/)
* Add `"ubi:gitlab-org/cli" = { version = "latest", exe = "glab", provider = "gitlab" }` to one of mise's configuration files.
* Install with `mise install`
* [ASDF tool version manager](https://asdf-vm.com/guide/introduction.html):
* Requires [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install).
* Install with: `asdf plugin add glab; asdf install glab latest; asdf global glab latest`
* Download an EXE installer or the `glab.exe` binary from the [releases page](https://gitlab.com/gitlab-org/cli/-/releases)
## Linux
* Download prebuilt binaries from the [releases page](https://gitlab.com/gitlab-org/cli/-/releases)
### Homebrew
Installing from Homebrew is the officially supported installation method for Linux.
* Install with: `brew install glab`
* Update with: `brew upgrade glab`
### mise-en-place
Add to the `[tools]` section of one of mise's configuration files:
```toml
"ubi:gitlab-org/cli" = { version = "latest", exe = "glab", provider = "gitlab" }
```
Then run `mise install` to install it.
### ASDF
To install with the [ASDF tool version manager](https://asdf-vm.com/guide/introduction.html), run these commands:
```bash twoslash title="Terminal"
asdf plugin add glab; asdf install glab latest; asdf global glab latest
```
### Snapcraft
This method is out of date. See [issue 1127](https://gitlab.com/gitlab-org/cli/-/issues/1127) for more information.
To install `glab` from the [Snap Store](https://snapcraft.io/glab):
1. Make sure you have [snap installed](https://snapcraft.io/docs/installing-snapd) on your Linux distribution.
2. Install the package: `sudo snap install --edge glab`
3. Grant `glab` access to SSH keys: `sudo snap connect glab:ssh-keys`
[
](https://snapcraft.io/glab)
### Arch Linux
For Arch Linux, `glab` is available:
* From the [`extra/glab`](https://archlinux.org/packages/extra/x86_64/glab/) package.
* By downloading and installing an archive from the
[releases page](https://gitlab.com/gitlab-org/cli/-/releases).
* From the [Snap Store](https://snapcraft.io/glab), if
[snap](https://snapcraft.io/docs/installing-snap-on-arch-linux) is installed.
* Installing with the package manager: `pacman -S glab`
### Alpine Linux
`glab` is available on the [Alpine Community Repository](https://git.alpinelinux.org/aports/tree/community/glab?h=master) as `glab`.
When installing, use `--no-cache` so no `apk update` is required:
```bash twoslash title="Terminal"
apk add --no-cache glab
```
#### Install a pinned version from edge
To ensure that by default edge is used to get the latest updates. We need the edge repository in `/etc/apk/repositories`.
Afterwards you can install it with `apk add --no-cache glab@edge`
We use `--no-cache` so an `apk update` is not required.
```bash twoslash title="Terminal"
echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
apk add --no-cache glab@edge
```
#### Alpine Linux Docker-way
Use edge directly
```dockerfile twoslash title="Dockerfile"
FROM alpine:3.13
RUN apk add --no-cache glab
```
Fetching latest glab version from edge
```dockerfile title="Dockerfile"
FROM alpine:3.13
RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk add --no-cache glab@edge
```
### Fedora
Fedora users can find `glab` as `glab` in the official repositories.
Install it with the command `dnf install glab`.
### Nix/NixOS
Nix (NixOS) users can install from [nixpkgs](https://search.nixos.org/packages?channel=unstable\&show=glab\&from=0\&size=30\&sort=relevance\&query=glab) with the command `nix-env -iA nixos.glab`.
### WakeMeOps (Debian/Ubuntu)
`glab` also exists in the [WakeMeOps repository](https://docs.wakemeops.com/packages/glab/):
```bash twoslash title="Terminal"
# Add WakeMeOps repository
curl -sSL "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | sudo bash
# Install glab
sudo apt install glab
```
### MPR (Debian/Ubuntu)
`glab` is available inside the [makedeb package repository](https://mpr.makedeb.org/packages/glab). To install, run the following:
```bash twoslash title="Terminal"
git clone 'https://mpr.makedeb.org/glab'
cd glab/
makedeb -si
```
#### Prebuilt-MPR
The above method downloads `glab` from source and builds it before packaging it into a `.deb` package. If you don't want to compile or just want a prebuilt package, you can also install `glab` from the Prebuilt-MPR:
1. Set up [the Prebuilt-MPR on your system](https://docs.makedeb.org/prebuilt-mpr/getting-started/#setting-up-the-repository).
2. Install with the command `sudo apt install glab`.
### Spack
* To install: `spack install glab`.
* To update: `spack uninstall glab && spack install glab`
## Docker
A Docker image for `glab` is available at
[`gitlab/glab`](https://hub.docker.com/r/gitlab/glab/):
```bash twoslash title="Terminal"
docker pull gitlab/glab
```
### GitLab CI/CD
To use `glab` in a CI/CD pipeline, you must set the `entrypoint` of the image to
the `glab` executable itself. For more information, see the GitLab documentation
for [Override the entrypoint of an image](https://docs.gitlab.com/ci/docker/using_docker_images/#override-the-entrypoint-of-an-image). An example `.gitlab-ci.yml`:
Example `.gitlab-ci.yml`:
```yaml title=".gitlab-ci.yml"
example:
stage: test
image:
name: 'gitlab/glab'
entrypoint: ['']
script:
- glab --version
```
# glab alias delete
Delete an alias.
```bash twoslash title="Terminal"
glab alias delete [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab alias
Create, list, and delete aliases.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`delete`](/docs/alias/delete)
* [`list`](/docs/alias/list)
* [`set`](/docs/alias/set)
# glab alias list
List the available aliases.
```bash twoslash title="Terminal"
glab alias list [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab alias set
Set an alias for a longer command.
## Synopsis
Declare a word as an alias for a longer command.
Your expansion might include arguments and flags. If your expansion
includes positional placeholders such as `$1` or `$2`, any extra
arguments that follow the invocation of an alias are inserted
appropriately.
Specify `--shell` in your alias to run it through `sh`, a shell
converter. Shell conversion enables you to compose commands with `|`
or redirect with `>`, with these caveats:
* Any extra arguments following the alias are not passed to the
expanded expression arguments by default.
* You must explicitly accept the arguments using `$1`, `$2`, and so on.
* Use `$@` to accept all arguments.
For Windows users only:
* On Windows, shell aliases are executed with `sh` as installed by
Git For Windows. If you installed Git in some other way in Windows,
shell aliases might not work for you.
* Always use quotation marks when defining a command, as in the examples.
```bash twoslash title="Terminal"
glab alias set '' [flags]
```
## Examples
```bash twoslash title="Terminal"
glab alias set mrv 'mr view'
glab mrv -w 123
# :-> glab mr view -w 123
glab alias set createissue 'glab create issue --title "$1"'
glab createissue "My Issue" --description "Something is broken."
# :-> glab create issue --title "My Issue" --description "Something is broken."
glab alias set --shell igrep 'glab issue list --assignee="$1" | grep $2'
glab igrep user foo
# :-> glab issue list --assignee="user" | grep "foo"
```
## Options
```bash twoslash title="Terminal"
-s, --shell Declare an alias to be passed through a shell interpreter.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab api
Make an authenticated request to the GitLab API.
## Synopsis
Makes an authenticated HTTP request to the GitLab API, and prints the response.
The endpoint argument should either be a path of a GitLab API v4 endpoint, or
`graphql` to access the GitLab GraphQL API.
* [GitLab REST API documentation](https://docs.gitlab.com/api/)
* [GitLab GraphQL documentation](https://docs.gitlab.com/api/graphql/)
If the current directory is a Git directory, uses the GitLab authenticated host in the current
directory. Otherwise, `gitlab.com` will be used.
To override the GitLab hostname, use `--hostname`.
These placeholder values, when used in the endpoint argument, are
replaced with values from the repository of the current directory:
* `:branch`
* `:fullpath`
* `:group`
* `:id`
* `:namespace`
* `:repo`
* `:user`
* `:username`
Methods: the default HTTP request method is `GET`, if no parameters are added,
and `POST` otherwise. Override the method with `--method`.
Pass one or more `--raw-field` values in `key=value` format to add
JSON-encoded string parameters to the `POST` body.
The `--field` flag behaves like `--raw-field` with magic type conversion based
on the format of the value:
* Literal values `true`, `false`, `null`, and integer numbers are converted to
appropriate JSON types.
* Placeholder values `:namespace`, `:repo`, and `:branch` are populated with values
from the repository of the current directory.
* If the value starts with `@`, the rest of the value is interpreted as a
filename to read the value from. Pass `-` to read from standard input.
For GraphQL requests, all fields other than `query` and `operationName` are
interpreted as GraphQL variables.
Raw request body can be passed from the outside via a file specified by `--input`.
Pass `-` to read from standard input. In this mode, parameters specified with
`--field` flags are serialized into URL query parameters.
In `--paginate` mode, all pages of results are requested sequentially until
no more pages of results remain. For GraphQL requests:
* The original query must accept an `$endCursor: String` variable.
* The query must fetch the `pageInfo{ hasNextPage, endCursor }` set of fields from a collection.
```bash twoslash title="Terminal"
glab api [flags]
```
## Examples
```bash twoslash title="Terminal"
glab api projects/:fullpath/releases
glab api projects/gitlab-com%2Fwww-gitlab-com/issues
glab api issues --paginate
glab api graphql -f query="query { currentUser { username } }"
glab api graphql -f query='
query {
project(fullPath: "gitlab-org/gitlab-docs") {
name
forksCount
statistics {
wikiSize
}
issuesEnabled
boards {
nodes {
id
name
}
}
}
}
glab api graphql --paginate -f query='
query($endCursor: String) {
project(fullPath: "gitlab-org/graphql-sandbox") {
name
issues(first: 2, after: $endCursor) {
edges {
node {
title
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}'
```
## Options
```bash twoslash title="Terminal"
-F, --field stringArray Add a parameter of inferred type. Changes the default HTTP method to "POST".
-H, --header stringArray Add an additional HTTP request header.
--hostname string The GitLab hostname for the request. Defaults to 'gitlab.com', or the authenticated host in the current Git directory.
-i, --include Include HTTP response headers in the output.
--input string The file to use as the body for the HTTP request.
-X, --method string The HTTP method for the request. (default "GET")
--paginate Make additional HTTP requests to fetch all pages of results.
-f, --raw-field stringArray Add a string parameter.
--silent Do not print the response body.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab auth configure-docker
Register glab as a Docker credential helper
```bash twoslash title="Terminal"
glab auth configure-docker [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab auth docker-helper
A Docker credential helper for GitLab container registries
```bash twoslash title="Terminal"
glab auth docker-helper [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab auth dpop-gen
Generates a DPoP (demonstrating-proof-of-possession) proof JWT. (EXPERIMENTAL)
## Synopsis
Demonstrating-proof-of-possession (DPoP) is a technique to
cryptographically bind personal access tokens to their owners. This command provides
the tools to manage the client aspects of DPoP. It generates a DPoP proof JWT
(JSON Web Token).
Prerequisites:
* You must have a SSH key pair in RSA, ed25519, or ECDSA format.
* You have enabled DPoP for your account, as described in the [GitLab documentation.](https://docs.gitlab.com/user/profile/personal_access_tokens/#require-dpop-headers-with-personal-access-tokens)
Use the JWT in combination with a Personal Access Token (PAT) to authenticate to
the GitLab API. Your JWT remains valid for 5 minutes. After it expires, you must
generate another token. Your SSH private key is then used to sign the JWT.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab auth dpop-gen [flags]
```
## Examples
```bash twoslash title="Terminal"
# Generate a DPoP JWT for authentication to GitLab
glab auth dpop-gen [flags]
glab auth dpop-gen --private-key "~/.ssh/id_rsa" --pat "glpat-xxxxxxxxxxxxxxxxxxxx"
# No PAT required if you previously used the 'glab auth login' command with a PAT
glab auth dpop-gen --private-key "~/.ssh/id_rsa"
# Generate a DPoP JWT for a different GitLab instance
glab auth dpop-gen --private-key "~/.ssh/id_rsa" --hostname "https://gitlab.com"
```
## Options
```bash twoslash title="Terminal"
--hostname string The hostname of the GitLab instance to authenticate with. Defaults to 'gitlab.com'. (default "gitlab.com")
--pat string Personal Access Token (PAT) to generate a DPoP proof for. Defaults to the token set with 'glab auth login'. Returns an error if both are empty.
-p, --private-key string Location of the private SSH key on the local system.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab auth
Manage glab's authentication state.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`configure-docker`](/docs/auth/configure-docker)
* [`docker-helper`](/docs/auth/docker-helper)
* [`dpop-gen`](/docs/auth/dpop-gen)
* [`login`](/docs/auth/login)
* [`logout`](/docs/auth/logout)
* [`status`](/docs/auth/status)
# glab auth login
Authenticate with a GitLab instance.
## Synopsis
Authenticate with a GitLab instance.
You can pass in a token on standard input by using `--stdin`.
The minimum required scopes for the token are: `api`, `write_repository`.
Configuration and credentials are stored in the global configuration file (default `~/.config/glab-cli/config.yml`)
When running in interactive mode inside a Git repository, `glab` will automatically detect
GitLab instances from your Git remotes and present them as options, saving you from having to
manually type the hostname.
```bash twoslash title="Terminal"
glab auth login [flags]
```
## Examples
```bash twoslash title="Terminal"
# Start interactive setup
# (If in a Git repository, glab will detect and suggest GitLab instances from remotes)
glab auth login
# Authenticate against `gitlab.com` by reading the token from a file
glab auth login --stdin < myaccesstoken.txt
# Authenticate with GitLab Self-Managed or GitLab Dedicated
glab auth login --hostname salsa.debian.org
# Non-interactive setup
glab auth login --hostname gitlab.example.org --token glpat-xxx --api-host gitlab.example.org:3443 --api-protocol https --git-protocol ssh
# Non-interactive setup reading token from a file
glab auth login --hostname gitlab.example.org --api-host gitlab.example.org:3443 --api-protocol https --git-protocol ssh --stdin < myaccesstoken.txt
# Non-interactive CI/CD setup
glab auth login --hostname $CI_SERVER_HOST --job-token $CI_JOB_TOKEN
```
## Options
```bash twoslash title="Terminal"
-a, --api-host string API host url.
-p, --api-protocol string API protocol: https, http
-g, --git-protocol string Git protocol: ssh, https, http
--hostname string The hostname of the GitLab instance to authenticate with.
-j, --job-token string CI job token.
--stdin Read token from standard input.
-t, --token string Your GitLab access token.
--use-keyring Store token in your operating system's keyring.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab auth logout
Logout from a GitLab instance.
## Synopsis
Logout from a GitLab instance.
Configuration and credentials are stored in the global configuration file (default `~/.config/glab-cli/config.yml`)
```bash twoslash title="Terminal"
glab auth logout [flags]
```
## Examples
```bash twoslash title="Terminal"
Logout of a specific instance
- glab auth logout --hostname gitlab.example.com
```
## Options
```bash twoslash title="Terminal"
--hostname string The hostname of the GitLab instance.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab auth status
View authentication status.
## Synopsis
Verifies and displays information about your authentication state.
This command tests the authentication states of all known GitLab instances in the configuration file and reports issues, if any.
```bash twoslash title="Terminal"
glab auth status [flags]
```
## Options
```bash twoslash title="Terminal"
--hostname string Check a specific instance's authentication status.
-t, --show-token Display the authentication token.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab changelog generate
Generate a changelog for the repository or project.
```bash twoslash title="Terminal"
glab changelog generate [flags]
```
## Examples
```bash twoslash title="Terminal"
# Generate a changelog
glab changelog generate
```
## Options
```bash twoslash title="Terminal"
--config-file string Path of the changelog configuration file in the project's Git repository. Defaults to '.gitlab/changelog_config.yml'.
--date 2016-03-11T03:45:40Z Date and time of the release. Uses ISO 8601 (2016-03-11T03:45:40Z) format. Defaults to the current time.
--from string Start of the range of commits (as a SHA) to use when generating the changelog. This commit itself isn't included in the list.
--to string End of the range of commits (as a SHA) to use when generating the changelog. This commit is included in the list. Defaults to the HEAD of the project's default branch.
--trailer string The Git trailer to use for including commits. Defaults to 'Changelog'.
-v, --version string Version to generate the changelog for. Must follow semantic versioning. Defaults to the version of the local checkout, like using 'git describe'.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab changelog
Interact with the changelog API.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`generate`](/docs/changelog/generate)
# glab check-update
Check for latest glab releases.
## Synopsis
Checks for new versions every 24 hours after any 'glab' command is run. Does not recheck if the most recent recheck is less than 24 hours old.
To override the recheck behavior and force an update check, set the GLAB\_CHECK\_UPDATE environment variable to 'true'.
To disable the update check entirely, run 'glab config set check\_update false'.
To re-enable the update check, run 'glab config set check\_update true'.
```bash twoslash title="Terminal"
glab check-update [flags]
```
## Aliases
```bash twoslash title="Terminal"
update
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab ci delete
Delete CI/CD pipelines.
```bash twoslash title="Terminal"
glab ci delete [flags]
```
## Examples
```bash twoslash title="Terminal"
glab ci delete 34
glab ci delete 12,34,2
glab ci delete --source=api
glab ci delete --status=failed
glab ci delete --older-than 24h
glab ci delete --older-than 24h --status=failed
```
## Options
```bash twoslash title="Terminal"
--dry-run Simulate process, but do not delete anything.
--older-than duration Filter pipelines older than the given duration. Valid units: h, m, s, ms, us, ns.
--page int Page number.
--paginate Make additional HTTP requests to fetch all pages of projects before cloning. Respects '--per-page'.
--per-page int Number of items to list per page.
--source string Filter pipelines by source: api, chat, external, external_pull_request_event, merge_request_event, ondemand_dast_scan, ondemand_dast_validation, parent_pipeline, pipeline, push, schedule, security_orchestration_policy, trigger, web, webide.
-s, --status string Delete pipelines by status: running, pending, success, failed, canceled, skipped, created, manual.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci get
Get JSON of a running CI/CD pipeline on the current or other specified branch.
```bash twoslash title="Terminal"
glab ci get [flags]
```
## Aliases
```bash twoslash title="Terminal"
stats
```
## Examples
```bash twoslash title="Terminal"
glab ci get
glab ci -R some/project -p 12345
```
## Options
```bash twoslash title="Terminal"
-b, --branch string Check pipeline status for a branch. (default current branch)
-F, --output string Format output. Options: text, json. (default "text")
-p, --pipeline-id int Provide pipeline ID.
-d, --with-job-details Show extended job information.
--with-variables Show variables in pipeline. Requires the Maintainer role.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci
Work with GitLab CI/CD pipelines and jobs.
```bash twoslash title="Terminal"
glab ci [flags]
```
## Aliases
```bash twoslash title="Terminal"
pipe
pipeline
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`cancel`](/docs/ci/cancel)
* [`config`](/docs/ci/config)
* [`delete`](/docs/ci/delete)
* [`get`](/docs/ci/get)
* [`lint`](/docs/ci/lint)
* [`list`](/docs/ci/list)
* [`retry`](/docs/ci/retry)
* [`run`](/docs/ci/run)
* [`run-trig`](/docs/ci/run-trig)
* [`status`](/docs/ci/status)
* [`trace`](/docs/ci/trace)
* [`trigger`](/docs/ci/trigger)
* [`view`](/docs/ci/view)
# glab ci lint
Checks if your `.gitlab-ci.yml` file is valid.
```bash twoslash title="Terminal"
glab ci lint [flags]
```
## Examples
```bash twoslash title="Terminal"
# Uses .gitlab-ci.yml in the current directory
glab ci lint
glab ci lint .gitlab-ci.yml
glab ci lint path/to/.gitlab-ci.yml
```
## Options
```bash twoslash title="Terminal"
--dry-run Run pipeline creation simulation.
--include-jobs Response includes the list of jobs that would exist in a static check or pipeline simulation.
--ref string When 'dry-run' is true, sets the branch or tag context for validating the CI/CD YAML configuration.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci list
Get the list of CI/CD pipelines.
```bash twoslash title="Terminal"
glab ci list [flags]
```
## Examples
```bash twoslash title="Terminal"
glab ci list
glab ci list --status=failed
```
## Options
```bash twoslash title="Terminal"
-n, --name string Return only pipelines with the given name.
-o, --orderBy string Order pipelines by this field. Options: id, status, ref, updated_at, user_id. (default "id")
-F, --output string Format output. Options: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
-r, --ref string Return only pipelines for given ref.
--scope string Return only pipelines with the given scope: {running|pending|finished|branches|tags}
--sha string Return only pipelines with the given SHA.
--sort string Sort pipelines. Options: asc, desc. (default "desc")
--source string Return only pipelines triggered via the given source. See https://docs.gitlab.com/ci/jobs/job_rules/#ci_pipeline_source-predefined-variable for full list. Commonly used options: {merge_request_event|parent_pipeline|pipeline|push|trigger}
-s, --status string Get pipeline with this status. Options: running, pending, success, failed, canceled, skipped, created, manual, waiting_for_resource, preparing, scheduled
-a, --updated-after string Return only pipelines updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z).
-b, --updated-before string Return only pipelines updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z).
-u, --username string Return only pipelines triggered by the given username.
-y, --yaml-errors Return only pipelines with invalid configurations.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci retry
Retry a CI/CD job.
```bash twoslash title="Terminal"
glab ci retry [flags]
```
## Examples
```bash twoslash title="Terminal"
# Interactively select a job to retry
glab ci retry
# Retry job with ID 224356863
glab ci retry 224356863
# Retry job with the name 'lint'
glab ci retry lint
```
## Options
```bash twoslash title="Terminal"
-b, --branch string The branch to search for the job. (default current branch)
-p, --pipeline-id int The pipeline ID to search for the job.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci run-trig
Run a CI/CD pipeline trigger.
## Synopsis
Specify one or more pipeline inputs using the `-i` or `--input` flag for each
input. Each input flag uses the format `key:value`.
The values are typed and will default to `string` unless a type is explicitly
specified. To specify a type, use the `type(value)` syntax. For example,
`key:string(value)` will pass the string `value` as the input.
Valid types are:
* `string`: A string value. This is the default type. For example, `key:string(value)`.
* `int`: An integer value. For example, `key:int(42)`.
* `float`: A floating-point value. For example, `key:float(3.14)`.
* `bool`: A boolean value. For example, `key:bool(true)`.
* `array`: An array of strings. For example, `key:array(foo,bar)`.
An array of strings can be specified with a trailing comma. For example,
`key:array(foo,bar,)` will pass the array `[foo, bar]`. `array()` specifies an
empty array. To pass an array with the empty string, use `array(,)`.
Value arguments containing parentheses should be escaped from the shell with
quotes. For example, `--input key:array(foo,bar)` should be written as
`--input 'key:array(foo,bar)'`.
```bash twoslash title="Terminal"
glab ci run-trig [flags]
```
## Aliases
```bash twoslash title="Terminal"
run-trig
```
## Examples
```bash twoslash title="Terminal"
glab ci run-trig -t xxxx
glab ci run-trig -t xxxx -b main
# Specify CI variables
glab ci run-trig -t xxxx -b main --variables key1:val1
glab ci run-trig -t xxxx -b main --variables key1:val1,key2:val2
glab ci run-trig -t xxxx -b main --variables key1:val1 --variables key2:val2
# Specify CI inputs
glab ci run-trig -t xxxx -b main --input key1:val1 --input key2:val2
glab ci run-trig -t xxxx -b main --input "replicas:int(3)" --input "debug:bool(false)" --input "regions:array(us-east,eu-west)"
```
## Options
```bash twoslash title="Terminal"
-b, --branch string Create pipeline on branch or reference .
-i, --input stringArray Pass inputs to pipeline in format ':'. Cannot be used for merge request pipelines. See documentation for examples.
-t, --token CI_JOB_TOKEN Pipeline trigger token. Can be omitted only if the CI_JOB_TOKEN environment variable is set.
--variables strings Pass variables to pipeline in the format :.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci run
Create or run a new CI/CD pipeline.
## Synopsis
The `--branch` option is available for all pipeline types.
The options for variables are incompatible with merge request pipelines.
If used with merge request pipelines, the command fails with a message like `ERROR: if any flags in the group [output output-format] are set none of the others can be`
Specify one or more pipeline inputs using the `-i` or `--input` flag for each
input. Each input flag uses the format `key:value`.
The values are typed and will default to `string` unless a type is explicitly
specified. To specify a type, use the `type(value)` syntax. For example,
`key:string(value)` will pass the string `value` as the input.
Valid types are:
* `string`: A string value. This is the default type. For example, `key:string(value)`.
* `int`: An integer value. For example, `key:int(42)`.
* `float`: A floating-point value. For example, `key:float(3.14)`.
* `bool`: A boolean value. For example, `key:bool(true)`.
* `array`: An array of strings. For example, `key:array(foo,bar)`.
An array of strings can be specified with a trailing comma. For example,
`key:array(foo,bar,)` will pass the array `[foo, bar]`. `array()` specifies an
empty array. To pass an array with the empty string, use `array(,)`.
Value arguments containing parentheses should be escaped from the shell with
quotes. For example, `--input key:array(foo,bar)` should be written as
`--input 'key:array(foo,bar)'`.
```bash twoslash title="Terminal"
glab ci run [flags]
```
## Aliases
```bash twoslash title="Terminal"
create
```
## Examples
```bash twoslash title="Terminal"
glab ci run
glab ci run --variables \"key1:value,with,comma\"
glab ci run -b main
glab ci run --web
glab ci run --mr
# Specify CI variables
glab ci run -b main --variables-env key1:val1
glab ci run -b main --variables-env key1:val1,key2:val2
glab ci run -b main --variables-env key1:val1 --variables-env key2:val2
glab ci run -b main --variables-file MYKEY:file1 --variables KEY2:some_value
# Specify CI inputs
glab ci run -b main --input key1:val1 --input key2:val2
glab ci run -b main --input "replicas:int(3)" --input "debug:bool(false)" --input "regions:array(us-east,eu-west)"
// For an example of 'glab ci run -f' with a variables file, see
// [Run a CI/CD pipeline with variables from a file](https://docs.gitlab.com/editor_extensions/gitlab_cli/#run-a-cicd-pipeline-with-variables-from-a-file)
// in the GitLab documentation.
```
## Options
```bash twoslash title="Terminal"
-b, --branch string Create pipeline on branch/ref .
-i, --input stringArray Pass inputs to pipeline in format ':'. Cannot be used for merge request pipelines. See documentation for examples.
--mr Run merge request pipeline instead of branch pipeline.
--variables strings Pass variables to pipeline in format :. Cannot be used for MR pipelines.
--variables-env strings Pass variables to pipeline in format :. Cannot be used for MR pipelines.
--variables-file strings Pass file contents as a file variable to pipeline in format :. Cannot be used for MR pipelines.
-f, --variables-from string JSON file with variables for pipeline execution. Expects array of hashes, each with at least 'key' and 'value'. Cannot be used for MR pipelines.
-w, --web Open pipeline in a browser. Uses default browser, or browser specified in BROWSER environment variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci status
View a running CI/CD pipeline on current or other branch specified.
```bash twoslash title="Terminal"
glab ci status [flags]
```
## Aliases
```bash twoslash title="Terminal"
stats
```
## Examples
```bash twoslash title="Terminal"
glab ci status --live
# A more compact view
glab ci status --compact
# Get the pipeline for the main branch
glab ci status --branch=main
# Get the pipeline for the current branch
glab ci status
```
## Options
```bash twoslash title="Terminal"
-b, --branch string Check pipeline status for a branch. (default current branch)
-c, --compact Show status in compact format.
-l, --live Show status in real time until the pipeline ends.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci trace
Trace a CI/CD job log in real time.
```bash twoslash title="Terminal"
glab ci trace [] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Interactively select a job to trace
glab ci trace
# Trace job with ID 224356863
glab ci trace 224356863
# Trace job with the name 'lint'
glab ci trace lint
```
## Options
```bash twoslash title="Terminal"
-b, --branch string The branch to search for the job. (default current branch)
-p, --pipeline-id int The pipeline ID to search for the job.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci trigger
Trigger a manual CI/CD job.
```bash twoslash title="Terminal"
glab ci trigger [flags]
```
## Examples
```bash twoslash title="Terminal"
# Interactively select a job to trigger
glab ci trigger
# Trigger manual job with id 224356863
glab ci trigger 224356863
# Trigger manual job with name lint
glab ci trigger lint
```
## Options
```bash twoslash title="Terminal"
-b, --branch string The branch to search for the job. (default current branch)
-p, --pipeline-id int The pipeline ID to search for the job.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci view
View, run, trace, log, and cancel CI/CD job's current pipeline.
## Synopsis
Supports viewing, running, tracing, and canceling jobs.
Use arrow keys to navigate jobs and logs.
* `Enter` to toggle through a job's logs / traces, or display a child pipeline.
Trigger jobs are marked with a `ยป`.
* `Esc` or `q` to close the logs or trace, or return to the parent pipeline.
* `Ctrl+R`, `Ctrl+P` to run, retry, or play a job. Use `Tab` or arrow keys to
navigate the modal, and `Enter` to confirm.
* `Ctrl+D` to cancel a job. If the selected job isn't running or pending,
quits the CI/CD view.
* `Ctrl+Q` to quit the CI/CD view.
* `Ctrl+Space` to suspend application and view the logs. Similar to `glab pipeline ci trace`.
* Supports `vi` style bindings and arrow keys for navigating jobs and logs.
```bash twoslash title="Terminal"
glab ci view [branch/tag] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Uses current branch
glab pipeline ci view
# Get latest pipeline on main branch
glab pipeline ci view main
# Just like the second example
glab pipeline ci view -b main
# Get latest pipeline on main branch of myusername/glab repo
glab pipeline ci view -b main -R myusername/glab
```
## Options
```bash twoslash title="Terminal"
-b, --branch string Check pipeline status for a branch or tag. Defaults to the current branch.
-p, --pipelineid int Check pipeline status for a specific pipeline ID.
-w, --web Open pipeline in a browser. Uses default browser, or browser specified in BROWSER variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster graph
Queries the Kubernetes object graph, using the GitLab Agent for Kubernetes. (EXPERIMENTAL)
## Synopsis
This command starts a web server that shows a live view of the Kubernetes object graph in a browser.
It uses the GitLab Agent for Kubernetes running in the cluster.
It requires:
* Version 18.1 or later of GitLab and the GitLab Agent.
* At least the Developer role in the agent project.
* This command requires a personal access token or project access token
for authentication. The token must have the `read_api` and `k8s_proxy` scopes.
Leave feedback in [issue 7900](https://gitlab.com/gitlab-org/cli/-/issues/7900).
### Resource filtering
To filter resources, namespaces, and select root objects, use
[Common Expression Language (CEL)](https://cel.dev/).
`object_selector_expression`: Filters objects. The expression must return a boolean. These variables are available:
* `obj`: The Kubernetes object being evaluated.
* `group`: The group of the object.
* `version`: The version of the object.
* `resource`: The resource name of the object, like `pods` for the `Pod` kind.
* `namespace`: The namespace of the object.
* `name`: The name of the object.
* `labels`: The labels of the object.
* `annotations`: The annotations of the object.
`resource_selector_expression`: Filters Kubernetes discovery information to include or exclude resources
from the watch request. The expression must return a boolean. These variables are available:
* `group`: The group of the object.
* `version`: The version of the object.
* `resource`: The resource name of the object, like `pods` for the `Pod` kind.
* `namespaced`: The scope of group, version, and resource. Can be `bool`, `true`, or `false`.
To select root objects, use the `--root-expression` flag. When set, only objects that are directly
or transitively reachable from root objects are shown. This flag uses the same variables
as `object_selector_expression`, and must return a boolean. Multiple values are joined with `OR`
statements. If any match, the object is used as root.
For more information about using [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors)
and [field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/) to select namespaces, see the Kubernetes documentation.
### Advanced usage
Apart from high-level ways to construct the query, this command enables
you to construct and send the query using all underlying API features.
To understand what is possible, and how to do it, see the
[technical design doc](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/doc/graph_api.md)
The user should have permission to access the agent project.
For more information, see [Grant users Kubernetes access](https://docs.gitlab.com/user/clusters/agent/user_access/).
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab cluster graph [flags]
```
## Examples
```bash twoslash title="Terminal"
# Run the default query for agent 123
glab cluster graph -R user/project -a 123
# Show common resources from the core and RBAC groups
glab cluster graph -R user/project -a 123 --core --rbac
# Show certain resources
glab cluster graph -R user/project -a 123 --resource=pods --resource=configmaps
# Same as above, but more compact
glab cluster graph -R user/project -a 123 -r={pods,configmaps}
# Select a certain namespace
glab cluster graph -R user/project -a 123 -n={my-ns,my-stuff}
# Select all namespaces that have a certain annotation
glab cluster graph -R user/project -a 123 --ns-expression='"my-annotation" in annotations'
# Advanced usage - pass the full query directly via stdin.
# The query below watches service accounts in all namespaces except for the kube-system.
Q='{"queries":[{"include":{"resource_selector_expression":"resource == \"serviceaccounts\""}}],"namespaces":{"object_selector_expression":"name != \"kube-system\""}}'
echo -n "$Q" | glab cluster graph -R user/project -a 123 --stdin
# Roots filtering
glab cluster graph -R user/project -a 123 --root-expression 'group == "" && resource == "pods"'
```
## Options
```bash twoslash title="Terminal"
-a, --agent int The numerical Agent ID to connect to.
--apps Watch deployments, replicasets, daemonsets, and statefulsets in apps/v1 group.
--batch Watch jobs and cronjobs in the batch/v1 group.
--cluster-rbac Watch clusterroles and clusterrolebindings in the rbac.authorization.k8s.io/v1 group.
--core Watch pods, secrets, configmaps, and serviceaccounts in the core/v1 group
--crd Watch customresourcedefinitions in the apiextensions.k8s.io/v1 group.
--ignore-arc-direction Ignore arc direction when evaluating roots connectivity. GitLab and agent 18.3+ required.
--listen-addr string Address to listen on. (default "localhost:0")
--listen-net string Network on which to listen for connections. (default "tcp")
--log-watch-request Log watch request to stdout. Helpful for debugging.
-n, --namespace stringArray Namespaces to watch. If not specified, all namespaces are watched with label and field selectors filtering.
--ns-expression string CEL expression to select namespaces. Evaluated before a namespace is watched and on any updates for the namespace object.
--ns-field-selector string Field selector to select namespaces.
--ns-label-selector string Label selector to select namespaces.
--rbac Watch roles, and rolebindings in the rbac.authorization.k8s.io/v1 group.
-r, --resource stringArray A list of resources to watch. You can see the list of resources your cluster supports by running 'kubectl api-resources'.
--root-expression stringArray CEL expression to select root objects. GitLab and agent 18.3+ required.
--stdin Read watch request from standard input.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster
Manage GitLab Agents for Kubernetes and their clusters.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`agent`](/docs/cluster/agent)
* [`graph`](/docs/cluster/graph)
# glab completion
Generate shell completion scripts.
## Synopsis
This command outputs code meant to be saved to a file, or immediately
evaluated by an interactive shell. To load completions:
### Bash
To load completions in your current shell session:
```shell
source <(glab completion -s bash)
```
To load completions for every new session, run this command one time:
#### Linux
```shell
glab completion -s bash > /etc/bash_completion.d/glab
```
#### macOS
```shell
glab completion -s bash > /usr/local/etc/bash_completion.d/glab
```
### Zsh
If shell completion is not already enabled in your environment you must
enable it. Run this command one time:
```shell
echo "autoload -U compinit; compinit" >> ~/.zshrc
```
To load completions in your current shell session:
```shell
source <(glab completion -s zsh); compdef _glab glab
```
To load completions for every new session, run this command one time:
#### Linux
```shell
glab completion -s zsh > "${fpath[1]}/_glab"
```
#### macOS
For older versions of macOS, you might need this command:
```shell
glab completion -s zsh > /usr/local/share/zsh/site-functions/_glab
```
The Homebrew version of glab should install completions automatically.
### fish
To load completions in your current shell session:
```shell
glab completion -s fish | source
```
To load completions for every new session, run this command one time:
```shell
glab completion -s fish > ~/.config/fish/completions/glab.fish
```
### PowerShell
To load completions in your current shell session:
```shell
glab completion -s powershell | Out-String | Invoke-Expression
```
To load completions for every new session, add the output of the above command
to your PowerShell profile.
When installing glab through a package manager, however, you might not need
more shell configuration to support completions.
For Homebrew, see [brew shell completion](https://docs.brew.sh/Shell-Completion)
```bash twoslash title="Terminal"
glab completion [flags]
```
## Options
```bash twoslash title="Terminal"
--no-desc Do not include shell completion description.
-s, --shell string Shell type: bash, zsh, fish, powershell. (default "bash")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab config edit
Opens the glab configuration file.
## Synopsis
Opens the glab configuration file.
The command uses the following order when choosing the editor to use:
1. 'glab\_editor' field in the configuration file
2. 'VISUAL' environment variable
3. 'EDITOR' environment variable
```bash twoslash title="Terminal"
glab config edit [flags]
```
## Examples
```bash twoslash title="Terminal"
Open the configuration file with the default editor
- glab config edit
Open the configuration file with vim
- EDITOR=vim glab config edit
Set vim to be used for all future 'glab config edit' invocations
- glab config set editor vim
- glab config edit
Open the local configuration file with the default editor
- glab config edit -l
```
## Options
```bash twoslash title="Terminal"
-l, --local Open '.git/glab-cli/config.yml' file instead of the global '~/.config/glab-cli/config.yml' file.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab config get
Prints the value of a given configuration key.
```bash twoslash title="Terminal"
glab config get [flags]
```
## Examples
```bash twoslash title="Terminal"
glab config get editor
# :-> vim
glab config get glamour_style
# :-> notty
```
## Options
```bash twoslash title="Terminal"
-g, --global Read from global config file (~/.config/glab-cli/config.yml). (default checks 'Environment variables โ Local โ Global')
--host string Get per-host setting.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab config
Manage glab settings.
## Synopsis
Manage key/value strings.
Current respected settings:
* browser: If unset, uses the default browser. Override with environment variable $BROWSER.
* check\_update: If true, notifies of new versions of glab. Defaults to true. Override with environment variable $GLAB\_CHECK\_UPDATE.
* display\_hyperlinks: If true, and using a TTY, outputs hyperlinks for issues and merge request lists. Defaults to false.
* editor: If unset, uses the default editor. Override with environment variable $EDITOR.
* glab\_pager: Your desired pager command to use, such as 'less -R'.
* glamour\_style: Your desired Markdown renderer style. Options are dark, light, notty. Custom styles are available using [glamour](https://github.com/charmbracelet/glamour#styles).
* host: If unset, defaults to `https://gitlab.com`.
* token: Your GitLab access token. Defaults to environment variables.
* visual: Takes precedence over 'editor'. If unset, uses the default editor. Override with environment variable $VISUAL.
## Aliases
```bash twoslash title="Terminal"
conf
```
## Options
```bash twoslash title="Terminal"
-g, --global Use global config file.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`edit`](/docs/config/edit)
* [`get`](/docs/config/get)
* [`set`](/docs/config/set)
# glab config set
Updates configuration with the value of a given key.
## Synopsis
Update the configuration by setting a key to a value.
Use 'glab config set --global' to set a global config.
Specifying the '--hostname' flag also saves in the global configuration file.
```bash twoslash title="Terminal"
glab config set [flags]
```
## Examples
```bash twoslash title="Terminal"
- glab config set editor vim
- glab config set token xxxxx -h gitlab.com
- glab config set check_update false --global
```
## Options
```bash twoslash title="Terminal"
-g, --global Write to global '~/.config/glab-cli/config.yml' file rather than the repository's '.git/glab-cli/config.yml' file.
--host string Set per-host setting.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab deploy-key add
Add a deploy key to a GitLab project.
## Synopsis
Creates a new deploy key.
Requires the '--title' flag.
```bash twoslash title="Terminal"
glab deploy-key add [key-file] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Read deploy key from stdin and upload.
glab deploy-key add -t "my title"
# Read deploy key from specified key file and upload
cat ~/.ssh/id_ed25519.pub | glab deploy-key add --title='test' -
# Read deploy key from specified key file, upload and set "can push" attribute.
glab deploy-key add ~/.ssh/id_ed25519.pub -t "my title" --can-push true
```
## Options
```bash twoslash title="Terminal"
-c, --can-push If true, deploy keys can be used for pushing code to the repository.
-e, --expires-at string The expiration date of the deploy key, using the ISO-8601 format: YYYY-MM-DDTHH:MM:SSZ.
-t, --title string New deploy key's title.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab deploy-key delete
Deletes a single deploy key specified by the ID.
```bash twoslash title="Terminal"
glab deploy-key delete [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete SSH key with ID as argument
glab deploy-key delete 1234
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab deploy-key get
Returns a single deploy key specified by the ID.
```bash twoslash title="Terminal"
glab deploy-key get [flags]
```
## Examples
```bash twoslash title="Terminal"
# Get deploy key with ID as argument
glab deploy-key get 1234
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab deploy-key
Manage deploy keys.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`add`](/docs/deploy-key/add)
* [`delete`](/docs/deploy-key/delete)
* [`get`](/docs/deploy-key/get)
* [`list`](/docs/deploy-key/list)
# glab deploy-key list
Get a list of deploy keys for the current project.
```bash twoslash title="Terminal"
glab deploy-key list [flags]
```
## Examples
```bash twoslash title="Terminal"
- glab deploy-key list
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
--show-id Shows IDs of deploy keys.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab duo ask
Generate Git commands from natural language.
## Synopsis
Generate Git commands from natural language using AI assistance.
Describe what you want to do in plain language, and GitLab Duo suggests the
appropriate Git commands. The AI provides both the commands and an explanation.
After you receive the suggested commands, you can execute them directly from
the CLI. You must confirm each command before it runs.
Use this command to:
* Retrieve forgotten Git commands.
* Learn how to accomplish specific Git operations.
* Get guidance on complex Git workflows.
* Reduce context switching during development.
```bash twoslash title="Terminal"
glab duo ask [flags]
```
## Examples
```bash twoslash title="Terminal"
glab duo ask list last 10 commit titles
# :-> A list of Git commands to show the titles of the latest 10 commits with an explanation and an option to execute the commands.
glab duo ask how do I undo my last commit
# :-> Suggestions for undoing the last commit with explanations of different approaches.
glab duo ask show me files changed in the last commit
# :-> Commands to display files modified in the most recent commit.
```
## Options
```bash twoslash title="Terminal"
--git Ask a question about Git. (default true)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab duo
Work with GitLab Duo
## Synopsis
Work with GitLab Duo, our AI-native assistant for the command line.
GitLab Duo for the CLI integrates AI capabilities directly into your terminal
workflow. It helps you retrieve forgotten Git commands and offers guidance on
Git operations. You can accomplish specific tasks without switching contexts.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`ask`](/docs/duo/ask)
# glab gpg-key add
Add a GPG key to your GitLab account.
## Synopsis
Creates a new GPG key owned by the currently authenticated user.
```bash twoslash title="Terminal"
glab gpg-key add [key-file] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Read GPG key from stdin and upload.
glab gpg-key add
# Read GPG key from specified key file and upload.
glab gpg-key add ~/.gnupg/pubkey.asc
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab gpg-key delete
Deletes a single GPG key specified by the ID.
```bash twoslash title="Terminal"
glab gpg-key delete [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete GPG key with ID as argument
glab gpg-key delete 7750633
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab gpg-key get
Returns a single GPG key specified by the ID.
```bash twoslash title="Terminal"
glab gpg-key get [flags]
```
## Examples
```bash twoslash title="Terminal"
# Get GPG key with ID as argument
glab gpg-key get 7750633
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab gpg-key
Manage GPG keys registered with your GitLab account.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`add`](/docs/gpg-key/add)
* [`delete`](/docs/gpg-key/delete)
* [`get`](/docs/gpg-key/get)
* [`list`](/docs/gpg-key/list)
# glab gpg-key list
Get a list of GPG keys for the currently authenticated user.
```bash twoslash title="Terminal"
glab gpg-key list [flags]
```
## Examples
```bash twoslash title="Terminal"
glab gpg-key list
```
## Options
```bash twoslash title="Terminal"
--show-id Shows IDs of GPG keys.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab incident close
Close an incident.
```bash twoslash title="Terminal"
glab incident close [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
resolve
```
## Examples
```bash twoslash title="Terminal"
glab incident close 123
glab incident close https://gitlab.com/NAMESPACE/REPO/-/issues/incident/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab incident
Work with GitLab incidents.
## Examples
```bash twoslash title="Terminal"
glab incident list
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`close`](/docs/incident/close)
* [`list`](/docs/incident/list)
* [`note`](/docs/incident/note)
* [`reopen`](/docs/incident/reopen)
* [`subscribe`](/docs/incident/subscribe)
* [`unsubscribe`](/docs/incident/unsubscribe)
* [`view`](/docs/incident/view)
# glab incident list
List project incidents.
```bash twoslash title="Terminal"
glab incident list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab incident list --all
glab incident ls --all
glab incident list --assignee=@me
glab incident list --milestone release-2.0.0 --opened
```
## Options
```bash twoslash title="Terminal"
-A, --all Get all incidents.
-a, --assignee string Filter incident by assignee .
--author string Filter incident by author .
-c, --closed Get only closed incidents.
-C, --confidential Filter by confidential incidents.
-e, --epic int List issues belonging to a given epic (requires --group, no pagination support).
-g, --group string Select a group or subgroup. Ignored if a repo argument is set.
--in string search in: title, description. (default "title,description")
-l, --label strings Filter incident by label .
-m, --milestone string Filter incident by milestone .
--not-assignee string Filter incident by not being assigned to .
--not-author string Filter incident by not being by author(s) .
--not-label strings Filter incident by lack of label .
--order string Order incident by . Order options: created_at, updated_at, priority, due_date, relative_position, label_priority, milestone_due, popularity, weight. (default "created_at")
-O, --output string Options: 'text' or 'json'. (default "text")
-F, --output-format string Options: 'details', 'ids', 'urls'. (default "details")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
--search string Search in the fields defined by '--in'.
--sort string Return incident sorted in asc or desc order. (default "desc")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab incident note
Comment on an incident in GitLab.
```bash twoslash title="Terminal"
glab incident note [flags]
```
## Aliases
```bash twoslash title="Terminal"
comment
```
## Options
```bash twoslash title="Terminal"
-m, --message string Message text.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab incident reopen
Reopen a resolved incident.
```bash twoslash title="Terminal"
glab incident reopen [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
open
```
## Examples
```bash twoslash title="Terminal"
glab incident reopen 123
glab incident open 123
glab incident reopen https://gitlab.com/NAMESPACE/REPO/-/issues/incident/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab incident subscribe
Subscribe to an incident.
```bash twoslash title="Terminal"
glab incident subscribe [flags]
```
## Aliases
```bash twoslash title="Terminal"
sub
```
## Examples
```bash twoslash title="Terminal"
glab incident subscribe 123
glab incident sub 123
glab incident subscribe https://gitlab.com/OWNER/REPO/-/issues/incident/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab incident unsubscribe
Unsubscribe from an incident.
```bash twoslash title="Terminal"
glab incident unsubscribe [flags]
```
## Aliases
```bash twoslash title="Terminal"
unsub
```
## Examples
```bash twoslash title="Terminal"
glab incident unsubscribe 123
glab incident unsub 123
glab incident unsubscribe https://gitlab.com/OWNER/REPO/-/issues/incident/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab incident view
Display the title, body, and other information about an incident.
```bash twoslash title="Terminal"
glab incident view [flags]
```
## Aliases
```bash twoslash title="Terminal"
show
```
## Examples
```bash twoslash title="Terminal"
glab incident view 123
glab incident show 123
glab incident view --web 123
glab incident view --comments 123
glab incident view https://gitlab.com/NAMESPACE/REPO/-/issues/incident/123
```
## Options
```bash twoslash title="Terminal"
-c, --comments Show incident comments and activities.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 20)
-s, --system-logs Show system activities and logs.
-w, --web Open incident in a browser. Uses the default browser, or the browser specified in the $BROWSER variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue close
Close an issue.
```bash twoslash title="Terminal"
glab issue close [ | ] [flags]
```
## Examples
```bash twoslash title="Terminal"
glab issue close 123
glab issue close https://gitlab.com/NAMESPACE/REPO/-/issues/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue create
Create an issue.
```bash twoslash title="Terminal"
glab issue create [flags]
```
## Aliases
```bash twoslash title="Terminal"
new
```
## Examples
```bash twoslash title="Terminal"
glab issue create
glab issue new
glab issue create -m release-2.0.0 -t "we need this feature" --label important
glab issue new -t "Fix CVE-YYYY-XXXX" -l security --linked-mr 123
glab issue create -m release-1.0.1 -t "security fix" --label security --web --recover
```
## Options
```bash twoslash title="Terminal"
-a, --assignee usernames Assign issue to people by their usernames.
-c, --confidential Set an issue to be confidential. (default false)
-d, --description string Issue description.
--due-date string A date in 'YYYY-MM-DD' format.
--epic int ID of the epic to add the issue to.
-l, --label strings Add label by name. Multiple labels should be comma-separated.
--link-type string Type for the issue link (default "relates_to")
--linked-issues ints The IIDs of issues that this issue links to.
--linked-mr int The IID of a merge request in which to resolve all issues.
-m, --milestone string The global ID or title of a milestone to assign.
--no-editor Don't open editor to enter a description. If set to true, uses prompt. (default false)
--recover Save the options to a file if the issue fails to be created. If the file exists, the options will be loaded from the recovery file. (EXPERIMENTAL)
-e, --time-estimate string Set time estimate for the issue.
-s, --time-spent string Set time spent for the issue.
-t, --title string Issue title.
--web Continue issue creation with web interface.
-w, --weight int Issue weight. Valid values are greater than or equal to 0.
-y, --yes Don't prompt for confirmation to submit the issue.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue delete
Delete an issue.
```bash twoslash title="Terminal"
glab issue delete [flags]
```
## Aliases
```bash twoslash title="Terminal"
del
```
## Examples
```bash twoslash title="Terminal"
glab issue delete 123
glab issue del 123
glab issue delete https://gitlab.com/profclems/glab/-/issues/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue
Work with GitLab issues.
## Examples
```bash twoslash title="Terminal"
glab issue list
glab issue create --label --confidential
glab issue view --web 123
glab issue note -m "closing because !123 was merged"
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`board`](/docs/issue/board)
* [`close`](/docs/issue/close)
* [`create`](/docs/issue/create)
* [`delete`](/docs/issue/delete)
* [`list`](/docs/issue/list)
* [`note`](/docs/issue/note)
* [`reopen`](/docs/issue/reopen)
* [`subscribe`](/docs/issue/subscribe)
* [`unsubscribe`](/docs/issue/unsubscribe)
* [`update`](/docs/issue/update)
* [`view`](/docs/issue/view)
# glab issue list
List project issues.
```bash twoslash title="Terminal"
glab issue list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab issue list --all
glab issue ls --all
glab issue list --assignee=@me
glab issue list --milestone release-2.0.0 --opened
```
## Options
```bash twoslash title="Terminal"
-A, --all Get all issues.
-a, --assignee string Filter issue by assignee .
--author string Filter issue by author .
-c, --closed Get only closed issues.
-C, --confidential Filter by confidential issues.
-e, --epic int List issues belonging to a given epic (requires --group, no pagination support).
-g, --group string Select a group or subgroup. Ignored if a repo argument is set.
--in string search in: title, description. (default "title,description")
-t, --issue-type string Filter issue by its type. Options: issue, incident, test_case.
-i, --iteration int Filter issue by iteration .
-l, --label strings Filter issue by label .
-m, --milestone string Filter issue by milestone .
--not-assignee string Filter issue by not being assigned to .
--not-author string Filter issue by not being by author(s) .
--not-label strings Filter issue by lack of label .
--order string Order issue by . Order options: created_at, updated_at, priority, due_date, relative_position, label_priority, milestone_due, popularity, weight. (default "created_at")
-O, --output string Options: 'text' or 'json'. (default "text")
-F, --output-format string Options: 'details', 'ids', 'urls'. (default "details")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
--search string Search in the fields defined by '--in'.
--sort string Return issue sorted in asc or desc order. (default "desc")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab issue note
Comment on an issue in GitLab.
```bash twoslash title="Terminal"
glab issue note [flags]
```
## Aliases
```bash twoslash title="Terminal"
comment
```
## Options
```bash twoslash title="Terminal"
-m, --message string Message text.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue reopen
Reopen a closed issue.
```bash twoslash title="Terminal"
glab issue reopen [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
open
```
## Examples
```bash twoslash title="Terminal"
glab issue reopen 123
glab issue open 123
glab issue reopen https://gitlab.com/NAMESPACE/REPO/-/issues/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue subscribe
Subscribe to an issue.
```bash twoslash title="Terminal"
glab issue subscribe [flags]
```
## Aliases
```bash twoslash title="Terminal"
sub
```
## Examples
```bash twoslash title="Terminal"
glab issue subscribe 123
glab issue sub 123
glab issue subscribe https://gitlab.com/OWNER/REPO/-/issues/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue unsubscribe
Unsubscribe from an issue.
```bash twoslash title="Terminal"
glab issue unsubscribe [flags]
```
## Aliases
```bash twoslash title="Terminal"
unsub
```
## Examples
```bash twoslash title="Terminal"
glab issue unsubscribe 123
glab issue unsub 123
glab issue unsubscribe https://gitlab.com/OWNER/REPO/-/issues/123
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue update
Update issue
```bash twoslash title="Terminal"
glab issue update [flags]
```
## Examples
```bash twoslash title="Terminal"
glab issue update 42 --label ui,ux
glab issue update 42 --unlabel working
```
## Options
```bash twoslash title="Terminal"
-a, --assignee strings Assign users by username. Prefix with '!' or '-' to remove from existing assignees, or '+' to add new. Otherwise, replace existing assignees with these users.
-c, --confidential Make issue confidential
-d, --description string Issue description. Set to "-" to open an editor.
--due-date string A date in 'YYYY-MM-DD' format.
-l, --label strings Add labels.
--lock-discussion Lock discussion on issue.
-m, --milestone string Title of the milestone to assign Set to "" or 0 to unassign.
-p, --public Make issue public.
-t, --title string Title of issue.
--unassign Unassign all users.
-u, --unlabel strings Remove labels.
--unlock-discussion Unlock discussion on issue.
-w, --weight int Set weight of the issue.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue view
Display the title, body, and other information about an issue.
```bash twoslash title="Terminal"
glab issue view [flags]
```
## Aliases
```bash twoslash title="Terminal"
show
```
## Examples
```bash twoslash title="Terminal"
glab issue view 123
glab issue show 123
glab issue view --web 123
glab issue view --comments 123
glab issue view https://gitlab.com/NAMESPACE/REPO/-/issues/123
```
## Options
```bash twoslash title="Terminal"
-c, --comments Show issue comments and activities.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 20)
-s, --system-logs Show system activities and logs.
-w, --web Open issue in a browser. Uses the default browser, or the browser specified in the $BROWSER variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab iteration
Retrieve iteration information.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`list`](/docs/iteration/list)
# glab iteration list
List project iterations
```bash twoslash title="Terminal"
glab iteration list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
- glab iteration list
- glab iteration ls
- glab iteration list -R owner/repository
- glab iteration list -g mygroup
```
## Options
```bash twoslash title="Terminal"
-g, --group string List iterations for a group.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab job artifact
Download all artifacts from the last pipeline.
```bash twoslash title="Terminal"
glab job artifact [flags]
```
## Aliases
```bash twoslash title="Terminal"
push
```
## Examples
```bash twoslash title="Terminal"
glab job artifact main build
glab job artifact main deploy --path="artifacts/"
glab job artifact main deploy --list-paths
```
## Options
```bash twoslash title="Terminal"
-l, --list-paths Print the paths of downloaded artifacts.
-p, --path string Path to download the artifact files. (default "./")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab job
Work with GitLab CI/CD jobs.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`artifact`](/docs/job/artifact)
# glab label create
Create labels for a repository or project.
```bash twoslash title="Terminal"
glab label create [flags]
```
## Aliases
```bash twoslash title="Terminal"
new
```
## Examples
```bash twoslash title="Terminal"
glab label create
glab label new
glab label create -R owner/repo
```
## Options
```bash twoslash title="Terminal"
-c, --color string Color of the label, in plain or HEX code. (default "#428BCA")
-d, --description string Label description.
-n, --name string Name of the label.
-p, --priority int Label priority.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab label delete
Delete labels for a repository or project.
```bash twoslash title="Terminal"
glab label delete [flags]
```
## Examples
```bash twoslash title="Terminal"
glab label delete foo
glab label delete -R owner/repo foo
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab label edit
Edit group or project label.
```bash twoslash title="Terminal"
glab label edit [flags]
```
## Examples
```bash twoslash title="Terminal"
glab label edit
glab label edit -R owner/repo
```
## Options
```bash twoslash title="Terminal"
-c, --color string The color of the label given in 6-digit hex notation with leading โ#โ sign.
-d, --description string Label description.
-l, --label-id int The label ID we are updating.
-n, --new-name string The new name of the label.
-p, --priority int Label priority.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab label get
Returns a single label specified by the ID.
```bash twoslash title="Terminal"
glab label get [flags]
```
## Examples
```bash twoslash title="Terminal"
# Get label info using label 1234 as argument
glab label get 1234
# Get info about a label in another project
glab label get 1234 -R owner/repo
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab label
Manage labels on remote.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/label/create)
* [`delete`](/docs/label/delete)
* [`edit`](/docs/label/edit)
* [`get`](/docs/label/get)
* [`list`](/docs/label/list)
# glab label list
List labels in the repository.
```bash twoslash title="Terminal"
glab label list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab label list
glab label ls
glab label list -R owner/repository
glab label list -g mygroup
```
## Options
```bash twoslash title="Terminal"
-g, --group string List labels for a group.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mcp
Work with a Model Context Protocol (MCP) server. (EXPERIMENTAL)
## Synopsis
Manage Model Context Protocol server features for GitLab integration.
The MCP server exposes GitLab features as tools for use by
AI assistants (like Claude Code) to interact with GitLab projects, issues,
merge requests, pipelines, and other resources.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
## Examples
```bash twoslash title="Terminal"
glab mcp serve
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`serve`](/docs/mcp/serve)
# glab mcp serve
Start a MCP server with stdio transport. (EXPERIMENTAL)
## Synopsis
Start a Model Context Protocol server to expose GitLab features
as tools for AI assistants like Claude Code.
The server uses stdio (standard input and output) transport for
communication, and provides tools to:
* Manage issues (list, create, update, close, add notes)
* Manage merge requests (list, create, update, merge, add notes)
* Manage projects (list, get details)
* Manage CI/CD pipelines and jobs
To configure this server in Claude Code, add this code to your
MCP settings:
```json
{
"mcpServers": {
"glab": {
"command": "glab",
"args": ["mcp", "serve"]
}
}
}
```
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab mcp serve [flags]
```
## Examples
```bash twoslash title="Terminal"
glab mcp serve
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab milestone create
Create a group or project milestone.
```bash twoslash title="Terminal"
glab milestone create [flags]
```
## Examples
```bash twoslash title="Terminal"
# Create milestone for the current project
glab milestone create --title='Example title' --due-date='2025-12-16'
# Create milestone for the specified project
glab milestone create --title='Example group milestone' --due-date='2025-12-16' --project 123
# Create milestone for the specified group
glab milestone create --title='Example group milestone' --due-date='2025-12-16' --group 456
```
## Options
```bash twoslash title="Terminal"
--description string Description of the milestone.
--due-date string Due date for the milestone. Expected in ISO 8601 format (2025-04-15T08:00:00Z).
--group string The ID or URL-encoded path of the group.
--project string The ID or URL-encoded path of the project.
--start-date string Start date for the milestone. Expected in ISO 8601 format (2025-04-15T08:00:00Z).
--title string Title of the milestone.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab milestone delete
Delete a group or project milestone.
```bash twoslash title="Terminal"
glab milestone delete [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete milestone for the current project
glab milestone delete 123
# Delete milestone for the specified project
glab milestone delete 123 --project project-name
# Delete milestone for the specified group
glab milestone delete 123 --group group-name
```
## Options
```bash twoslash title="Terminal"
--group string The ID or URL-encoded path of the group.
--project string The ID or URL-encoded path of the project.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab milestone edit
Edit a group or project milestone.
```bash twoslash title="Terminal"
glab milestone edit [flags]
```
## Examples
```bash twoslash title="Terminal"
# Edit milestone for the current project
glab milestone edit 123 --title='Example title' --due-date='2025-12-16'
# Edit milestone for the specified project
glab milestone edit 123 --title='Example group milestone' --due-date='2025-12-16' --project example-path/project-path
# Edit milestone for the specified group
glab milestone edit 123 --title='Example group milestone' --due-date='2025-12-16' --group 789
```
## Options
```bash twoslash title="Terminal"
--description string Description of the milestone.
--due-date string Due date for the milestone. Expected in ISO 8601 format (2025-04-15T08:00:00Z).
--group string The ID or URL-encoded path of the group.
--project string The ID or URL-encoded path of the project.
--start-date string Start date for the milestone. Expected in ISO 8601 format (2025-04-15T08:00:00Z).
--state string State of the milestone. Can be 'activate' or 'close'.
--title string Title of the milestone.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab milestone get
Get a milestones via an ID for a project or group.
```bash twoslash title="Terminal"
glab milestone get [flags]
```
## Examples
```bash twoslash title="Terminal"
# Get milestone for the current project
glab milestone get 123
# Get milestone for the specified project
glab milestone get 123 --project project-name
# Get milestone for the specified group
glab milestone get 123 --group group-name
```
## Options
```bash twoslash title="Terminal"
--group string The ID or URL-encoded path of the group.
--project string The ID or URL-encoded path of the project.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab milestone
Manage group or project milestones.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/milestone/create)
* [`delete`](/docs/milestone/delete)
* [`edit`](/docs/milestone/edit)
* [`get`](/docs/milestone/get)
* [`list`](/docs/milestone/list)
# glab milestone list
Get a list of milestones for a project or group.
```bash twoslash title="Terminal"
glab milestone list [flags]
```
## Examples
```bash twoslash title="Terminal"
# List milestones for a given project
glab milestone list --project 123
glab milestone list --project example-group/project-path
# List milestones for a group
glab milestone list --group example-group
# List only active milestones for a given group
glab milestone list --group example-group --state active
```
## Options
```bash twoslash title="Terminal"
--group string The ID or URL-encoded path of the group.
--include-ancestors Include milestones from all parent groups.
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 20)
--project string The ID or URL-encoded path of the project.
--search string Return only milestones with a title or description matching the provided string.
--show-id Show IDs in table output.
--state string Return only 'active' or 'closed' milestones.
--title string Return only the milestones having the given title.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr approve
Approve merge requests.
```bash twoslash title="Terminal"
glab mr approve { | } [flags]
```
## Examples
```bash twoslash title="Terminal"
glab mr approve 235
glab mr approve 123 345
glab mr approve branch-1
glab mr approve branch-2 branch-3
# Finds open merge request from current branch and approves it
glab mr approve
```
## Options
```bash twoslash title="Terminal"
-s, --sha string SHA, which must match the SHA of the HEAD commit of the merge request.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr approvers
List eligible approvers for merge requests in any state.
```bash twoslash title="Terminal"
glab mr approvers [ | ] [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr checkout
Check out an open merge request.
```bash twoslash title="Terminal"
glab mr checkout [ | | ] [flags]
```
## Examples
```bash twoslash title="Terminal"
glab mr checkout 1
glab mr checkout branch
glab mr checkout 12 --branch todo-fix
glab mr checkout new-feature --set-upstream-to=upstream/main
glab mr checkout https://gitlab.com/gitlab-org/cli/-/merge_requests/1234
# Uses the checked-out branch
glab mr checkout
```
## Options
```bash twoslash title="Terminal"
-b, --branch string Check out merge request with name .
-u, --set-upstream-to string Set tracking of checked-out branch to [REMOTE/]BRANCH.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr close
Close a merge request.
```bash twoslash title="Terminal"
glab mr close [ | ] [flags]
```
## Examples
```bash twoslash title="Terminal"
glab mr close 1
# Close multiple merge requests at once
glab mr close 1 2 3 4
# Use the checked-out branch
glab mr close
glab mr close branch
glab mr close username:branch
glab mr close branch -R another/repo
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr create
Create a new merge request.
```bash twoslash title="Terminal"
glab mr create [flags]
```
## Aliases
```bash twoslash title="Terminal"
new
```
## Examples
```bash twoslash title="Terminal"
glab mr new
glab mr create -a username -t "fix annoying bug"
glab mr create -f --draft --label RFC
glab mr create --fill --web
glab mr create --fill --fill-commit-body --yes
```
## Options
```bash twoslash title="Terminal"
--allow-collaboration Allow commits from other members.
-a, --assignee usernames Assign merge request to people by their usernames.
--copy-issue-labels Copy labels from issue to the merge request. Used with --related-issue.
--create-source-branch Create a source branch if it does not exist.
-d, --description string Supply a description for the merge request.
--draft Mark merge request as a draft.
-f, --fill push Do not prompt for title or description, and just use commit info. Sets push to `true`, and pushes the branch.
--fill-commit-body Fill description with each commit body when multiple commits. Can only be used with --fill.
-H, --head OWNER/REPO Select another head repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format, the project ID, or the full URL.
-l, --label strings Add label by name. Multiple labels should be comma-separated.
-m, --milestone string The global ID or title of a milestone to assign.
--no-editor Don't open editor to enter a description. If true, uses prompt. Defaults to false.
--push Push committed changes after creating merge request. Make sure you have committed changes.
--recover Save the options to a file if the merge request creation fails. If the file exists, the options are loaded from the recovery file. (EXPERIMENTAL)
-i, --related-issue string Create a merge request for an issue. If --title is not provided, uses the issue title.
--remove-source-branch Remove source branch on merge.
--reviewer usernames Request review from users by their usernames.
--signoff Append a DCO signoff to the merge request description.
-s, --source-branch string Create a merge request from this branch. Default is the current branch.
--squash-before-merge Squash commits into a single commit when merging.
-b, --target-branch string The target or base branch into which you want your code merged into.
-t, --title string Supply a title for the merge request.
-w, --web Continue merge request creation in a browser.
--wip Mark merge request as a draft. Alternative to --draft.
-y, --yes Skip submission confirmation prompt. Use --fill to skip all optional prompts.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr delete
Delete a merge request.
```bash twoslash title="Terminal"
glab mr delete [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
del
```
## Examples
```bash twoslash title="Terminal"
glab mr delete 123
# Delete multiple merge requests by ID and branch name
glab mr delete 123 branch-name 789
# Delete merge requests !1, !2, !3, !4, !5
glab mr delete 1,2,branch-related-to-mr-3,4,5
glab mr del 123
glab mr delete branch
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr diff
View changes in a merge request.
```bash twoslash title="Terminal"
glab mr diff [ | ] [flags]
```
## Examples
```bash twoslash title="Terminal"
glab mr diff 123
glab mr diff branch
# Get merge request from current branch
glab mr diff
glab mr diff 123 --color=never
```
## Options
```bash twoslash title="Terminal"
--color string Use color in diff output: always, never, auto. (default "auto")
--raw Use raw diff format that can be piped to commands
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr
Create, view, and manage merge requests.
## Examples
```bash twoslash title="Terminal"
glab mr create --fill --label bugfix
glab mr merge 123
glab mr note -m "needs to do X before it can be merged" branch-foo
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`approve`](/docs/mr/approve)
* [`approvers`](/docs/mr/approvers)
* [`checkout`](/docs/mr/checkout)
* [`close`](/docs/mr/close)
* [`create`](/docs/mr/create)
* [`delete`](/docs/mr/delete)
* [`diff`](/docs/mr/diff)
* [`issues`](/docs/mr/issues)
* [`list`](/docs/mr/list)
* [`merge`](/docs/mr/merge)
* [`note`](/docs/mr/note)
* [`rebase`](/docs/mr/rebase)
* [`reopen`](/docs/mr/reopen)
* [`revoke`](/docs/mr/revoke)
* [`subscribe`](/docs/mr/subscribe)
* [`todo`](/docs/mr/todo)
* [`unsubscribe`](/docs/mr/unsubscribe)
* [`update`](/docs/mr/update)
* [`view`](/docs/mr/view)
# glab mr issues
Get issues related to a particular merge request.
```bash twoslash title="Terminal"
glab mr issues [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
issue
```
## Examples
```bash twoslash title="Terminal"
# List issues for merge request 46
glab mr issues 46
glab mr issues branch
# Use the checked-out branch
glab mr issues
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr list
List merge requests.
```bash twoslash title="Terminal"
glab mr list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab mr list --all
glab mr ls -a
glab mr list --assignee=@me
glab mr list --reviewer=@me
glab mr list --source-branch=new-feature
glab mr list --target-branch=main
glab mr list --search "this adds feature X"
glab mr list --label needs-review
glab mr list --not-label waiting-maintainer-feedback,subsystem-x
glab mr list -M --per-page 10
glab mr list --draft
glab mr list --not-draft
```
## Options
```bash twoslash title="Terminal"
-A, --all Get all merge requests.
-a, --assignee strings Get only merge requests assigned to users.
--author string Filter merge request by author .
-c, --closed Get only closed merge requests.
-d, --draft Filter by draft merge requests.
-g, --group string Select a group/subgroup. This option is ignored if a repo argument is set.
-l, --label strings Filter merge request by label .
-M, --merged Get only merged merge requests.
-m, --milestone string Filter merge request by milestone .
--not-draft Filter by non-draft merge requests.
--not-label strings Filter merge requests by not having label .
-o, --order string Order merge requests by . Order options: created_at, title, merged_at or updated_at.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-r, --reviewer strings Get only merge requests with users as reviewer.
--search string Filter by in title and description.
-S, --sort string Sort merge requests by . Sort options: asc, desc.
-s, --source-branch string Filter by source branch .
-t, --target-branch string Filter by target branch .
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab mr merge
Merge or accept a merge request.
```bash twoslash title="Terminal"
glab mr merge { | } [flags]
```
## Aliases
```bash twoslash title="Terminal"
accept
```
## Examples
```bash twoslash title="Terminal"
# Merge a merge request
glab mr merge 235
glab mr accept 235
# Finds open merge request from current branch
glab mr merge
```
## Options
```bash twoslash title="Terminal"
--auto-merge Set auto-merge. (default true)
-m, --message string Custom merge commit message.
-r, --rebase Rebase the commits onto the base branch.
-d, --remove-source-branch Remove source branch on merge.
--sha string Merge commit SHA.
-s, --squash Squash commits on merge.
--squash-message string Custom squash commit message.
-y, --yes Skip submission confirmation prompt.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr note
Add a comment or note to a merge request.
```bash twoslash title="Terminal"
glab mr note [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
comment
```
## Options
```bash twoslash title="Terminal"
-m, --message string Comment or note message.
--unique Don't create a comment or note if it already exists.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr rebase
Rebase the source branch of a merge request against its target branch.
## Synopsis
If you don't have permission to push to the merge request's source branch, you'll get a 403 Forbidden response.
```bash twoslash title="Terminal"
glab mr rebase [ | ] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Rebase merge request 123
glab mr rebase 123
# Rebase current branch
glab mr rebase
# Rebase merge request from branch
glab mr rebase branch
glab mr rebase branch --skip-ci
```
## Options
```bash twoslash title="Terminal"
--skip-ci Rebase merge request while skipping CI/CD pipeline.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr reopen
Reopen a merge request.
```bash twoslash title="Terminal"
glab mr reopen [... | ...] [flags]
```
## Aliases
```bash twoslash title="Terminal"
open
```
## Examples
```bash twoslash title="Terminal"
# Reopen merge request 123
glab mr reopen 123
# Reopen merge requests 123, 456, and 789
glab mr reopen 123 456 789
# Reopen merge requests from branches branch-1 and branch-2
glab mr reopen branch-1 branch-2
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr revoke
Revoke approval on a merge request.
```bash twoslash title="Terminal"
glab mr revoke [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
unapprove
```
## Examples
```bash twoslash title="Terminal"
# Revoke approval on a merge request
glab mr revoke 123
glab mr unapprove 123
glab mr revoke branch
# Revoke approval on the currently checked out branch
glab mr revoke
# Revoke approval on merge request 123 on branch 456
glab mr revoke 123 branch 456
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr subscribe
Subscribe to a merge request.
```bash twoslash title="Terminal"
glab mr subscribe [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
sub
```
## Examples
```bash twoslash title="Terminal"
# Subscribe to a merge request
glab mr subscribe 123
glab mr sub 123
glab mr subscribe branch
# Subscribe to multiple merge requests
glab mr subscribe 123 branch
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr todo
Add a to-do item to merge request.
```bash twoslash title="Terminal"
glab mr todo [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
add-todo
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr unsubscribe
Unsubscribe from a merge request.
```bash twoslash title="Terminal"
glab mr unsubscribe [ | ] [flags]
```
## Aliases
```bash twoslash title="Terminal"
unsub
```
## Examples
```bash twoslash title="Terminal"
# Unsubscribe from a merge request
glab mr unsubscribe 123
glab mr unsub 123
glab mr unsubscribe branch
# Unsubscribe from multiple merge requests
glab mr unsubscribe 123 branch
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr update
Update a merge request.
```bash twoslash title="Terminal"
glab mr update [ | ] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Mark a merge request as ready
glab mr update 23 --ready
# Mark a merge request as draft
glab mr update 23 --draft
# Updates the merge request for the current branch
glab mr update --draft
# Update merge request with commit information
glab mr update 23 --fill --fill-commit-body --yes
```
## Options
```bash twoslash title="Terminal"
-a, --assignee strings Assign users via username. Prefix with '!' or '-' to remove from existing assignees, '+' to add. Otherwise, replace existing assignees with given users.
-d, --description string Merge request description. Set to "-" to open an editor.
--draft Mark merge request as a draft.
-f, --fill Do not prompt for title or body, and just use commit info.
--fill-commit-body Fill body with each commit body when multiple commits. Can only be used with --fill.
-l, --label strings Add labels.
--lock-discussion Lock discussion on merge request.
-m, --milestone string Title of the milestone to assign. Set to "" or 0 to unassign.
-r, --ready Mark merge request as ready to be reviewed and merged.
--remove-source-branch Toggles the removal of the source branch on merge.
--reviewer strings Request review from users by their usernames. Prefix with '!' or '-' to remove from existing reviewers, '+' to add. Otherwise, replace existing reviewers with given users.
--squash-before-merge Toggles the option to squash commits into a single commit when merging.
--target-branch string Set target branch.
-t, --title string Title of merge request.
--unassign Unassign all users.
-u, --unlabel strings Remove labels.
--unlock-discussion Unlock discussion on merge request.
--wip Mark merge request as a work in progress. Alternative to --draft.
-y, --yes Skip confirmation prompt.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab mr view
Display the title, body, and other information about a merge request.
```bash twoslash title="Terminal"
glab mr view { | } [flags]
```
## Aliases
```bash twoslash title="Terminal"
show
```
## Options
```bash twoslash title="Terminal"
-c, --comments Show merge request comments and activities.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number.
-P, --per-page int Number of items to list per page. (default 20)
-s, --system-logs Show system activities and logs.
-w, --web Open merge request in a browser. Uses default browser or browser specified in BROWSER variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab opentofu
Work with the OpenTofu or Terraform integration.
## Aliases
```bash twoslash title="Terminal"
terraform
tf
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`init`](/docs/opentofu/init)
* [`state`](/docs/opentofu/state)
# glab opentofu init
Initialize OpenTofu or Terraform.
```bash twoslash title="Terminal"
glab opentofu init [flags]
```
## Examples
```bash twoslash title="Terminal"
# Initialize state with name production in working directory
glab opentofu init production
# Initialize state with name production in infra/ directory
glab opentofu init production -d infra/
# Initialize state with name production with Terraform
glab opentofu init production -b terraform
# Initialize state with name production with reconfiguring state
glab opentofu init production -- -reconfigure
```
## Options
```bash twoslash title="Terminal"
-b, --binary string Name or path of the OpenTofu or Terraform binary to use for the initialization. (default "tofu")
-d, --directory string Directory of the OpenTofu or Terraform project to initialize. (default ".")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab release create
Create a new GitLab release, or update an existing one.
## Synopsis
Create a new GitLab release for a repository, or
update an existing one. Requires at least the Developer role.
An existing release is updated with the new information you provide.
To create a release from an annotated Git tag:
1. Create the tag locally with Git, and push the tag to GitLab.
2. Run this command.
3. If the Git tag you specify doesn't exist, the command creates a
release from the latest state of the default branch, and tags it
with the tag name you specify.
To override this behavior, use `--ref`. The `ref`
can be a commit SHA, another tag name, or a branch name.
4. Optional. To fetch the new tag locally after the release, run
`git fetch --tags origin`.
```bash twoslash title="Terminal"
glab release create [...] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Create a release interactively
glab release create v1.0.1
# Create a release non-interactively by specifying a note
glab release create v1.0.1 --notes "bugfix release"
# Use release notes from a file
glab release create v1.0.1 -F changelog.md
# Upload a release asset with a display name (type will default to 'other')
glab release create v1.0.1 '/path/to/asset.zip#My display label'
# Upload a release asset with a display name and type
glab release create v1.0.1 '/path/to/asset.png#My display label#image'
# Upload all assets in a specified folder (types default to 'other')
glab release create v1.0.1 ./dist/*
# Upload all tarballs in a specified folder (types default to 'other')
glab release create v1.0.1 ./dist/*.tar.gz
# Create a release with assets specified as JSON object
glab release create v1.0.1 --assets-links='
[
{
"name": "Asset1",
"url":"https:///some/location/1",
"link_type": "other",
"direct_asset_path": "path/to/file"
}
]'
# (EXPERIMENTAL) Create a release and publish it to the GitLab CI/CD catalog
# Requires the feature flag `ci_release_cli_catalog_publish_option` to be enabled
# for this project in your GitLab instance. Do NOT run this manually. Use it as part
# of a CI/CD pipeline with the "release" keyword:
# - It retrieves components from the current repository by searching for
# `yml` files within the "templates" directory and its subdirectories.
# - It fails if the feature flag `ci_release_cli_catalog_publish_option`
# is not enabled for this project in your GitLab instance.
# Components can be defined:
# - In single files ending in `.yml` for each component, like `templates/secret-detection.yml`.
# - In subdirectories containing `template.yml` files as entry points,
# for components that bundle together multiple related files. For example,
# `templates/secret-detection/template.yml`.
glab release create v1.0.1 --publish-to-catalog
```
## Options
```bash twoslash title="Terminal"
-a, --assets-links string JSON string representation of assets links. See documentation for example.
-m, --milestone strings The title of each milestone the release is associated with.
-n, --name string The release name or title.
--no-close-milestone Prevent closing milestones after creating the release.
--no-update Prevent updating the existing release.
-N, --notes string The release notes or description. Accepts Markdown.
-F, --notes-file string Read release notes 'file'. To read from stdin, use '-'.
--package-name string The package name, when uploading assets to the generic package release with --use-package-registry. (default "release-assets")
--publish-to-catalog (EXPERIMENTAL) Publish the release to the GitLab CI/CD catalog.
-r, --ref string If the specified tag doesn't exist, create a release from the ref and tag it with the specified tag name. Accepts a commit SHA, tag name, or branch name.
-D, --released-at string ISO 8601 datetime when the release was ready. Defaults to the current datetime.
-T, --tag-message string Message to use if creating a new annotated tag.
--use-package-registry Upload release assets to the generic package registry of the project. Overrides the GITLAB_RELEASE_ASSETS_USE_PACKAGE_REGISTRY environment variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab release delete
Delete a GitLab release.
## Synopsis
Delete release assets to GitLab release. Requires the Maintainer role or higher.
Deleting a release does not delete the associated tag, unless you specify `--with-tag`.
```bash twoslash title="Terminal"
glab release delete [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete a release (with a confirmation prompt)
glab release delete v1.1.0
# Skip the confirmation prompt and force delete
glab release delete v1.0.1 -y
# Delete release and associated tag
glab release delete v1.0.1 --with-tag
```
## Options
```bash twoslash title="Terminal"
-t, --with-tag Delete the associated tag.
-y, --yes Skip the confirmation prompt.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab release download
Download asset files from a GitLab release.
## Synopsis
Download asset files from a GitLab release.
If no tag is specified, downloads assets from the latest release.
To specify a file name to download from the release assets, use `--asset-name`.
`--asset-name` flag accepts glob patterns.
```bash twoslash title="Terminal"
glab release download [flags]
```
## Examples
```bash twoslash title="Terminal"
# Download all assets from the latest release
glab release download
# Download all assets from the specified release tag
glab release download v1.1.0
# Download assets with names matching the glob pattern
glab release download v1.10.1 --asset-name="*.tar.gz"
```
## Options
```bash twoslash title="Terminal"
-n, --asset-name stringArray Download only assets that match the name or a glob pattern.
-D, --dir string Directory to download the release assets to. (default ".")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab release
Manage GitLab releases.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/release/create)
* [`delete`](/docs/release/delete)
* [`download`](/docs/release/download)
* [`list`](/docs/release/list)
* [`upload`](/docs/release/upload)
* [`view`](/docs/release/view)
# glab release list
List releases in a repository.
```bash twoslash title="Terminal"
glab release list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab release upload
Upload release asset files or links to a GitLab release.
## Synopsis
Upload release assets to a GitLab release.
Define the display name by appending '#' after the filename.
The link type comes after the display name, like this: 'myfile.tar.gz#My display name#package'
```bash twoslash title="Terminal"
glab release upload [...] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Upload a release asset with a display name. 'Type' defaults to 'other'.
glab release upload v1.0.1 '/path/to/asset.zip#My display label'
# Upload a release asset with a display name and type.
glab release upload v1.0.1 '/path/to/asset.png#My display label#image'
# Upload all assets in a specified folder. 'Type' defaults to 'other'.
glab release upload v1.0.1 ./dist/*
# Upload all tarballs in a specified folder. 'Type' defaults to 'other'.
glab release upload v1.0.1 ./dist/*.tar.gz
# Upload release assets links specified as JSON string
glab release upload v1.0.1 --assets-links='
[
{
"name": "Asset1",
"url":"https:///some/location/1",
"link_type": "other",
"direct_asset_path": "path/to/file"
}
]'
```
## Options
```bash twoslash title="Terminal"
-a, --assets-links JSON JSON string representation of assets links, like: `--assets-links='[{"name": "Asset1", "url":"https:///some/location/1", "link_type": "other", "direct_asset_path": "path/to/file"}]'.`
--package-name string The package name to use when uploading the assets to the generic package release with --use-package-registry. (default "release-assets")
--use-package-registry Upload release assets to the generic package registry of the project. Alternatively to this flag you may also set the GITLAB_RELEASE_ASSETS_USE_PACKAGE_REGISTRY environment variable to either the value true or 1. The flag takes precedence over this environment variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab release view
View information about a GitLab release.
## Synopsis
View information about a GitLab release.
Without an explicit tag name argument, shows the latest release in the project.
```bash twoslash title="Terminal"
glab release view [flags]
```
## Examples
```bash twoslash title="Terminal"
# View the latest release of a GitLab repository
glab release view
# View a release with specified tag name
glab release view v1.0.1
```
## Options
```bash twoslash title="Terminal"
-w, --web Open the release in the browser.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab repo archive
Get an archive of the repository.
## Synopsis
Clone supports these shorthand references:
* repo
* namespace/repo
* namespace/group/repo
```bash twoslash title="Terminal"
glab repo archive [flags]
```
## Examples
```bash twoslash title="Terminal"
glab repo archive profclems/glab
# Downloads zip file of current repository
glab repo archive
# Downloads repo zip file into mydirectory
glab repo archive profclems/glab mydirectory
# Finds repo for current user and download in ZIP format
glab repo archive profclems/glab --format=zip
```
## Options
```bash twoslash title="Terminal"
-f, --format string Optional. Specify format if you want a downloaded archive: tar.gz, tar.bz2, tbz, tbz2, tb2, bz2, tar, zip. (default "zip")
-s, --sha string The commit SHA to download. A tag, branch reference, or SHA can be used. Defaults to the tip of the default branch if not specified.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo clone
Clone a GitLab repository or project.
## Synopsis
Clone supports these shorthand references:
* repo
* namespace/repo
* org/group/repo
* project ID
```bash twoslash title="Terminal"
glab repo clone [flags] [] [-- ...]
glab repo clone -g [flags] [] [-- ...]
```
## Examples
```bash twoslash title="Terminal"
# Clones repository into current directory
glab repo clone gitlab-org/cli
glab repo clone https://gitlab.com/gitlab-org/cli
# Clones repository into 'mydirectory'
glab repo clone gitlab-org/cli mydirectory
# Clones repository 'glab' for current user
glab repo clone glab
# Finds the project by the ID provided and clones it
glab repo clone 4356677
# Clones all repos in a group
glab repo clone -g everyonecancontribute --paginate
# Clones all non-archived repos in a group
glab repo clone -g everyonecancontribute --archived=false --paginate
# Clones from a GitLab Self-Managed or GitLab Dedicated instance
GITLAB_HOST=salsa.debian.org glab repo clone myrepo
```
## Options
```bash twoslash title="Terminal"
-g, --group string Specify the group to clone repositories from.
-p, --preserve-namespace Clone the repository in a subdirectory based on namespace.
-a, --archived Limit by archived status. Use with '-a=false' to exclude archived repositories. Used with the --group flag.
-G, --include-subgroups Include projects in subgroups of this group. Default is true. Used with the --group flag. (default true)
-m, --mine Limit by projects in the group owned by the current authenticated user. Used with the --group flag.
-v, --visibility string Limit by visibility: public, internal, private. Used with the --group flag.
-I, --with-issues-enabled Limit by projects with the issues feature enabled. Default is false. Used with the --group flag.
-M, --with-mr-enabled Limit by projects with the merge request feature enabled. Default is false. Used with the --group flag.
-S, --with-shared Include projects shared to this group. Default is true. Used with the --group flag. (default true)
--paginate Make additional HTTP requests to fetch all pages of projects before cloning. Respects --per-page.
--page int Page number. (default 1)
--per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo contributors
Get repository contributors list.
```bash twoslash title="Terminal"
glab repo contributors [flags]
```
## Aliases
```bash twoslash title="Terminal"
users
```
## Examples
```bash twoslash title="Terminal"
# List contributors for the current repository
glab repo contributors
# List contributors for a specific repository
glab repo contributors -R gitlab-com/www-gitlab-com
```
## Options
```bash twoslash title="Terminal"
-o, --order string Return contributors ordered by name, email, or commits (orders by commit date) fields. (default "commits")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-s, --sort string Return contributors. Sort options: asc, desc.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo create
Create a new GitLab project/repository.
## Synopsis
Creates the new project with your first configured host in your `glab`
configuration. The host defaults to `GitLab.com` if not set. To set a host,
provide either:
* A `GITLAB_HOST` environment variable.
* A full URL for the project.
```bash twoslash title="Terminal"
glab repo create [path] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Create a repository under your account using the current directory name.
glab repo create
# Create a repository under a group using the current directory name.
glab repo create --group glab-cli
# Create a repository with a specific name.
glab repo create my-project
# Create a repository for a group.
glab repo create glab-cli/my-project
# Create on a host other than gitlab.com.
GITLAB_HOST=example.com glab repo create
glab repo create /path/to/repository
```
## Options
```bash twoslash title="Terminal"
--defaultBranch master Default branch of the project. Defaults to master if not provided.
-d, --description string Description of the new project.
-g, --group string Namespace or group for the new project. Defaults to the current user's namespace.
--internal Make project internal: visible to any authenticated user. Default.
-n, --name string Name of the new project.
-p, --private Make project private: visible only to project members.
-P, --public Make project public: visible without any authentication.
--readme README.md Initialize project with README.md.
--remoteName origin Remote name for the Git repository you're in. Defaults to origin if not provided. (default "origin")
-s, --skipGitInit Skip run 'git init'.
-t, --tag stringArray The list of tags for the project.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo delete
Delete an existing repository on GitLab.
```bash twoslash title="Terminal"
glab repo delete [/] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete a personal repository.
glab repo delete dotfiles
# Delete a repository in a GitLab group, or another repository
# you have write access to:
glab repo delete mygroup/dotfiles
glab repo delete myorg/mynamespace/dotfiles
```
## Options
```bash twoslash title="Terminal"
-y, --yes Skip the confirmation prompt and immediately delete the repository.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo fork
Fork a GitLab repository.
```bash twoslash title="Terminal"
glab repo fork [flags]
```
## Examples
```bash twoslash title="Terminal"
glab repo fork
glab repo fork namespace/repo
glab repo fork namespace/repo --clone
```
## Options
```bash twoslash title="Terminal"
-c, --clone Clone the fork. Options: true, false.
-n, --name string The name assigned to the new project after forking.
-p, --path string The path assigned to the new project after forking.
--remote Add a remote for the fork. Options: true, false.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo
Work with GitLab repositories and projects.
## Aliases
```bash twoslash title="Terminal"
project
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`archive`](/docs/repo/archive)
* [`clone`](/docs/repo/clone)
* [`contributors`](/docs/repo/contributors)
* [`create`](/docs/repo/create)
* [`delete`](/docs/repo/delete)
* [`fork`](/docs/repo/fork)
* [`list`](/docs/repo/list)
* [`members`](/docs/repo/members)
* [`mirror`](/docs/repo/mirror)
* [`publish`](/docs/repo/publish)
* [`search`](/docs/repo/search)
* [`transfer`](/docs/repo/transfer)
* [`update`](/docs/repo/update)
* [`view`](/docs/repo/view)
# glab repo list
Get list of repositories.
```bash twoslash title="Terminal"
glab repo list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab repo list
```
## Options
```bash twoslash title="Terminal"
-a, --all List all projects on the instance.
--archived Limit by archived status. Use 'false' to exclude archived repositories. Used with the '--group' flag.
-g, --group string Return repositories in only the given group.
-G, --include-subgroups Include projects in subgroups of this group. Default is false. Used with the '--group' flag.
--member List only projects of which you are a member.
-m, --mine List only projects you own. Default if no filters are provided.
-o, --order string Return repositories ordered by id, name, path, created_at, updated_at, similarity, star_count, last_activity_at. (default "last_activity_at")
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
-s, --sort string Return repositories sorted in asc or desc order.
--starred List only starred projects.
-u, --user string List user projects.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo mirror
Mirror a project or repository to the specified location, using pull or push methods.
```bash twoslash title="Terminal"
glab repo mirror [ID | URL | PATH] [flags]
```
## Options
```bash twoslash title="Terminal"
--allow-divergence Determines if divergent refs are skipped.
--direction string Mirror direction. Options: pull, push. (default "pull")
--enabled Determines if the mirror is enabled. (default true)
--protected-branches-only Determines if only protected branches are mirrored.
--url string The target URL to which the repository is mirrored.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo search
Search for GitLab repositories and projects by name.
```bash twoslash title="Terminal"
glab repo search [flags]
```
## Aliases
```bash twoslash title="Terminal"
find
lookup
```
## Examples
```bash twoslash title="Terminal"
glab project search -s "title"
glab repo search -s "title"
glab project find -s "title"
glab project lookup -s "title"
```
## Options
```bash twoslash title="Terminal"
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 20)
-s, --search string A string contained in the project name.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo transfer
Transfer a repository to a new namespace.
```bash twoslash title="Terminal"
glab repo transfer [repo] [flags]
```
## Examples
```bash twoslash title="Terminal"
glab repo transfer profclems/glab --target-namespace notprofclems
```
## Options
```bash twoslash title="Terminal"
-t, --target-namespace string The namespace where your project should be transferred to.
-y, --yes Warning: Skip confirmation prompt and force transfer operation. Transfer cannot be undone.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo update
Update an existing GitLab project or repository.
```bash twoslash title="Terminal"
glab repo update [path] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Update the description for my-project.
glab repo update my-project --description "This project is cool."
# Update the default branch for my-project.
glab repo update my-project --defaultBranch main
# Archive my-project.
glab repo update my-project --archive
glab repo update my-project --archive=true
# Unarchive my-project.
glab repo update my-project --archive=false
```
## Options
```bash twoslash title="Terminal"
--archive Whether the project should be archived.
--defaultBranch string New default branch for the project.
-d, --description string New description for the project.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo view
View a project or repository.
## Synopsis
Display the description and README of a project, or open it in the browser.
```bash twoslash title="Terminal"
glab repo view [repository] [flags]
```
## Examples
```bash twoslash title="Terminal"
# View project information for the current directory.
# Must be a Git repository.
glab repo view
# View project information of specified name.
# glab repo view my-project
glab repo view user/repo
glab repo view group/namespace/repo
# Specify repository by full [Git] URL.
glab repo view git@gitlab.com:user/repo.git
glab repo view https://gitlab.company.org/user/repo
glab repo view https://gitlab.company.org/user/repo.git
```
## Options
```bash twoslash title="Terminal"
-b, --branch string View a specific branch of the repository.
-F, --output string Format output as: text, json. (default "text")
-w, --web Open a project in the browser.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab schedule create
Schedule a new pipeline.
```bash twoslash title="Terminal"
glab schedule create [flags]
```
## Examples
```bash twoslash title="Terminal"
# Create a scheduled pipeline that runs every hour
glab schedule create --cron "0 * * * *" --description "Describe your pipeline here" --ref "main" --variable "foo:bar" --variable "baz:baz"
# :-> Created schedule
```
## Options
```bash twoslash title="Terminal"
--active Whether or not the schedule is active. (default true)
--cron string Cron interval pattern.
--cronTimeZone string Cron timezone. (default "UTC")
--description string Description of the schedule.
--ref string Target branch or tag.
--variable strings Pass variables to schedule in the format :.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab schedule delete
Delete the schedule with the specified ID.
```bash twoslash title="Terminal"
glab schedule delete [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete a scheduled pipeline with ID 10
glab schedule delete 10
# :-> Deleted schedule with ID 10
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab schedule
Work with GitLab CI/CD schedules.
## Aliases
```bash twoslash title="Terminal"
sched
skd
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/schedule/create)
* [`delete`](/docs/schedule/delete)
* [`list`](/docs/schedule/list)
* [`run`](/docs/schedule/run)
* [`update`](/docs/schedule/update)
# glab schedule list
Get the list of schedules.
```bash twoslash title="Terminal"
glab schedule list [flags]
```
## Examples
```bash twoslash title="Terminal"
# List all scheduled pipelines
glab schedule list
# :-> Showing schedules for project gitlab-org/cli
# :-> ID Description Cron Ref Active
# :-> 1 Daily build 0 0 * * * main true
# :-> 2 Weekly deployment 0 0 * * 0 main true
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab schedule run
Run the specified scheduled pipeline.
```bash twoslash title="Terminal"
glab schedule run [flags]
```
## Examples
```bash twoslash title="Terminal"
# Run a scheduled pipeline with ID 1
glab schedule run 1
# :-> Started schedule with ID 1
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab schedule update
Update a pipeline schedule.
```bash twoslash title="Terminal"
glab schedule update [flags]
```
## Examples
```bash twoslash title="Terminal"
# Update a scheduled pipeline with ID 10
glab schedule update 10 --cron "0 * * * *" --description "Describe your pipeline here" --ref "main" --create-variable "foo:bar" --update-variable "baz:baz" --delete-variable "qux"
# :-> Updated schedule with ID 10
```
## Options
```bash twoslash title="Terminal"
--active Whether or not the schedule is active. (default to not change)
--create-variable strings Pass new variables to schedule in format :.
--cron string Cron interval pattern.
--cronTimeZone string Cron timezone.
--delete-variable strings Pass variables you want to delete from schedule in format .
--description string Description of the schedule.
--ref string Target branch or tag.
--update-variable strings Pass updated variables to schedule in format :.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab securefile create
Create a new project secure file.
```bash twoslash title="Terminal"
glab securefile create [flags]
```
## Aliases
```bash twoslash title="Terminal"
upload
```
## Examples
```bash twoslash title="Terminal"
# Create a project secure file with the given name using the contents of the given path.
glab securefile create "newfile.txt" "securefiles/localfile.txt"
# Create a project secure file using the 'upload' alias.
glab securefile upload "newfile.txt" "securefiles/localfile.txt"
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab securefile download
Download a secure file for a project.
```bash twoslash title="Terminal"
glab securefile download [flags]
```
## Examples
```bash twoslash title="Terminal"
# Download a project's secure file using the file's ID.
glab securefile download 1
# Download a project's secure file using the file's ID to a given path.
glab securefile download 1 --path="securefiles/file.txt"
# Download a project's secure file without verifying its checksum.
glab securefile download 1 --no-verify
# Download a project's secure file even if checksum verification fails.
glab securefile download 1 --force-download
# Download all (limit 100) of a project's secure files.
glab securefile download --all
# Download all (limit 100) of a project's secure files to a given directory.
glab securefile download --all --output-dir secure_files/
```
## Options
```bash twoslash title="Terminal"
--all Download all (limit 100) of a project's secure files. Files are downloaded with their original name and file extension.
--force-download Force download file(s) even if checksum verification fails. Warning: when enabled, this setting allows the download of files that are corrupt or tampered with.
--no-verify Do not verify the checksum of the downloaded file(s). Warning: when enabled, this setting allows the download of files that are corrupt or tampered with.
--output-dir string Output directory for files downloaded with --all. (default ".")
-p, --path string Path to download the secure file to, including filename and extension. (default "./downloaded.tmp")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab securefile get
Get details of a project secure file. (GitLab 18.0 and later)
```bash twoslash title="Terminal"
glab securefile get [flags]
```
## Aliases
```bash twoslash title="Terminal"
show
```
## Examples
```bash twoslash title="Terminal"
# Get details of a project's secure file using the file ID.
glab securefile get 1
# Get details of a project's secure file using the 'show' alias.
glab securefile show 1
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab securefile
Manage secure files for a project.
## Synopsis
Store up to 100 files for secure use in CI/CD pipelines. Secure files are
stored outside of your project's repository, not in version control.
It is safe to store sensitive information in these files. Both plain text
and binary files are supported, but they must be smaller than 5 MB.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/securefile/create)
* [`download`](/docs/securefile/download)
* [`get`](/docs/securefile/get)
* [`list`](/docs/securefile/list)
* [`remove`](/docs/securefile/remove)
# glab securefile list
List secure files for a project.
```bash twoslash title="Terminal"
glab securefile list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
List all secure files.
- glab securefile list
List all secure files with 'cmd' alias.
- glab securefile ls
List a specific page of secure files.
- glab securefile list --page 2
List a specific page of secure files, with a custom page size.
- glab securefile list --page 2 --per-page 10
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab securefile remove
Remove a secure file.
```bash twoslash title="Terminal"
glab securefile remove [flags]
```
## Aliases
```bash twoslash title="Terminal"
rm
delete
```
## Examples
```bash twoslash title="Terminal"
Remove a project's secure file using the file's ID.
- glab securefile remove 1
Skip the confirmation prompt and force delete.
- glab securefile remove 1 -y
Remove a project's secure file with 'rm' alias.
- glab securefile rm 1
Remove a project's secure file with 'delete' alias.
- glab securefile delete 1
```
## Options
```bash twoslash title="Terminal"
-y, --yes Skip the confirmation prompt.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab snippet create
Create a new snippet.
```bash twoslash title="Terminal"
glab snippet create [flags] -t [...]
glab snippet create [flags] -t -f # reads from stdin
```
## Aliases
```bash twoslash title="Terminal"
new
```
## Examples
```bash twoslash title="Terminal"
glab snippet create script.py --title "Title of the snippet"
echo "package main" | glab snippet new --title "Title of the snippet" --filename "main.go"
glab snippet create -t Title -f "different.go" -d Description main.go
glab snippet create -t Title -f "different.go" -d Description --filename different.go main.go
glab snippet create --personal --title "Personal snippet" script.py
```
## Options
```bash twoslash title="Terminal"
-d, --description string Description of the snippet.
-f, --filename string Filename of the snippet in GitLab.
-p, --personal Create a personal snippet.
-t, --title string (required) Title of the snippet.
-v, --visibility string Limit by visibility: 'public', 'internal', or 'private' (default "private")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab snippet
Create, view and manage snippets.
## Examples
```bash twoslash title="Terminal"
glab snippet create --title "Title of the snippet" --filename "main.go"
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/snippet/create)
# glab ssh-key add
Add an SSH key to your GitLab account.
## Synopsis
Creates a new SSH key owned by the currently authenticated user.
Requires the '--title' flag.
```bash twoslash title="Terminal"
glab ssh-key add [key-file] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Read ssh key from stdin and upload.
glab ssh-key add -t "my title"
# Read ssh key from specified key file, upload and set the ssh key type to "authentication".
glab ssh-key add ~/.ssh/id_ed25519.pub -t "my title" --usage-type "auth"
```
## Options
```bash twoslash title="Terminal"
-e, --expires-at string The expiration date of the SSH key. Uses ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
-t, --title string New SSH key's title.
-u, --usage-type string Usage scope for the key. Possible values: 'auth', 'signing' or 'auth_and_signing'. Default value: 'auth_and_signing'. (default "auth_and_signing")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ssh-key delete
Deletes a single SSH key specified by the ID.
```bash twoslash title="Terminal"
glab ssh-key delete [flags]
```
## Examples
```bash twoslash title="Terminal"
# Delete SSH key with ID as argument
glab ssh-key delete 7750633
# Interactive
glab ssh-key delete
# Interactive, with pagination
glab ssh-key delete -P 50 -p 2
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ssh-key get
Returns a single SSH key specified by the ID.
```bash twoslash title="Terminal"
glab ssh-key get [flags]
```
## Examples
```bash twoslash title="Terminal"
# Get ssh key with ID as argument
glab ssh-key get 7750633
# Interactive
glab ssh-key get
# Interactive, with pagination
glab ssh-key get -P 50 -p 2
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 20)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ssh-key
Manage SSH keys registered with your GitLab account.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`add`](/docs/ssh-key/add)
* [`delete`](/docs/ssh-key/delete)
* [`get`](/docs/ssh-key/get)
* [`list`](/docs/ssh-key/list)
# glab ssh-key list
Get a list of SSH keys for the currently authenticated user.
```bash twoslash title="Terminal"
glab ssh-key list [flags]
```
## Examples
```bash twoslash title="Terminal"
glab ssh-key list
```
## Options
```bash twoslash title="Terminal"
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
--show-id Shows IDs of SSH keys.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack amend
Save more changes to a stacked diff. (EXPERIMENTAL)
## Synopsis
Add more changes to an existing stacked diff.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack amend [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack amend modifiedfile
glab stack amend . -m "fixed a function"
glab stack amend newfile -d "forgot to add this"
```
## Options
```bash twoslash title="Terminal"
-d, --description string a description of the change
-m, --message string alias for the description flag
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack create
Create a new stacked diff. (EXPERIMENTAL)
## Synopsis
Create a new stacked diff. Adds metadata to your `./.git/stacked` directory.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack create [flags]
```
## Aliases
```bash twoslash title="Terminal"
new
```
## Examples
```bash twoslash title="Terminal"
glab stack create cool-new-feature
glab stack new cool-new-feature
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack first
Moves to the first diff in the stack. (EXPERIMENTAL)
## Synopsis
Moves to the first diff in the stack, and checks out that branch.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack first [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack first
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack
Create, manage, and work with stacked diffs. (EXPERIMENTAL)
## Synopsis
Stacked diffs are a way of creating small changes that build upon each other to ultimately deliver a feature. This kind of workflow can be used to accelerate development time by continuing to build upon your changes, while earlier changes in the stack are reviewed and updated based on feedback.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
## Aliases
```bash twoslash title="Terminal"
stacks
```
## Examples
```bash twoslash title="Terminal"
glab stack create cool-new-feature
glab stack sync
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`amend`](/docs/stack/amend)
* [`create`](/docs/stack/create)
* [`first`](/docs/stack/first)
* [`last`](/docs/stack/last)
* [`list`](/docs/stack/list)
* [`move`](/docs/stack/move)
* [`next`](/docs/stack/next)
* [`prev`](/docs/stack/prev)
* [`reorder`](/docs/stack/reorder)
* [`save`](/docs/stack/save)
* [`switch`](/docs/stack/switch)
* [`sync`](/docs/stack/sync)
# glab stack last
Moves to the last diff in the stack. (EXPERIMENTAL)
## Synopsis
Moves to the last diff in the stack, and checks out that branch.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack last [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack last
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack list
Lists all entries in the stack. (EXPERIMENTAL)
## Synopsis
Lists all entries in the stack. To select a different revision, use a command like 'stack move'.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab stack list
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack move
Moves to any selected entry in the stack. (EXPERIMENTAL)
## Synopsis
Shows a menu with a fuzzy finder to select a stack.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack move [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack move
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack next
Moves to the next diff in the stack. (EXPERIMENTAL)
## Synopsis
Moves to the next diff in the stack, and checks out that branch.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack next [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack next
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack prev
Moves to the previous diff in the stack. (EXPERIMENTAL)
## Synopsis
Moves to the previous diff in the stack, and checks out that branch.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack prev [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack prev
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack reorder
Reorder a stack of merge requests. (EXPERIMENTAL)
## Synopsis
Reorder how the current stack's merge requests are merged.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack reorder [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack reorder
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack save
Save your progress within a stacked diff. (EXPERIMENTAL)
## Synopsis
Save your current progress with a diff on the stack.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack save [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack save added_file
glab stack save . -m "added a function"
glab stack save -m "added a function"
```
## Options
```bash twoslash title="Terminal"
-d, --description string Description of the change.
-m, --message string Alias for the description flag.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack switch
Switch between stacks. (EXPERIMENTAL)
## Synopsis
Switch between stacks to work on another stack created with "glab stack create".
To see the list of all stacks, check the `.git/stacked/` directory.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack switch [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack switch
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab stack sync
Sync and submit progress on a stacked diff. (EXPERIMENTAL)
## Synopsis
Sync and submit progress on a stacked diff. This command runs these steps:
1. Optional. If working in a fork, select whether to push to the fork,
or the upstream repository.
2. Pushes any amended changes to their merge requests.
3. Rebases any changes that happened previously in the stack.
4. Removes any branches that were already merged, or with a closed merge request.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab stack sync [flags]
```
## Examples
```bash twoslash title="Terminal"
glab stack sync
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab token create
Creates user, group, or project access tokens.
## Synopsis
Creates a new access token for a user, group, or project. Defaults to a
project access token, unless user or group name is specified.
The expiration date of the token is calculated by adding the duration
(default: 30 days) to the current date. You can specify a different duration,
or an explicit end date.
The name of the token must be unique. The token is printed to stdout.
Administrators can create full-featured personal access tokens for themselves and for other users.
Non-administrators can create personal access tokens only for
themselves (@me). These tokens must use the scope 'k8s\_proxy'. For more
information, see the GitLab documentation for the
[User tokens API](https://docs.gitlab.com/api/user_tokens/#create-a-personal-access-token).
```bash twoslash title="Terminal"
glab token create [flags]
```
## Aliases
```bash twoslash title="Terminal"
create
new
```
## Examples
```bash twoslash title="Terminal"
# Create project access token for current project
glab token create --access-level developer --scope read_repository --scope read_registry my-project-token
# Create project access token for a specific project
glab token create --repo user/my-repo --access-level owner --scope api my-project-token --description "example description"
# Create a group access token
glab token create --group group/sub-group --access-level owner --scope api my-group-token
# Create a personal access token for current user
glab token create --user @me --scope k8s_proxy my-personal-token
# (administrator only) Create a personal access token for another user
glab token create --user johndoe --scope api johns-personal-token
```
## Options
```bash twoslash title="Terminal"
-A, --access-level AccessLevel Access level of the token: one of 'guest', 'reporter', 'developer', 'maintainer', 'owner'. (default no)
--description string Sets the token's description. (default "description")
-D, --duration duration Sets the token duration, in hours. Maximum of 8760. Examples: 24h, 168h, 504h. (default 720h0m0s)
-E, --expires-at DATE Sets the token's expiration date and time, in YYYY-MM-DD format. If not specified, --duration is used. (default 0001-01-01)
-g, --group string Create a group access token. Ignored if a user or repository argument is set.
-F, --output string Format output as 'text' for the token value, 'json' for the actual API token structure. (default "text")
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-S, --scope strings Scopes for the token. For a list, see https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes. (default [read_repository])
-U, --user string Create a personal access token. For the current user, use @me.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab token
Manage personal, project, or group tokens
## Aliases
```bash twoslash title="Terminal"
token
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/token/create)
* [`list`](/docs/token/list)
* [`revoke`](/docs/token/revoke)
* [`rotate`](/docs/token/rotate)
# glab token list
List user, group, or project access tokens.
## Synopsis
List all tokens of a user, group, or project.
The output contains the token's meta information, not the actual token value. The output format
can be "JSON" or "text". The access level property is printed in human-readable form in the text
output, but displays the integer value in JSON.
Administrators can list tokens of other users.
```bash twoslash title="Terminal"
glab token list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
# List the current project's access tokens
glab token list
glab token list --output json
# List the project access tokens of a specific project
glab token list --repo user/my-repo
# List group access tokens
glab token list --group group/sub-group
# List my personal access tokens
glab token list --user @me
# Administrators only: list the personal access tokens of another user
glab token list --user johndoe
```
## Options
```bash twoslash title="Terminal"
-a, --active List only the active tokens.
-g, --group string List group access tokens. Ignored if a user or repository argument is set.
-F, --output string Format output as: text, json. text provides a readable table, json outputs the tokens with metadata. (default "text")
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-U, --user string List personal access tokens. Use @me for the current user.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab token revoke
Revoke user, group or project access tokens
## Synopsis
Revoke an user, group or project access token. If multiple tokens with the same name exist, you can specify
the ID of the token.
The output format can be either "JSON" or "text". The JSON output will show the meta information of the
revoked token. The normal text output is a description of the revoked token name and ID.
Administrators can revoke personal access tokens belonging to other users.
```bash twoslash title="Terminal"
glab token revoke [flags]
```
## Aliases
```bash twoslash title="Terminal"
revoke
rm
```
## Examples
```bash twoslash title="Terminal"
# Revoke a project access token of current project
glab token revoke my-project-token
# Revoke a project access token of a specific project
glab token revoke --repo user/my-repo my-project-token
# Revoke a group access token
glab token revoke --group group/sub-group my-group-token
# Revoke my personal access token
glab token revoke --user @me my-personal-token
# Revoke a personal access token of another user (administrator only)
glab token revoke --user johndoe johns-personal-token
```
## Options
```bash twoslash title="Terminal"
-g, --group string Revoke group access token. Ignored if a user or repository argument is set.
-F, --output string Format output as: text, json. 'text' provides the name and ID of the revoked token; 'json' outputs the token with metadata. (default "text")
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-U, --user string Revoke personal access token. Use @me for the current user.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab token rotate
Rotate user, group, or project access tokens
## Synopsis
Rotate user, group, or project access token, then print the new token on stdout. If multiple tokens with
the same name exist, you can specify the ID of the token.
The expiration date of the token will be calculated by adding the duration (default 30 days) to the
current date. Alternatively you can specify a different duration or an explicit end date.
The output format can be either "JSON" or "text". The JSON output will show the meta information of the
rotated token.
Administrators can rotate personal access tokens belonging to other users.
```bash twoslash title="Terminal"
glab token rotate [flags]
```
## Aliases
```bash twoslash title="Terminal"
rotate
rot
```
## Examples
```bash twoslash title="Terminal"
# Rotate project access token of current project
glab token rotate my-project-token
# Rotate project access token of another project, set to expiration date
glab token rotate --repo user/repo my-project-token --expires-at 2024-08-08
# Rotate group access token
glab token rotate --group group/sub-group my-group-token
# Rotate personal access token and extend duration to 7 days
glab token rotate --user @me --duration $((7 * 24))h my-personal-token
# Rotate a personal access token of another user (administrator only)
glab token rotate --user johndoe johns-personal-token
```
## Options
```bash twoslash title="Terminal"
-D, --duration duration Sets the token duration, in hours. Maximum of 8760. Examples: 24h, 168h, 504h. (default 720h0m0s)
-E, --expires-at DATE Sets the token's expiration date and time, in YYYY-MM-DD format. If not specified, --duration is used. (default 0001-01-01)
-g, --group string Rotate group access token. Ignored if a user or repository argument is set.
-F, --output string Format output as: text, json. 'text' provides the new token value; 'json' outputs the token with metadata. (default "text")
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-U, --user string Rotate personal access token. Use @me for the current user.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab user events
View user events.
```bash twoslash title="Terminal"
glab user events [flags]
```
## Options
```bash twoslash title="Terminal"
-a, --all Get events from all projects.
-F, --output string Format output as: 'text', 'json'. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab user
Interact with a GitLab user account.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`events`](/docs/user/events)
# glab variable delete
Delete a variable for a project or group.
```bash twoslash title="Terminal"
glab variable delete [flags]
```
## Aliases
```bash twoslash title="Terminal"
remove
```
## Examples
```bash twoslash title="Terminal"
glab variable delete VAR_NAME
glab variable delete VAR_NAME --scope=prod
glab variable delete VARNAME -g mygroup
```
## Options
```bash twoslash title="Terminal"
-g, --group string Delete variable from a group.
-s, --scope string The 'environment_scope' of the variable. Options: all (*), or specific environments. (default "*")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab variable export
Export variables from a project or group.
```bash twoslash title="Terminal"
glab variable export [flags]
```
## Aliases
```bash twoslash title="Terminal"
ex
```
## Examples
```bash twoslash title="Terminal"
glab variable export
glab variable export --per-page 1000 --page 1
glab variable export --group gitlab-org
glab variable export --group gitlab-org --per-page 1000 --page 1
```
## Options
```bash twoslash title="Terminal"
-F, --format string Format of output: json, export, env. (default "json")
-g, --group string Select a group or subgroup. Ignored if a repository argument is set.
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 100)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-s, --scope string The environment_scope of the variables. Values: '*' (default), or specific environments. (default "*")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab variable get
Get a variable for a project or group.
```bash twoslash title="Terminal"
glab variable get [flags]
```
## Examples
```bash twoslash title="Terminal"
glab variable get VAR_KEY
glab variable get -g GROUP VAR_KEY
glab variable get -s SCOPE VAR_KEY
```
## Options
```bash twoslash title="Terminal"
-g, --group string Get variable for a group.
-F, --output string Format output as: text, json. (default "text")
-s, --scope string The environment_scope of the variable. Values: all (*), or specific environments. (default "*")
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab variable
Manage variables for a GitLab project or group.
## Aliases
```bash twoslash title="Terminal"
var
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`delete`](/docs/variable/delete)
* [`export`](/docs/variable/export)
* [`get`](/docs/variable/get)
* [`list`](/docs/variable/list)
* [`set`](/docs/variable/set)
* [`update`](/docs/variable/update)
# glab variable list
List variables for a project or group.
```bash twoslash title="Terminal"
glab variable list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Examples
```bash twoslash title="Terminal"
glab variable list
glab variable list -i
glab variable list --per-page 100 --page 1
glab variable list --group gitlab-org
glab variable list --group gitlab-org --per-page 100
```
## Options
```bash twoslash title="Terminal"
-g, --group string Select a group or subgroup. Ignored if a repository argument is set.
-i, --instance Display instance variables.
-F, --output string Format output as: text, json. (default "text")
-p, --page int Page number. (default 1)
-P, --per-page int Number of items to list per page. (default 20)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab variable set
Create a new variable for a project or group.
```bash twoslash title="Terminal"
glab variable set [flags]
```
## Aliases
```bash twoslash title="Terminal"
new
create
```
## Examples
```bash twoslash title="Terminal"
glab variable set WITH_ARG "some value"
glab variable set WITH_DESC "some value" --description "some description"
glab variable set FROM_FLAG -v "some value"
glab variable set FROM_ENV_WITH_ARG "${ENV_VAR}"
glab variable set FROM_ENV_WITH_FLAG -v"${ENV_VAR}"
glab variable set FROM_FILE < secret.txt
cat file.txt | glab variable set SERVER_TOKEN
cat token.txt | glab variable set GROUP_TOKEN -g mygroup --scope=prod
```
## Options
```bash twoslash title="Terminal"
-d, --description string Set description of a variable.
-g, --group string Set variable for a group.
--hidden Whether the variable is hidden.
-m, --masked Whether the variable is masked.
-p, --protected Whether the variable is protected.
-r, --raw Whether the variable is treated as a raw string.
-s, --scope string The environment_scope of the variable. Values: all (*), or specific environments. (default "*")
-t, --type string The type of a variable: env_var, file. (default "env_var")
-v, --value string The value of a variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab variable update
Update an existing variable for a project or group.
```bash twoslash title="Terminal"
glab variable update [flags]
```
## Examples
```bash twoslash title="Terminal"
glab variable update WITH_ARG "some value"
glab variable update FROM_FLAG -v "some value"
glab variable update FROM_ENV_WITH_ARG "${ENV_VAR}"
glab variable update FROM_ENV_WITH_FLAG -v"${ENV_VAR}"
glab variable update FROM_FILE < secret.txt
cat file.txt | glab variable update SERVER_TOKEN
cat token.txt | glab variable update GROUP_TOKEN -g mygroup --scope=prod
```
## Options
```bash twoslash title="Terminal"
-d, --description string Set description of a variable.
-g, --group string Set variable for a group.
-m, --masked Whether the variable is masked.
-p, --protected Whether the variable is protected.
-r, --raw Whether the variable is treated as a raw string.
-s, --scope string The environment_scope of the variable. Values: all (*), or specific environments. (default "*")
-t, --type string The type of a variable: env_var, file. (default "env_var")
-v, --value string The value of a variable.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab version
Show version information for glab.
```bash twoslash title="Terminal"
glab version [flags]
```
## Aliases
```bash twoslash title="Terminal"
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab ci cancel
Cancel a running pipeline or job.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Subcommands
* [`job`](/docs/ci/cancel/job)
* [`pipeline`](/docs/ci/cancel/pipeline)
# glab ci cancel job
Cancel CI/CD jobs.
```bash twoslash title="Terminal"
glab ci cancel job [flags]
```
## Examples
```bash twoslash title="Terminal"
glab ci cancel job 1504182795
glab ci cancel job 1504182795,1504182795
glab ci cancel job "1504182795 1504182795"
glab ci cancel job 1504182795,1504182795 --dry-run
```
## Options
```bash twoslash title="Terminal"
--dry-run Simulates process, but does not cancel anything.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci cancel pipeline
Cancel CI/CD pipelines.
```bash twoslash title="Terminal"
glab ci cancel pipeline [flags]
```
## Examples
```bash twoslash title="Terminal"
glab ci cancel pipeline 1504182795
glab ci cancel pipeline 1504182795,1504182796
glab ci cancel pipeline "1504182795 1504182796"
glab ci cancel pipeline 1504182795,1504182796 --dry-run
```
## Options
```bash twoslash title="Terminal"
--dry-run Simulates process, but does not cancel anything.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci config compile
View the fully expanded CI/CD configuration.
```bash twoslash title="Terminal"
glab ci config compile [flags]
```
## Examples
```bash twoslash title="Terminal"
# Uses .gitlab-ci.yml in the current directory
glab ci config compile
glab ci config compile .gitlab-ci.yml
glab ci config compile path/to/.gitlab-ci.yml
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab ci config
Work with GitLab CI/CD configuration.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Subcommands
* [`compile`](/docs/ci/config/compile)
# glab cluster agent bootstrap
Bootstrap a GitLab Agent for Kubernetes in a project.
## Synopsis
Bootstrap a GitLab Agent for Kubernetes (agentk) in a project.
The first argument must be the name of the agent.
It requires the `kubectl` and `flux` commands to be accessible via `$PATH`.
This command consists of multiple idempotent steps:
1. Register the agent with the project.
2. Configure the agent.
3. Configure an environment with dashboard for the agent.
4. Configure an environment with dashboard for FluxCD (if `--create-flux-environment`).
5. Create a token for the agent.
* If the agent has reached the maximum amount of tokens,
the one that has not been used the longest is revoked
and a new one is created.
* If the agent has not reached the maximum amount of tokens,
a new one is created.
6. Push the Kubernetes Secret that contains the token to the cluster.
7. Create Flux HelmRepository and HelmRelease resources.
8. Commit and Push the created Flux Helm resources to the manifest path.
9. Trigger Flux reconciliation of GitLab Agent HelmRelease (unless `--no-reconcile`).
```bash twoslash title="Terminal"
glab cluster agent bootstrap agent-name [flags]
```
## Aliases
```bash twoslash title="Terminal"
bs
```
## Examples
```bash twoslash title="Terminal"
# Bootstrap "my-agent" to the root of the Git project in CWD, and trigger reconciliation
glab cluster agent bootstrap my-agent
# Bootstrap "my-agent" to "manifests/" of the Git project in CWD, and trigger reconciliation
# Especially useful when "flux bootstrap gitlab --path manifests/" is used.
# Make sure that the "--path" from the "flux bootstrap gitlab" command matches
# the "--manifest-path" of the "glab cluster agent bootstrap" command.
glab cluster agent bootstrap my-agent --manifest-path manifests/
# Bootstrap "my-agent" to "manifests/" of the Git project in CWD, and do not manually trigger a reconilication
glab cluster agent bootstrap my-agent --manifest-path manifests/ --no-reconcile
# Bootstrap "my-agent" without configuring an environment
glab cluster agent bootstrap my-agent --create-environment=false
# Bootstrap "my-agent" and configure an environment with custom name and Kubernetes namespace
glab cluster agent bootstrap my-agent --environment-name production --environment-namespace default
# Bootstrap "my-agent" without configuring a FluxCD environment
glab cluster agent bootstrap my-agent --create-flux-environment=false
# Bootstrap "my-agent" and configure a FluxCD environment with custom name and Kubernetes namespace
glab cluster agent bootstrap my-agent --flux-environment-name production-flux --flux-environment-namespace flux-system
# Bootstrap "my-agent" and pass additional GitLab Helm Chart values from a local file
glab cluster agent bootstrap my-agent --helm-release-values values.yaml
# Bootstrap "my-agent" and pass additional GitLab Helm Chart values from a Kubernetes ConfigMap
glab cluster agent bootstrap my-agent --helm-release-values-from ConfigMap/agent-config
# Bootstrap "my-agent" and commit with custom user
glab cluster agent bootstrap my-agent --commit-author-name="Tanuki" --commit-author-email="tanuki@example.com"
# Bootstrap "my-agent" with authenticated API user
glab cluster agent bootstrap my-agent --use-api-commit-author
```
## Options
```bash twoslash title="Terminal"
--commit-author-email string The Git commit author email to use. Conflicts with the --use-api-commit-author flag. (default "noreply@glab.gitlab.com")
--commit-author-name string The Git commit author name to use. Conflicts with the --use-api-commit-author flag. (default "glab")
--create-environment Create an environment for the GitLab Agent. (default true)
--create-flux-environment Create an environment for FluxCD. Affects only the environment creation, not the use of Flux itself. Flux is always required for the bootstrap process. (default true)
--environment-flux-resource-path string Flux resource path of the environment for the GitLab Agent. (default "helm.toolkit.fluxcd.io/v2beta1/namespaces//helmreleases/")
--environment-name string Name of the environment for the GitLab Agent. (default "/")
--environment-namespace string Kubernetes namespace of the environment for the GitLab Agent. (default "")
--flux-environment-flux-resource-path string Flux resource path of the environment for FluxCD. (default "kustomize.toolkit.fluxcd.io/v1/namespaces/flux-system/kustomizations/flux-system")
--flux-environment-name string Name of the environment for FluxCD. (default "/")
--flux-environment-namespace string Kubernetes namespace of the environment for FluxCD. (default "")
--flux-source-name string Flux source name. (default "flux-system")
--flux-source-namespace string Flux source namespace. (default "flux-system")
--flux-source-type string Source type of the flux-system, like Git, OCI, or Helm. (default "git")
--gitlab-agent-token-secret-name string Name of the Secret where the token for the GitLab Agent is stored. The helm-release-target-namespace is implied for the namespace of the Secret. (default "gitlab-agent-token")
--helm-release-filepath string File path within the GitLab Agent project to commit the Flux HelmRelease to. (default "gitlab-agent-helm-release.yaml")
--helm-release-name string Name of the Flux HelmRelease manifest. (default "gitlab-agent")
--helm-release-namespace string Namespace of the Flux HelmRelease manifest. (default "flux-system")
--helm-release-target-namespace string Namespace of the GitLab Agent deployment. (default "gitlab-agent")
--helm-release-values strings Local path to values.yaml files
--helm-release-values-from strings Kubernetes object reference that contains the values.yaml data key in the format '/', where 'kind' must be one of: (Secret, ConfigMap)
--helm-repository-address string Address of the HelmRepository. (default "https://charts.gitlab.io")
--helm-repository-filepath string File path within the GitLab Agent project to commit the Flux HelmRepository to. (default "gitlab-helm-repository.yaml")
--helm-repository-name string Name of the Flux HelmRepository manifest. (default "gitlab")
--helm-repository-namespace string Namespace of the Flux HelmRepository manifest. (default "flux-system")
-b, --manifest-branch string Branch to commit the Flux Manifests to. (default to the project default branch)
-p, --manifest-path string Location of directory in Git repository for storing the GitLab Agent for Kubernetes Helm resources.
--no-reconcile Do not trigger Flux reconciliation for GitLab Agent for Kubernetes Flux resource.
--use-api-commit-author When creating Git commits use the user from the authenticated API request. Conflicts with the --commit-author-name and --commit-author-email flags.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster agent check_manifest_usage
Check agent configuration files for built-in GitOps manifests usage. (EXPERIMENTAL)
## Synopsis
Checks the descendants of a group for registered agents with configuration files that rely on the deprecated GitOps manifests settings.
The output can be piped to a tab-separated value (TSV) file.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
[https://docs.gitlab.com/policy/development\_stages\_support/](https://docs.gitlab.com/policy/development_stages_support/)
Use experimental features at your own risk.
```bash twoslash title="Terminal"
glab cluster agent check_manifest_usage [flags]
```
## Options
```bash twoslash title="Terminal"
-a, --agent-page int Page number for projects. (default 1)
-A, --agent-per-page int Number of projects to list per page. (default 30)
-g, --group string Group ID to check.
-p, --page int Page number for projects. (default 1)
-P, --per-page int Number of projects to list per page. (default 30)
-r, --recursive Recursively check subgroups.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster agent get-token
Create and return a k8s\_proxy-scoped personal access token to authenticate with a GitLab Agents for Kubernetes.
## Synopsis
Create and return a k8s\_proxy-scoped personal access token to authenticate with a GitLab Agents for Kubernetes.
This command creates a personal access token that is valid until the end of the current day.
You might receive an email from your GitLab instance that a new personal access token has been created.
```bash twoslash title="Terminal"
glab cluster agent get-token [flags]
```
## Options
```bash twoslash title="Terminal"
-a, --agent int The numerical Agent ID to connect to.
-c, --cache-mode string Mode to use for caching the token. Allowed values: keyring-filesystem-fallback, force-keyring, force-filesystem, no (default "force-keyring")
--check-revoked Check if a cached token is revoked. This requires an API call to GitLab which adds latency every time a cached token is accessed.
--token-expiry-duration duration Duration for how long the generated tokens should be valid for. Minimum is 1 day and the effective expiry is always at the end of the day, the time is ignored. (default 24h0m0s)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster agent
Manage GitLab Agents for Kubernetes.
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`bootstrap`](/docs/cluster/agent/bootstrap)
* [`check_manifest_usage`](/docs/cluster/agent/check_manifest_usage)
* [`get-token`](/docs/cluster/agent/get-token)
* [`list`](/docs/cluster/agent/list)
* [`token`](/docs/cluster/agent/token)
* [`update-kubeconfig`](/docs/cluster/agent/update-kubeconfig)
# glab cluster agent list
List GitLab Agents for Kubernetes in a project.
```bash twoslash title="Terminal"
glab cluster agent list [flags]
```
## Aliases
```bash twoslash title="Terminal"
ls
```
## Options
```bash twoslash title="Terminal"
-p, --page uint Page number. (default 1)
-P, --per-page uint Number of items to list per page. (default 30)
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster agent update-kubeconfig
Update selected kubeconfig.
## Synopsis
Update selected `kubeconfig` for use with a GitLab agent for Kubernetes.
```bash twoslash title="Terminal"
glab cluster agent update-kubeconfig [flags]
```
## Options
```bash twoslash title="Terminal"
-a, --agent int The numeric agent ID to create the kubeconfig entry for.
-c, --cache-mode string Mode to use for caching the token. Allowed values: keyring-filesystem-fallback, force-keyring, force-filesystem, no (default "force-keyring")
--check-revoked Check if a cached token is revoked. Requires an API call to GitLab, which adds latency every time a cached token is accessed.
--kubeconfig string Use a particular kubeconfig file.
--token-expiry-duration duration Duration for generated token's validity. Minimum is 1 day. Expires at end of day, and ignores time. (default 24h0m0s)
-u, --use-context Use as default context.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab issue board create
Create a project issue board.
```bash twoslash title="Terminal"
glab issue board create [flags]
```
## Aliases
```bash twoslash title="Terminal"
new
```
## Options
```bash twoslash title="Terminal"
-n, --name string The name of the new board
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo string Select another repository using the OWNER/REPO format or the project ID. Supports group namespaces.
```
# glab issue board
Work with GitLab issue boards in the given project.
## Options
```bash twoslash title="Terminal"
-R, --repo string Select another repository using the OWNER/REPO format or the project ID. Supports group namespaces.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`create`](/docs/issue/board/create)
* [`view`](/docs/issue/board/view)
# glab issue board view
View project issue board.
```bash twoslash title="Terminal"
glab issue board view [flags]
```
## Options
```bash twoslash title="Terminal"
-a, --assignee string Filter board issues by assignee username.
-l, --labels strings Filter board issues by labels, comma separated.
-m, --milestone string Filter board issues by milestone.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo string Select another repository using the OWNER/REPO format or the project ID. Supports group namespaces.
```
# glab opentofu state delete
Delete the given state or if the serial is provided only that version of the given state.
```bash twoslash title="Terminal"
glab opentofu state delete [] [flags]
```
## Options
```bash twoslash title="Terminal"
-f, --force Force delete the state without prompting.
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab opentofu state download
Download the given state and output as JSON to stdout.
```bash twoslash title="Terminal"
glab opentofu state download [] [flags]
```
## Examples
```bash twoslash title="Terminal"
# Download the latest serial of the state production
glab opentofu state download production
# Download the serial 42 of the state production
glab opentofu state download production 42
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab opentofu state
Work with the OpenTofu or Terraform states.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Subcommands
* [`delete`](/docs/opentofu/state/delete)
* [`download`](/docs/opentofu/state/download)
* [`list`](/docs/opentofu/state/list)
* [`lock`](/docs/opentofu/state/lock)
* [`unlock`](/docs/opentofu/state/unlock)
# glab opentofu state list
List states.
```bash twoslash title="Terminal"
glab opentofu state list [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab opentofu state lock
Lock the given state.
```bash twoslash title="Terminal"
glab opentofu state lock [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab opentofu state unlock
Unlock the given state.
```bash twoslash title="Terminal"
glab opentofu state unlock [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab repo members add
Add a member to the project.
## Synopsis
Add a member to the project with the specified role.
Roles:
* guest (10): Can view the project.
* reporter (20): Can view and create issues.
* developer (30): Can push to non-protected branches.
* maintainer (40): Can manage the project.
* owner (50): Full access to the project.
For custom roles, use `--role-id` with the ID of a custom role defined in the project or group.
Note: If the custom role does not exist an error is returned.
```bash twoslash title="Terminal"
glab repo members add [flags]
```
## Examples
```bash twoslash title="Terminal"
# Add a user as a developer
glab repo members add --username=john.doe --role=developer
# Add a user as a maintainer with expiration date
glab repo members add --username=jane.smith --role=maintainer --expires-at=2024-12-31
# Add a user by ID
glab repo members add --user-id=123 --role=reporter
# Add a user with a custom role
glab repo members add --username=john.doe --role-id=101
```
## Options
```bash twoslash title="Terminal"
-e, --expires-at string Expiration date for the membership (YYYY-MM-DD)
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-r, --role string Role for the user (guest, reporter, developer, maintainer, owner) (default "developer")
--role-id int ID of a custom role defined in the project or group
-u, --user-id int User ID instead of username
--username string Username instead of user-id
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo members
Manage project members.
## Synopsis
Add or remove members from a GitLab project.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`add`](/docs/repo/members/add)
* [`remove`](/docs/repo/members/remove)
# glab repo members remove
Remove a member from the project.
## Synopsis
Remove a member from the project.
```bash twoslash title="Terminal"
glab repo members remove [flags]
```
## Examples
```bash twoslash title="Terminal"
# Remove a user by username
glab repo members remove --username=john.doe
# Remove a user by ID
glab repo members remove --user-id=123
```
## Options
```bash twoslash title="Terminal"
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
-u, --user-id int User ID instead of username
--username string Username instead of user-id
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo publish catalog
\[EXPERIMENTAL] Publishes CI/CD components to the catalog.
## Synopsis
\[EXPERIMENTAL] Publishes CI/CD components in the project to the CI/CD catalog using the provided tag name.
Requires the feature flag `ci_release_cli_catalog_publish_option` to be enabled
for this project in your GitLab instance.
Requires the same user as the release author.
* It retrieves components from the current repository by searching for
`yml` files within the "templates" directory and its subdirectories.
* It fails if the feature flag `ci_release_cli_catalog_publish_option`
is not enabled for this project in your GitLab instance.
Components can be defined:
* In single files ending in `.yml` for each component, like `templates/secret-detection.yml`.
* In subdirectories containing `template.yml` files as entry points,
for components that bundle together multiple related files. For example,
`templates/secret-detection/template.yml`.
```bash twoslash title="Terminal"
glab repo publish catalog [flags]
```
## Examples
```bash twoslash title="Terminal"
- glab repo publish catalog v1.2.3
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
# glab repo publish
Publishes resources in the project.
## Synopsis
Publishes resources in the project.
Currently only supports publishing CI/CD components to the catalog.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
```
## Subcommands
* [`catalog`](/docs/repo/publish/catalog)
# glab cluster agent token
Manage GitLab Agents for Kubernetes tokens.
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Subcommands
* [`list`](/docs/cluster/agent/token/list)
* [`revoke`](/docs/cluster/agent/token/revoke)
# glab cluster agent token list
List tokens of an agent.
```bash twoslash title="Terminal"
glab cluster agent token list [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
# glab cluster agent token revoke
Revoke a token of an agent.
```bash twoslash title="Terminal"
glab cluster agent token revoke [flags]
```
## Options inherited from parent commands
```bash twoslash title="Terminal"
-h, --help Show help for this command.
-R, --repo OWNER/REPO Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```