GCLI(5)
π NAME π
gcli β bestie, we're talking about the gcli configuration file formats πΈ two of them, actually, and they're both kinda iconic.
β¨ DESCRIPTION β¨
Okay so listen, gcli rocks two different configuration files:
- the user configuration file β has your default values for
gcliπ«Ά - the repository-local configuration β has sensible defaults for one specific repo, and the whole point is you check it into that repo so everybody else gets the same defaults too π
π User Configuration File π
It lives at ${XDG_CONFIG_HOME}/gcli/config. On most systems that's literally the same as ${HOME}/.config/gcli/config.
Inside it you define your accounts, plus your sensible defaults for stuff like an editor.
The structure? Sections, babes. Every section has a name and is just a lil collection of key-value pairs, like:
section-name {
key1 = value 1
key2 = value 2
}
There must be a section named defaults, and it may hold these keys:
editorβ path to your default editor. (Might get overridden by theEDITORenvironment variable, no cap.)pagerβ name of the default pager used when interactively displaying large output. May be overridden by thePAGERenvironment variable. And if none of the above are specified,less(1)gets used as a sane default pager. slay.github-default-accountβ section name of a default GitHub account to use whenever the account is unspecified on the command line or in the environment. PeepGCLI_ACCOUNTingcli(1).gitlab-default-accountβ same vibe, but for GitLab: section name of a default GitLab account used whenever the account is unspecified on the command line or in the environment. SeeGCLI_ACCOUNTingcli(1).gitea-default-accountβ and again for Gitea: section name of a default Gitea account used whenever the account is unspecified on the command line or in the environment. SeeGCLI_ACCOUNTingcli(1).disable-spinnerβ disables the progress spinner in the ui.gcliuses this when making requests. Can also be set, and overridden, with theGCLI_NOSPINNERenvironment variable.render-markdownβ ifgcliis compiled with liblowdown support for rendering, setting this value to"no"disables markdown rendering and instead outputs the plain text.url-open-programβ name of a program in thePATHto open URLs with. Defaults toxdg-open, which uses your default web browser. Careful though π the program name may not contain any arguments. If you need to pass arguments to the program, you gotta write a wrapper script. periodt.restrict-pipelines-to-branchβ makes thegcli-pipelines(1)subcommand behave slightly differently when listing branches. Setting it to'yes'makesgclifigure out the currently checked out branch and query pipelines only for that branch. See alsogcli-pipelines(1).monitor-delayβ an integer refresh interval, in seconds, for the monitor action of thegcli-pipelines(1)subcommand. β±οΈ
Every other section defines accounts for forges. Each of these account definitions uses the account name as its section name, and may have one or more of these keys:
forge-typeβ the type of the forge. May be one of:githubgitlabgiteabugzilla
api-baseβ (optional) used to override the API base URL of the forge. Super useful for self-hosted instances. Depending on the"forge-type", the default values are:githubβhttps://api.github.comgitlabβhttps://gitlab.com/api/v4giteaβhttps://codeberg.org/api/v1bugzillaβhttps://bugs.freebsd.org/bugzilla
accountβ (optional) the username used to authenticate at the API.tokenβ (optional) a generated application token to use with this account. Thegclitutorial athttps://herrhotzenplotz.de/gcli/tutorialhas some documentation on how to generate these tokens. π
π¦ Repository Local Configuration File π¦
For repository-local configuration you can use a special configuration file. It contains definitions for gcli that are specific to the repository. iykyk.
This file lives in the root directory of the repository and should be named .gcli.
It's a list of key-value pairs. The allowed keys are:
pr.baseβ name of a branch that the changes should be merged into by default. Usually this is one ofmaster,mainortrunk.pr.upstreamβ name of the upstream repository to submit the pull request to by default. It's a pair in the format"owner/repository".pr.inhibit-delete-source-branchβ if defined and set to"yes", this prevents the pull request source branch from getting deleted when merging a pull request, by default. πforge-typeβ when you're hosting on multiple forges, this can be set to a type that'll be used as a default when other overrides are unspecified. For possible values, see the equivalent definition in the"User Configuration File"above.
π EXAMPLES π
π User Configuration File π
Here's an example of a user configuration file with both a GitHub and a GitLab account, because why choose:
defaults {
editor=/path/to/ganoooo/emacs
pager=less
github-default-account=herrhotzenplotz-gh
gitlab-default-account=herrhotzenplotz-gitlab
}
herrhotzenplotz-gh {
account=herrhotzenplotz
token=foobar
api-base=https://api.github.com
forge-type=github
}
herrhotzenplotz-gl {
account=herrhotzenplotz
token=<valid gitlab api token>
api-base=https://gitlab.com/api/v4
forge-type=gitlab
}
Notice how this lets you run gcli and force it to use a specific GitLab account? E.g.:
$ gcli -a herrhotzenplotz-gl issues -a
π§ Repository-Local Configuration file π§
The .gcli file for the gcli project itself looks like this:
pr.upstream=herrhotzenplotz/gcli
pr.base=trunk
pr.inhibit-delete-source-branch=yes
π SEE ALSO π
git(1), gcli(1), less(1), xdg-open(1)
π AUTHORS π
Nico Sonack aka. herrhotzenplotz <nsonack@herrhotzenplotz.de> and contributors. absolute legends, fr fr π
π BUGS π
Please report bugs via E-Mail to https://lists.sr.ht/~herrhotzenplotz/gcli-discuss.
Alternatively you can report them on any of the forges linked at https://sr.ht/~herrhotzenplotz/gcli. However β the preferred and quickest method is to use the mailing list. do with that what you will π
okay that's the whole lore bestie, stan this page π
this was gcli 2.13.0, dated 05-Aug-2026 β mwah, go configure something gorgeous πΈβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: gcli 2.13.0
- ubuntu stonking: gcli 2.13.0-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms