GCLI(1)
π GCLI π
okay bestie, welcome to the gcli(1) page β General Commands Manual, section 1, and it's giving iconic. pull up a chair, we're gonna talk about interacting with git forges.
β¨ NAME β¨
gcli β interact with git forges without using a web-browser π¦
πΈ SYNOPSIS πΈ
gcli [overrides] subcommand [forge-path] [options]
π DESCRIPTION π
so like, gcli is your bestie for talking to git(1) forges β GitHub, GitLab, Gitea, the whole squad β straight from the command line. no browser, no tabs, no doomscrolling. it makes stuff like managing issues and pull requests actually bearable. it's giving productivity era fr fr.
if you want a guided tutorial (and honestly you might, no judgement), either go to https://herrhotzenplotz.de/gcli/tutorial or read the offline version, gcli-tutorial(1). β¨
calls to gcli are usually one of two vibes:
- just the subcommand, to list the data you asked for, or
- the subcommand plus further subcommands or options, to actually do stuff.
some commands also take an item to operate on and accept multiple actions that all get performed on that item. like, a PR can be summarised, comments can be fetched, and a diff can be printed β all in one single command. one and done, main character energy π
the default behaviour of gcli can be overridden, because sometimes your use case is more nuanced than the defaults are ready for. manual overrides must be passed before subcommands and their options β order matters, bestie, don't come for me.
π SUBCOMMANDS π
most of these have their own dedicated man pages, because they're that girl.
issuesβ Issues in repositories. Seegcli-issues(1).pullsβ Pull Requests on repositories. Seegcli-pulls(1).labelsβ Manage labels for issues and pull/merge requests on repositories. Seegcli-labels(1).forksβ Forking repositories. Seegcli-forks(1).gistsβ GitHub Gists are like paste bins to where you can dump code snippets etc. Seegcli-gists(1).snippetsβ Support for GitLab snippets. Seegcli-snippets(1).reposβ Manage your own or other repositories. Seegcli-repos(1).commentβ Submit comments under issues and PRs. Seegcli-comment(1).statusβ Print a list of TODOs and/or notifications. Seegcli-status(1).pipelinesβ Inspect and manage GitLab Pipelines. Seegcli-pipelines(1).releasesβ Create and manage releases. Seegcli-releases(1).milestonesβ List and manage milestones. Seegcli-milestones(1).attachmentsβ Work with Bugzilla attachments. Seegcli-attachments(1).configβ Change user settings for the forge. Allows you to e.g. upload or delete ssh keys. Seegcli-config(1).apiβ Perform direct queries to the API and dump the JSON response to stdout. This is primarily intended to assist debugginggcli. Seegcli-api(1).versionβ Print version and exit. shortest queen of the list π
π OPTIONS π
the gcli overrides π«Ά
-a,--accountoverride-account β Manually override the default account. override-account must name a config section for an account in the global config file. See βFILESβ.-r,--remoteoverride-remote β Use override-remote as the remote when trying to infer repository data.-c,--coloursβ IgnoreNO_COLORas well as whether the output is not tty and print ANSI escape sequences for changing text formatting. Default is to output colours unless stdout is not a tty. Seeisatty(3). This is useful in combination with modern pagers such asless(1). π--no-spinnerβ Disable the animated spinner that is displayed whengcliis making network requests. This is useful inside dumb terminals or in editors such as acme. See alsoGCLI_NOSPINNERin βENVIRONMENTβ.--no-markdownβ Disable automatic markdown rendering. This is useful in case improperly formatted markdown is causing unreadable output or if messages aren't markdown at all. See alsoGCLI_RENDER_MARKDOWNin βENVIRONMENTβ.-q,--quietβ Suppresses most output ofgcli. shhh π€«-v,--verboseβ Be very verbose. This means that warnings about missing config files and request steps are printed to stderr.-t,--typeforge-type β Forcefully override the forge type. Set forge-type to βgithubβ, βgitlabβ βgiteaβ, or βbugzillaβ to connect to the corresponding services.
common options across almost all of the subcommands π₯
-s,--sortedβ Reverse the output such that most recent items appear at the bottom.-n,--countn β Fetch multiple items of data. The default is usually 30 items, but this parameter allows to fetch more than that. Setting n to-1will result in all pages being queried and all items being read.
β οΈ bestie be careful with that! if there is a lot of data to be fetched, it may result in rate limiting by the GitHub API β aside from the fact that it may also take a considerable amount of time to process. π
-a,--allβ Fetch all data, including closed issues and closed/merged PRs.-y,--yesβ Do not ask for confirmation when performing destructive operations or performing submissions. Always assume yes. π (yes, that's the whole point, proceed with caution)-o,--ownerowner β Operate on the given owner (organisation or user). Can only be used in combination with-r.-r,--reporepo β Operate on the given repo. Can only be used in combination with-o.-iid β Operate on the given numeric identifier.
other options specific to the context are documented in the respective man pages. go read them, they're cute too. π
π¦ Forge path shorthand π¦
Many subcommands accept an optional forge-path argument immediately following the subcommand name and before any flags. When present it overrides the default owner, repository and/or forge selection. The following forms are recognised:
gh:owner/repoβ Use GitHub and operate on the repository owner/repo.gl:owner/repoβ Use GitLab and operate on the repository owner/repo.cb:owner/repoβ Use Codeberg and operate on the repository owner/repo.account:owner/repoβ Use the named config account and operate on the repository owner/repo. account must be a section name in the user config file. Seegcli(5).accountβ Switch to the named config account while inferring the repository from the git remote as usual. This is useful when multiple accounts of the same forge type are configured. π
πΈ ENVIRONMENT πΈ
GIT_EDITOR,VISUAL,EDITORβ If thegcliconfig file does not name an editor,gcliwill search the named environment variables in this order and use the first that is set as the editor.XDG_CONFIG_HOMEβ There should be a subdirectory calledgcliin the directory this environment variable points to wheregcliwill go looking for its configuration file. See βFILESβ.GCLI_ACCOUNTβ Specifies an account name that should be used instead of an inferred one. The value ofGCLI_ACCOUNTcan be overridden again by using-aaccount-name. This is helpful in cases where you have multiple accounts of the same forge-type configured and you don't want to use the default.NO_COLORβ If set to β1β, βy orβ βyesβ (capitalisation ignored) this will suppress output of ANSI colour escape sequences. See βOPTIONSβ (--colours).GCLI_NOSPINNERβ If set to β1β, βy orβ βyesβ (capitalisation ignored) this will disable the animated spinner whengcliis making requests. See βOPTIONSβ (--disable-spinner)GCLI_RENDER_MARKDOWNβ If this is set to β0β, βn orβ βnoβ (capitalisation ignored) this will disable markdown rendering ingcli's output. See βOPTIONSβ (--no-markdown).
π FILES π
${XDG_CONFIG_HOME}/gcli/configβ The user configuration file forgcli. It contains account definitions as well as sensible default values. Seegcli(5)..gcliβ A repo-specific config file intended to be committed into the repo so that users don't have to manually specify all the options like--in,--from,--base-etc. when creating pull requests. Seegcli(5)for details about this file.
β¨ EXAMPLES β¨
List recently opened issues in the current upstream repository:
$ gcli issues
Merge upstream PR #22:
$ gcli pulls -p 22 merge
Get a summary and comments of upstream PR #22:
$ gcli pulls -p 22 summary comments
Establish a connection to GitHub and print the last 10 pull requests in contour-terminal/contour regardless of their state.
$ gcli -t github pulls -o contour-terminal -r contour -a -n10
This can be useful if neither your config file nor the directory you're working from contain the relevant forge and repository information.
List issues in herrhotzenplotz/gcli on GitLab:
$ gcli issues gl:herrhotzenplotz/gcli
List open PRs using a named config account:
$ gcli pulls myaccount:owner/repo
π«Ά SEE ALSO π«Ά
git(1), gcli-issues(1), gcli-pulls(1), gcli-labels(1), gcli-comment(1), gcli-review(1), gcli-forks(1), gcli-repos(1), gcli-gists(1), gcli-releases(1), gcli-comment(1) gcli-pipelines(1) gcli-config(1)
π HISTORY π
okay so the lore. the idea for gcli appeared during a long rant on IRC, where the issue with the official tool written by GitHub became clear to be the manual dialling and DNS resolving by the Go runtime β circumventing almost the entirety of the IP and DNS services of the operating system and leaking sensitive information when using Tor. π not the Tor leak bestie!!
implementation started in October 2021 with the goal of having a decent, sufficiently portable and secure version of a cli utility to interact with the GitHub world without using the inconvenient web interface.
later, support for GitLab and Gitea (Codeberg) were added. glow up β¨
π AUTHORS π
Nico Sonack aka. herrhotzenplotz <nsonack@herrhotzenplotz.de> and contributors.
π CAVEATS π
Not all features that are available from the web version are available in gcli. However, it is a non-goal of the project to provide all this functionality. periodt.
π BUGS π (yes bestie, we have those too)
okay so if you find a bug β and you will, because software is humbling like that β please report it via e-mail to https://lists.sr.ht/~herrhotzenplotz/gcli-discuss. she's on the mailing list and she's listening π
alternatively you can drop it on any of the forges linked at https://sr.ht/~herrhotzenplotz/gcli. but ngl, the preferred method is the mailing list, and it's also the quickest one. so likeβ¦ do that one bestie π«Ά
and yes, you can even file the issue with gcli itself, which is honestly iconic of her. main character energy, no cap:
$ gcli -a some-gitlab-account \
issues create \
-o herrhotzenplotz -r gcli \
"BUG : ..."
that's it, that's the whole vibe: pick your account with -a, tell issues to create, point -o at the owner and -r at the repo, then hand over your title. "BUG : ..." is literally the template they're showing you β go on, fill in the ... with the actual chaos you witnessed ππ
lowkey a reminder that a good bug report is a gift, not a chore. include what you did, what you expected, what happened instead. be nice about it. the maintainers are people and they're doing this out of love πΈ
and that's a wrap on GCLI(1), bestie π
this gorgeous thing is gcli 2.13.0, dated 05-Aug-2026 β so if you're reading this from the future, hi, hope the bugs got fixed π¦ go file one, or better yet, go run gcli and have the best time. mwah. πβ¨
π¦ 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