GCLI(1) | General Commands Manual | GCLI(1) |
gcli
— interact
with git forges without using a web-browser
gcli |
[overrides] subcommand [options] |
gcli
can be used to interact with
git(1) forges like GitHub, GitLab and Gitea from the
command line in order to make many tasks like managing issues and pull
requests easier.
Calls to gcli
usually consist of either
only the subcommand to list requested data or the subcommand plus further
subcommands or options to perform various tasks. Some commands may also take
an item to operate on and accept multiple actions that will be performed on
the item (e.g. PRs may be summarized, comments fetched and a diff printed
all in one command).
The default behaviour of gcli
can be
overriden to accomodate more nuanced use cases. Manual overrides must be
passed before subcommands and their options.
Most of these subcommands are documented in dedicated man pages.
issues
pulls
labels
forks
gists
snippets
repos
comment
status
pipelines
releases
milestones
config
api
version
gcli
overrides are:
-a
,
--account
override-account-r
,
--remote
override-remote-c
,
--colours
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).-q
,
--quiet
gcli
.-v
,
--verbose
-t
,
--type
forge-typeCommon options across almost all of the subcommands are:
-s
,
--sorted
-n
,
--count
n-a
,
--all
-y
,
--yes
-o
,
--owner
owner-r
.-r
,
--repo
repo-o
.-i
idOther options specific to the context are documented in the respective man pages.
EDITOR
gcli
may use this editor.XDG_CONFIG_DIR
gcli
will go
looking for its configuration file. See
FILES.GCLI_ACCOUNT
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
--in
, --from
,
--base
-etc.
when creating
pull requests. See gcli(5) for details about this
file.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.
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)
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 dialing 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.
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.
Nico Sonack aka. herrhotzenplotz <nsonack@herrhotzenplotz.de> and contributors.
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.
There is an undocumented ci
subcommand
available for GitHub CI services. The subcommand is undocumented as it is
not well tested and likely subject to changes.
Please report bugs via E-Mail to ~herrhotzenplotz/gcli-discuss@lists.sr.ht.
Alternatively you can report them on any of the forges linked at https://herrhotzenplotz.de/gcli. However, the preferred and quickest method is to use the mailing list.
You may also report an issue like so:
$ gcli -a some-gitlab-account \ issues create \ -o herrhotzenplotz -r gcli \ "BUG : ..."
2024-Feb-05 | gcli 2.2.0 |