GCLI(1)

πŸ“¦
version 2.13.0 Β· 5 versions
, in nixpkgs unstable, ubuntu stonking

πŸ’– 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. See gcli-issues(1).
  • pulls β€” Pull Requests on repositories. See gcli-pulls(1).
  • labels β€” Manage labels for issues and pull/merge requests on repositories. See gcli-labels(1).
  • forks β€” Forking repositories. See gcli-forks(1).
  • gists β€” GitHub Gists are like paste bins to where you can dump code snippets etc. See gcli-gists(1).
  • snippets β€” Support for GitLab snippets. See gcli-snippets(1).
  • repos β€” Manage your own or other repositories. See gcli-repos(1).
  • comment β€” Submit comments under issues and PRs. See gcli-comment(1).
  • status β€” Print a list of TODOs and/or notifications. See gcli-status(1).
  • pipelines β€” Inspect and manage GitLab Pipelines. See gcli-pipelines(1).
  • releases β€” Create and manage releases. See gcli-releases(1).
  • milestones β€” List and manage milestones. See gcli-milestones(1).
  • attachments β€” Work with Bugzilla attachments. See gcli-attachments(1).
  • config β€” Change user settings for the forge. Allows you to e.g. upload or delete ssh keys. See gcli-config(1).
  • api β€” Perform direct queries to the API and dump the JSON response to stdout. This is primarily intended to assist debugging gcli. See gcli-api(1).
  • version β€” Print version and exit. shortest queen of the list πŸ’…

🌈 OPTIONS 🌈

the gcli overrides 🫢

  • -a, --account override-account β€” Manually override the default account. override-account must name a config section for an account in the global config file. See β€œFILES”.
  • -r, --remote override-remote β€” Use override-remote as the remote when trying to infer repository data.
  • -c, --colours β€” Ignore NO_COLOR as 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. See isatty(3). This is useful in combination with modern pagers such as less(1). 🌈
  • --no-spinner β€” Disable the animated spinner that is displayed when gcli is making network requests. This is useful inside dumb terminals or in editors such as acme. See also GCLI_NOSPINNER in β€œ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 also GCLI_RENDER_MARKDOWN in β€œENVIRONMENT”.
  • -q, --quiet β€” Suppresses most output of gcli. shhh 🀫
  • -v, --verbose β€” Be very verbose. This means that warnings about missing config files and request steps are printed to stderr.
  • -t, --type forge-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, --count n β€” Fetch multiple items of data. The default is usually 30 items, but this parameter allows to fetch more than that. Setting n to -1 will 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, --owner owner β€” Operate on the given owner (organisation or user). Can only be used in combination with -r.
  • -r, --repo repo β€” Operate on the given repo. Can only be used in combination with -o.
  • -i id β€” 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. See gcli(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 the gcli config file does not name an editor, gcli will 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 called gcli in the directory this environment variable points to where gcli will 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 of GCLI_ACCOUNT can be overridden again by using -a account-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 when gcli is 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 in gcli's output. See β€œOPTIONS” (--no-markdown).

πŸ’œ FILES πŸ’œ

  • ${XDG_CONFIG_HOME}/gcli/config β€” The user configuration file for gcli. It contains account definitions as well as sensible default values. See gcli(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. See gcli(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