glab(1)
π glab-token-create β NAME β¨
okay so bestie, this is glab-token-create from the glab(1) manual, and it Creates user, group, or project access tokens. that's literally the whole vibe. π
π¦ SYNOPSIS
glab token create [flags]
πΈ DESCRIPTION
so it makes a brand new access token for a user, a group, or a project. by default it's giving project access token energy β unless you specify a user or group name, then it switches up. slay. β¨
the expiration date? she's calculated by adding the duration (default: 30 days) to the current date, and expiration happens at midnight UTC on that calculated date. you can flex a different duration using days (d), weeks (w), or hours (h), or just hand over an explicit end date. your call, main character. π
the token name must be unique β no cap, no duplicates. the token itself gets printed to stdout. π₯
Administrators can create full-featured personal access tokens for themselves and for other users. π
Non-administrators can only create personal access tokens for themselves (@me). and those tokens have to use the scope 'k8s_proxy' β that's the rule, periodt. for the tea, see the GitLab documentation for the User tokens API β¨https://docs.gitlab.com/api/user_tokens/#create-a-personal-access-tokenβ©. π§
π OPTIONS
-A,--access-level=noβ the access level of the token: one of'guest','reporter','developer','maintainer','owner'. pick your fighter. π«Ά--description=""β sets the token's description. give it a lil personality. π-D,--duration=30dβ sets the token lifetime in days. accepts: days (30d), weeks (4w), or hours in multiples of 24 (24h,168h,720h). maximum:365d. the token expires at midnight UTC on the calculated date. β°-E,--expires-at=0001-01-01β sets the token's expiration date and time, inYYYY-MM-DDformat. if you don't specify it,--durationis used instead. ποΈ-g,--group=""β create a group access token. ignored if a user or repository argument is set. π--jq=""β filter JSON output with ajqexpression. for the data girlies. β-F,--output="text"β format output as'text'for the token value, or'json'for the actual API token structure. π-R,--repo=""β select another repository. you can use eitherOWNER/REPOorGROUP/NAMESPACE/REPO. the full URL or Git URL is also accepted. π-S,--scope=[read_repository]β scopes for the token. multiple scopes can be comma-separated or specified by repeating the flag. for a list, seehttps://docs.gitlab.com/security/tokens/access_token_scopes/. π«-U,--user=""β create a personal access token. for the current user, use@me. π
π OPTIONS INHERITED FROM PARENT COMMANDS
-h,--help[=false]β show help for this command. the lil helper. π
π₯ EXAMPLE
# Create project access token for current project (default 30 days)
glab token create --access-level developer --scope read_repository --scope read_registry my-project-token
# Create project access token with 7 day lifetime
glab token create --repo user/my-repo --access-level owner --scope api my-project-token --duration 7d
# Create a group access token expiring in 2 weeks
glab token create --group group/sub-group --access-level owner --scope api my-group-token --duration 2w
# Create a personal access token for current user with 90 day lifetime
glab token create --user @me --scope k8s_proxy my-personal-token --duration 90d
# (administrator only) Create a personal access token for another user
glab token create --user johndoe --scope api johns-personal-token --duration 180d
# Create a token with explicit expiration date
glab token create --access-level developer --scope api my-token --expires-at 2025-12-31
π¦ SEE ALSO
glab-token(1)β go read that one too, bestie, iykyk. π
ok that's the whole page!! it was Auto generated by spf13/cobra, version vibes from Nov 2026, and yes the manual is glab(1) β mwah, go create some tokens, you ate π
β¨π
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms