### Configure, Build, and Install GCLI Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Standard commands to configure, build, and install GCLI from source. ```bash $ ./configure ... $ make ... $ make install ``` -------------------------------- ### Install GCLI Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Install GCLI to the default prefix after building. This makes the executables available system-wide. ```bash make install ``` -------------------------------- ### Install GCLI on NetBSD Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Use pkgin install to install GCLI on NetBSD. ```bash # pkgin install gcli ``` -------------------------------- ### Build GCLI from Source Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Steps to download, configure, build, and install GCLI from source, including installing build dependencies. ```sh # Install build dependencies (Debian example) apt install libcurl4-openssl-dev pkgconf build-essential flex bison # Download, configure, build and install curl -LO https://herrhotzenplotz.de/gcli/releases/gcli-2.11.0/gcli-2.11.0.tar.xz tar xf gcli-2.11.0.tar.xz cd gcli-2.11.0 mkdir build && cd build ../configure --prefix=/usr/local --release make make install # Verify installation gcli version # gcli 2.11.0 (amd64-unknown-freebsd14.2) ``` -------------------------------- ### Install GCLI on FreeBSD Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Use pkg install to install GCLI on FreeBSD. ```bash # pkg install gcli ``` -------------------------------- ### Install GCLI on Ubuntu/Debian Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Use apt install to install GCLI on Ubuntu, Debian, and similar distributions. ```bash # apt install gcli ``` -------------------------------- ### Verify gcli setup with GitHub repos Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/04-Account-Setup.md After configuring gcli, this command can be used to test the setup by listing your GitHub repositories. If it fails, re-check the token and account configuration. ```bash gcli -t github repos ``` -------------------------------- ### Build GCLI from Source Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/README.md Instructions for compiling GCLI from source. Ensure you have the necessary dependencies installed before proceeding. The installation destination can be customized using DESTDIR and --prefix. ```bash $ ./configure [--prefix=/usr/local] $ make # make [DESTDIR=/] install ``` -------------------------------- ### User Configuration File Example Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Defines default settings and accounts for different forges. Ensure sensitive tokens are kept secure. ```ini # ~/.config/gcli/config defaults { editor=/usr/bin/vim pager=less github-default-account=my-github gitlab-default-account=my-gitlab gitea-default-account=codeberg-org disable-spinner=no render-markdown=yes url-open-program=xdg-open } # GitHub account my-github { forge-type=github account=myusername token=ghp_XXXXXXXXXXXXXXXXXXXX api-base=https://api.github.com } # GitLab account my-gitlab { forge-type=gitlab account=myusername token=glpat-XXXXXXXXXXXXXXXXXXXX api-base=https://gitlab.com/api/v4 } # Codeberg (Gitea-compatible) codeberg-org { forge-type=gitea account=myusername token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX api-base=https://codeberg.org/api/v1 } # Self-hosted Bugzilla freebsd-bz { forge-type=bugzilla api-base=https://bugs.freebsd.org/bugzilla } # Self-hosted GitLab work-gitlab { forge-type=gitlab account=myusername token=glpat-XXXXXXXXXXXXXXXXXXXX api-base=https://gitlab.example.com/api/v4 } ``` -------------------------------- ### Install GCLI via Package Manager Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Commands to install GCLI on various Linux distributions and FreeBSD/NetBSD. ```sh # FreeBSD pkg install gcli ``` ```sh # NetBSD pkgin install gcli ``` ```sh # Debian / Ubuntu / Devuan apt install gcli ``` ```sh # Arch Linux (AUR) yay -S gcli ``` -------------------------------- ### C Header Output Example Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/pgen.org Example of the C header file generated by PGEN, containing function prototypes for parsing. ```c #ifndef #define #include void parse_thing(struct json_stream *, thing *); void parse_thinglist(struct json_stream *, thinglist *); #endif /* */ ``` -------------------------------- ### Repository-Local Configuration Example Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Sets per-repository defaults for pull request creation. Place this file at the root of your repository. ```ini # .gcli — placed at the root of a repository pr.upstream=myorg/myrepo pr.base=main pr.inhibit-delete-source-branch=yes forge-type=gitlab ``` -------------------------------- ### Install GCLI on ArchLinux using AUR Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Use yay -S to install GCLI on ArchLinux via the AUR. ```bash # yay -S gcli ``` -------------------------------- ### Indentation and Alignment Example in C Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Demonstrates the recommended indentation with tabs and alignment with spaces. TAB is denoted by '»' and whitespace by '.'. ```c void foo(struct foo const *thefoo) { » if (thefoo) » » printf("%s: %d\n" » » .......thefoo->wat, » » .......thefoo->count); } ``` -------------------------------- ### Run GCLI Test Suite Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Execute the test suite to verify the GCLI build. Requires ATF and Kyua to be installed. ```bash make check ``` -------------------------------- ### Install Build Dependencies on MSYS2 Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Install necessary development packages for building GCLI on MSYS2. ```bash $ pacman -S libcurl-devel pkgconf ``` -------------------------------- ### Install Build Dependencies on Debian Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Install necessary development packages for building GCLI on Debian-based systems. ```bash # apt install libcurl4-openssl-dev pkgconf build-essential ``` -------------------------------- ### Cross-compilation Example for aarch64-freebsd Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Demonstrates cross-compiling GCLI for a different architecture and operating system using environment variables for configuration. ```sh env \ CFLAGS="--target=aarch64-unknown-freebsd14.3 --sysroot=/store/sysroot/arm64" \ PKG_CONFIG_LIBDIR=/store/sysroot/arm64/usr/libdata/pkgconfig \ PKG_CONFIG_PATH=/store/sysroot/arm64/usr/local/libdata/pkgconfig \ PKG_CONFIG_SYSROOT_DIR=/store/sysroot/arm64 \ ../configure --release make ``` -------------------------------- ### Get Help for a Subcommand Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/03-Find-Documentation.md Use the `--help` flag with any subcommand to list its available options and flags. ```bash gcli issues --help ``` -------------------------------- ### Forge-Path Shorthand Examples Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Utilizes shorthand notation to specify the forge and repository, simplifying commands. ```sh # GitHub gcli issues gh:torvalds/linux ``` ```sh # GitLab gcli pulls gl:gitlab-org/gitlab ``` ```sh # Codeberg (default Gitea) gcli pipelines cb:forgejo/forgejo ``` ```sh # Named config account gcli pulls work-gitlab:myorg/myrepo ``` ```sh # Named account, repo inferred from git remote gcli issues work-gitlab: ``` -------------------------------- ### Verify GCLI Installation Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Check if the GCLI executable is in the system's PATH and display its version. ```bash $ which gcli /usr/local/bin/gcli $ $ gcli version gcli 1.1.0 (amd64-unknown-freebsd13.2) Using libcurl/8.1.2 OpenSSL/1.1.1t zlib/1.2.13 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.53.0 Using vendored pdjson library Report bugs at https://gitlab.com/herrhotzenplotz/gcli/. Copyright 2021, 2022, 2023 Nico Sonack and contributors. $ ``` -------------------------------- ### Annotated diff format example Source: https://context7.com/herrhotzenplotz/gcli/llms.txt An example of the annotated diff format used by the experimental review tool, showing context lines, added lines, and comment placement. ```diff @@ foo.c -10,5 +10,6 @@ some context unchanged line This is a comment on the next added line +added line > Multiline comment spanning the block below. > ``` -------------------------------- ### Cross-Compile gcli with Environment Variables Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Set environment variables like CC, CFLAGS, and PKG_CONFIG_* to configure the build for a target system. This example sets up a sysroot for FreeBSD aarch64. ```bash env \ >\tCFLAGS="--target=aarch64-unknown-freebsd14.3 --sysroot=/store/sysroot/arm64" \ >\tPKG_CONFIG_LIBDIR=/store/sysroot/arm64/usr/libdata/pkgconfig \ >\tPKG_CONFIG_PATH=/store/sysroot/arm64/usr/local/libdata/pkgconfig \ >\tPKG_CONFIG_SYSROOT_DIR=/store/sysroot/arm64 \ >\t../configure --release ``` -------------------------------- ### Enter interactive notification/TODO mode Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Starts the interactive mode for managing notifications and TODOs. You can specify a particular account using the -a flag. ```bash gcli status ``` ```bash gcli -a my-github status ``` -------------------------------- ### List Issues with Shorthand Repository Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/02-First-Steps.md Lists issues using a shorthand notation for the repository (e.g., gh:owner/repo). This example shows closed issues and limits the count to 10. ```bash $ gcli issues gh:curl/curl -a -n10 ``` -------------------------------- ### Configure Build with Custom Compiler Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Set the CC environment variable to specify a different compiler for the configure script. Example uses clang17. ```bash env CC=/usr/local/bin/clang17 ../configure ``` -------------------------------- ### Get Job Log Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Retrieves the log for a specific job. Specify owner, repo, and job ID. Use -o for owner and -r for repo. ```sh gcli pipelines -o herrhotzenplotz -r gcli -j 423141 log ``` -------------------------------- ### Provide Issue Description in Editor Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/05-Creating-an-issue.md When creating an issue, gcli opens an editor for the original post (body). Use Markdown syntax and prefix lines starting with '!' to discard them. ```markdown I tried building this code on my machine but unfortunately it errors out with the following message: ```console $ make love make: don't know how to make love. Stop make: stopped in /tmp/wat $ ``` What am I doing wrong? ! ISSUE TITLE : Bug: Doesn't work on my machine ! Enter issue description above. ! All lines starting with '!' will be discarded. ``` -------------------------------- ### Global Options for GCLI Commands Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Examples of using global flags to modify GCLI command behavior, such as forcing forge type, using specific accounts, or suppressing output. ```sh # Force a specific forge type gcli -t github issues ``` ```sh # Use a named config account gcli -a work-gitlab pulls ``` ```sh # Override both owner and repo gcli issues -o torvalds -r linux ``` ```sh # Suppress output gcli -q pulls -i 42 merge ``` ```sh # Verbose mode (prints HTTP requests to stderr) gcli -v issues ``` ```sh # Disable spinner (useful in dumb terminals / scripts) gcli --no-spinner releases ``` ```sh # Force ANSI colour output even when stdout is not a tty (useful with less -R) gcli -c issues | less -R ``` ```sh # Disable markdown rendering in output gcli --no-markdown pulls -i 5 op ``` -------------------------------- ### Configure Help Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Display the built-in help for the configure script. This lists all available configuration options. ```bash ../configure --help ``` -------------------------------- ### General gcli Usage and Options Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/03-Find-Documentation.md Run `gcli --help` to see a list of all available subcommands and general options for the gcli tool. ```bash gcli --help ``` -------------------------------- ### Create Repository Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new public repository with a name and description. Use -r for repository name and -d for description. ```sh gcli repos create -r my-new-project -d "A cool project" ``` -------------------------------- ### Create a private repository Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Use this command to create a new private repository with a specified name and description. ```bash gcli repos create -r secret-project -d "Private stuff" -p ``` -------------------------------- ### Configure Default Build Directory Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Create a build directory and configure it for a default build. This is the initial step before compiling. ```bash mkdir build cd build/ ../configure ``` -------------------------------- ### Initialize and Add Rows to Table in C Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Begin a new table with specified columns and add rows to it. The arguments for adding rows depend on the column definitions. ```C gcli_tbl table = gcli_tbl_begin(cols, ARRAY_SIZE(cols)); for (int i = 0; i < list.whatever_size; ++i) { gcli_tbl_add_row(table, ...); } ``` -------------------------------- ### Get Issue Comments Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/02-First-Steps.md Fetches only the comments for a specific issue. ```bash $ gcli -t github issues -o curl -r curl -i 11268 comments ``` -------------------------------- ### List Repositories Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists your own repositories or those of another user/organization. Use -o to specify the owner. Use -n -1 to fetch all repositories. ```sh gcli repos ``` ```sh gcli repos -o neutaaaaan ``` ```sh gcli repos -n -1 ``` -------------------------------- ### Run gcli Test Suite Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Execute the gcli test suite by navigating to the build directory and running 'make check'. ```bash make -C build check ``` -------------------------------- ### Create Draft Prerelease with Assets Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a draft prerelease with specified owner, repo, tag, name, commitish, and assets. Use --draft and --prerelease flags. ```sh gcli releases create \ --owner myorg \ --repo myrepo \ --tag v3.0.0-beta1 \ --name "3.0.0 Beta 1" \ --commitish main \ --draft \ --prerelease \ --asset dist/myapp-linux-amd64.tar.gz \ --asset dist/myapp-darwin-arm64.tar.gz \ --asset CHANGELOG.md ``` -------------------------------- ### Configure Release Build Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Configure a release build with optimizations enabled. Use the --release flag for production-ready builds. ```bash ../configure --release ``` -------------------------------- ### Create a gist from stdin or file Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new gist. Can pipe content from stdin or specify a file with an optional description. ```bash echo "hello world" | gcli gists create myscript.sh ``` ```bash gcli gists create --file ./script.sh --description "Useful shell script" script.sh ``` -------------------------------- ### Get Specific Issue Status Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/02-First-Steps.md Displays the detailed status of a particular issue, including its title, creation date, author, state, comment count, and labels. ```bash $ gcli -t github issues -o openssl -r openssl -i 10547 status ``` -------------------------------- ### Create Release Interactively Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new release interactively, opening an editor for release notes. Use -t to specify the tag name. ```sh gcli releases create -t v2.11.0 ``` -------------------------------- ### View Manual Pages Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/03-Find-Documentation.md For in-depth information, consult the manual pages for specific gcli commands. These provide comprehensive details beyond the command-line help. ```bash man gcli-issues ``` ```bash man gcli-pulls ``` -------------------------------- ### Deprecated gcli configure options Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/Changelog.md The configure options `--enable-liblowdown`, `--enable-libedit`, and `--enable-libreadline` are deprecated as they are no-ops. A warning will be printed if they are used, and they will be ignored. It is advised to remove these flags from build automation. ```bash ./configure --enable-liblowdown ./configure --enable-libedit ./configure --enable-libreadline ``` -------------------------------- ### Create gcli configuration directory Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/04-Account-Setup.md Before creating the configuration file, ensure the directory exists. This command creates the necessary directory structure in the user's home directory. ```bash mkdir -p ${HOME}/.config/gcli ``` -------------------------------- ### Configure gcli with account details Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/04-Account-Setup.md This configuration file sets default editor, the default GitHub account, and defines the account details including token, account name, and forge type. Replace placeholders with your actual token and account name. ```ini defaults { editor=vi github-default-account=my-github-account } my-github-account { token= account= forge-type=github } ``` -------------------------------- ### Configure GitLab Account with Token Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/08-Other-forges.md Update your gcli config to use a GitLab account. Replace `` and `` with your actual GitLab username and the generated access token. ```conf defaults { gitlab-default-account=gitlab-com ... } gitlab-com { account= token= forge-type=gitlab } ``` -------------------------------- ### Create Label Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new label with a name, description, and hex colour. Use --name, --description, and --colour flags. ```sh gcli labels create \ --name bug \ --description "Something is not working as expected" \ --colour FF0000 ``` -------------------------------- ### Initialize Dictionary in C Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Obtain a handle for a dictionary using gcli_dict_begin. Entries can be added using generic or specialized functions. ```C gcli_dict_begin ``` -------------------------------- ### Create Release Non-interactively Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a release from an existing tag using a template for notes. Use --yes to skip confirmation. Specify owner, repo, tag, commitish, template, and name. ```sh gcli releases create \ --tag v2.11.0 \ --name "Version 2.11.0" \ --commitish v2.11.0 \ --template relnotes.md \ --yes ``` -------------------------------- ### Configure Full Debug Build Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Configure a build with no optimizations and full debug information, suitable for development. Includes maintainer-specific options. ```bash ../configure --debug --enable-maintainer ``` -------------------------------- ### Show all issue details Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Retrieves all details for a specific issue, including summary and the original post. ```bash gcli issues -i 42 all ``` -------------------------------- ### Download and Extract GCLI Source Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/01-Installation.md Download the GCLI source tarball and extract it. This is part of the manual compilation process. ```bash $ mkdir ~/build $ cd ~/build $ curl -4LO https://herrhotzenplotz.de/gcli/releases/gcli-1.1.0/gcli-1.1.0.tar.xz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 342k 100 342k 0 0 2739k 0 --:--:-- --:--:-- --:--:-- 2736k $ ls gcli-1.1.0.tar.xz $ tar xf gcli-1.1.0.tar.xz $ cd gcli-1.1.0 ``` -------------------------------- ### Build GCLI Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Compile the GCLI project after configuration. This command invokes the build process. ```bash make ``` -------------------------------- ### Open Pipeline in Browser Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Opens a specific pipeline in the web browser. Use -p to specify the pipeline ID. ```sh gcli pipelines -p 420 open ``` -------------------------------- ### `gcli repos` — Manage Repositories Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Manage repositories. This includes listing repositories, creating repositories, and fetching all repositories. ```APIDOC ## `gcli repos` — Manage Repositories ### List your own repositories ```sh gcli repos ``` ### List repositories of another user/org ```sh gcli repos -o neutaaaaan ``` ### Fetch all repositories ```sh gcli repos -n -1 ``` ### Create a public repository ```sh gcli repos create -r my-new-project -d "A cool project" ``` ``` -------------------------------- ### List Labels Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists all labels in the current project. Use the forge-path shorthand for specific repos. Use -i to inspect a specific label. ```sh gcli labels ``` ```sh gcli labels gl:herrhotzenplotz/gcli ``` -------------------------------- ### List Pipelines Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists pipelines in the current project. Use -a to list all pipelines regardless of branch. Specify a repository using the forge-path shorthand (e.g., gl:owner/repo). ```sh gcli pipelines ``` ```sh gcli pipelines -a ``` ```sh gcli pipelines gl:herrhotzenplotz/gcli ``` -------------------------------- ### Run gcli Tests by Tag Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Execute tests tagged with 'github' using the specified build directory. ```bash tests/run.pl -b build github ``` -------------------------------- ### List Releases Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists releases in the current repository. Use -l for a long listing with release notes. Specify a repository using the forge-path shorthand (e.g., gh:owner/repo). ```sh gcli releases ``` ```sh gcli releases -l ``` ```sh gcli releases gh:herrhotzenplotz/gcli ``` -------------------------------- ### Create Milestone Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new milestone with a title and description. Use -t for title and -d for description. ```sh gcli milestones create -t "Version 3.0" -d "Goals for the 3.0 release" ``` -------------------------------- ### Clone Repository Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/07-Creating-a-pull-request.md Clone the target repository to your local machine. ```bash git clone git@github.com:contour-terminal/contour cd contour ``` -------------------------------- ### Create Fork Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/07-Creating-a-pull-request.md Create a fork of the repository under your GitHub username. ```bash gcli forks create --into herrhotzenplotz ``` -------------------------------- ### List GitHub Issues with gcli Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/05-Creating-an-issue.md Use this command to view a list of existing issues in a GitHub repository. Ensure you have configured gcli with your GitHub account. ```bash gcli -t github issues -o herrhotzenplotz -r ghcli-playground -a ``` -------------------------------- ### Bugzilla quick-search syntax Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Demonstrates Bugzilla-specific search syntax using the -t bugzilla flag. ```bash gcli -t bugzilla issues product:foo cc:RandomUser ``` ```bash gcli -a gentoo issues sparc ``` -------------------------------- ### List all issues Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists all issues, including closed ones, with the most recent at the bottom. Use -n to fetch a specific number of issues, or -n -1 to fetch all, which may trigger rate limiting. ```bash gcli issues -a -s ``` ```bash gcli issues -n 100 ``` ```bash gcli issues -n -1 ``` -------------------------------- ### List Forks Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists forks of the current repository or a specified repository using the forge-path shorthand. ```sh gcli forks ``` ```sh gcli forks gh:herrhotzenplotz/gcli ``` -------------------------------- ### List reviews and discussions for a pull request Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists all reviews for a pull request. For GitHub, it can also list threaded discussions. ```bash gcli pulls -i 42 reviews ``` ```bash gcli pulls -i 42 discussions # threaded view (GitHub only) ``` -------------------------------- ### List your gists Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists all gists associated with the current user. You can also list gists for another user using the -u flag. ```bash gcli gists ``` ```bash gcli gists -u neutaaaaan ``` -------------------------------- ### Create Feature Branch Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/07-Creating-a-pull-request.md Create a new branch for your feature development. ```bash git checkout -b my-amazing-feature ``` -------------------------------- ### Enable experimental features for gcli Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Enables experimental features for the gcli tool, either via environment variable or configuration file. ```bash export GCLI_ENABLE_EXPERIMENTAL=yes ``` ```bash # OR in ~/.config/gcli/config defaults section: # enable-experimental=yes ``` -------------------------------- ### Open an issue in the web browser Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Opens a specific issue in the default web browser. ```bash gcli issues -i 42 open ``` -------------------------------- ### Configure Bugzilla Account Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/08-Other-forges.md Add this configuration to `$HOME/.config/gcli/config` to connect gcli to a Bugzilla instance. Ensure the `forge-type` and `api-base` are set correctly for the target Bugzilla server. ```conf gentoo { forge-type=bugzilla api-base=https://bugs.gentoo.org/ } ``` -------------------------------- ### List Milestones Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists milestones in the current project. Use the forge-path shorthand for specific repos. Use -i to specify milestone ID for details. ```sh gcli milestones ``` ```sh gcli milestones gh:herrhotzenplotz/gcli ``` -------------------------------- ### Repository Management Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Commands for creating, deleting, and modifying repository settings. ```APIDOC ## `gcli repos create` ### Description Creates a new private repository. ### Command ```sh gcli repos create -r -d "" -p ``` ### Parameters - `-r` or `--repository`: Name of the repository to create. - `-d` or `--description`: Description for the repository. - `-p` or `--private`: Flag to make the repository private. ## `gcli repos delete` ### Description Deletes a repository without confirmation. ### Command ```sh gcli repos -o -r -y delete ``` ### Parameters - `-o` or `--organization`: The organization the repository belongs to. - `-r` or `--repository`: The name of the repository to delete. - `-y` or `--yes`: Flag to bypass confirmation. ## `gcli repos set-visibility` ### Description Changes the visibility of a repository. ### Command ```sh gcli repos -o -r set-visibility ``` ### Parameters - `-o` or `--organization`: The organization the repository belongs to. - `-r` or `--repository`: The name of the repository. - `private|public`: The desired visibility setting. ``` -------------------------------- ### Use forge-path shorthand for issues Source: https://context7.com/herrhotzenplotz/gcli/llms.txt A shorthand syntax 'forge:owner/repo' can be used to specify the repository for issues. ```bash gcli issues gl:herrhotzenplotz/gcli ``` -------------------------------- ### Long listing of gists Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Provides a more detailed listing of your gists. ```bash gcli gists -l ``` -------------------------------- ### Create a Comment on a GitHub Issue Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/06-Commenting.md This command opens your default editor to compose a comment for a GitHub issue. After saving and exiting the editor, you will be prompted to confirm the submission. ```bash $ gcli comment -o curl -r curl -i 11461 ``` -------------------------------- ### List Open Issues in Current Repository Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Default behavior of the `gcli issues` command when no action is specified, listing open issues in the repository detected from the git remote. ```sh # List open issues in the current repo (auto-detected from git remote) gcli issues ``` -------------------------------- ### Configure gcli for Gitea (Codeberg) Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/08-Other-forges.md Update your gcli configuration file with your Gitea username and the generated token. Ensure the `forge-type` is set to `gitea` and `api-base` points to the correct Gitea API endpoint. ```conf defaults { gitea-default-account=codeberg-org ... } codeberg-org { account= token= forge-type=gitea api-base=https://codeberg.org/api/v1 } ``` -------------------------------- ### Open Milestone in Browser Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Opens a specific milestone in the web browser. Use -i to specify the milestone ID. ```sh gcli milestones -i 42 open ``` -------------------------------- ### Use custom config sections as repository arguments in gcli Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/Changelog.md Use custom named account sections from the gcli config file as shorthand for specifying repositories. Note that for Bugzilla, the path format is 'product/component' instead of 'owner/repo'. ```bash gcli issues freebsd-bz:"Base System/tests" gcli pulls work-glb:acme-corp/frontend ``` -------------------------------- ### Search Bugzilla Issues Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/08-Other-forges.md Use this command to search for issues on a configured Bugzilla instance. Replace `gentoo` with your configured account name and `sparc` with your search query. ```bash $ gcli -a gentoo issues sparc ``` -------------------------------- ### Configure Sanitized Builds Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Enable sanitizers during the build process for enhanced debugging. Tested with LLVM Clang and GCC. ```bash ../configure --enable-sanitisers ``` -------------------------------- ### Configuration and SSH Keys Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Commands for managing Forge Account Settings, specifically SSH keys. ```APIDOC ## `gcli config ssh` ### Description Manages SSH public keys for Forge Account Settings. ### Commands - List registered SSH public keys: ```sh gcli config ssh ``` - Add a new SSH public key: ```sh gcli config ssh add -t "" -k <public_key_path> ``` - `-t` or `--title`: A title for the SSH key. - `-k` or `--key`: Path to the public SSH key file. - Delete an SSH key by ID: ```sh gcli config ssh delete -i <key_id> ``` - `-i` or `--id`: The ID of the SSH key to delete. ### Note Requires `read:public_key` and `admin:public_key` scopes on GitHub. ``` -------------------------------- ### Download Job Artifacts Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Downloads job artifacts. Use -j to specify the job ID. Artifacts are saved as artifacts.zip by default, or to a specified file with -o. ```sh gcli pipelines -j 423141 artifacts ``` ```sh gcli pipelines -j 423141 artifacts -o my-build.zip ``` -------------------------------- ### Open a pull request in the web browser Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Opens a specific pull request in the default web browser. ```bash gcli pulls -i 42 open ``` -------------------------------- ### Status and Notifications Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Commands for checking status, notifications, and TODOs. ```APIDOC ## `gcli status` ### Description Provides notifications and TODOs. Can be used interactively or to list notifications. ### Usage - Interactive mode (default): ```sh gcli status ``` - Use a specific account: ```sh gcli -a <account_name> status ``` - List notifications without entering interactive mode: ```sh gcli status -l ``` - Fetch a specific number of notifications: ```sh gcli status -n <count> ``` (Use `-n -1` to fetch all notifications) ``` -------------------------------- ### Inspect Milestone Details Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Shows details about a specific milestone. Use -i to specify the milestone ID. 'all' shows all info including issues, 'status' shows status, 'issues' lists attached issues. ```sh gcli milestones -i 42 status ``` ```sh gcli milestones -i 42 all ``` ```sh gcli milestones -i 42 issues ``` -------------------------------- ### View Issue Content and Comments Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/02-First-Steps.md Retrieves the original post and all comments for a specific issue, piping the output to the 'less' pager for easy viewing. This demonstrates executing multiple actions sequentially. ```bash $ gcli -t github issues -o openssl -r openssl -i 10547 op comments | less ``` -------------------------------- ### Search Issues by Author and Keyword Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/Changelog.md This command searches for issues authored by a specific user that also contain a given keyword. It's useful for filtering issues within a project. ```console $ gcli issues -A herrhotzenplotz Segfault ``` -------------------------------- ### Use shorthand repository arguments in gcli Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/Changelog.md Use shorthand for specifying repositories in gcli commands. Prefixes like 'gh:', 'gl:', and 'cb:' can be used for GitHub, GitLab, and Codeberg respectively. Named account sections from the gcli config file are also accepted. ```bash gcli issues gh:curl/curl gcli pulls gl:gitlab-org/gitlab gcli pipelines cb:forgejo/forgejo ``` -------------------------------- ### `gcli releases` — Manage Releases Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Manage releases on GitHub, GitLab, and Gitea. This includes listing, creating, and deleting releases. ```APIDOC ## `gcli releases` — Manage Releases The `releases` subcommand lists, creates, and deletes releases on GitHub, GitLab, and Gitea. ### List releases in the current repo ```sh gcli releases ``` ### Long listing with release notes ```sh gcli releases -l ``` ### List releases in a specific repo (forge-path shorthand) ```sh gcli releases gh:herrhotzenplotz/gcli ``` ### Create a release interactively (editor opens for notes) ```sh gcli releases create -t v2.11.0 ``` ### Create a named release from an existing tag, non-interactively from template ```sh gcli releases create \ --tag v2.11.0 \ --name "Version 2.11.0" \ --commitish v2.11.0 \ --template relnotes.md \ --yes ``` ### Create a draft prerelease with multiple assets ```sh gcli releases create \ --owner myorg \ --repo myrepo \ --tag v3.0.0-beta1 \ --name "3.0.0 Beta 1" \ --commitish main \ --draft \ --prerelease \ --asset dist/myapp-linux-amd64.tar.gz \ --asset dist/myapp-darwin-arm64.tar.gz \ --asset CHANGELOG.md ``` ### Delete a release without confirmation ```sh gcli releases delete \ --owner herrhotzenplotz \ --repo gcli-playground \ --yes 54656866 ``` ``` -------------------------------- ### Run Specific gcli Tests in Parallel Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Execute specific test cases (e.g., 3, 4, 5) in parallel using the specified build directory. ```bash tests/run.pl -b build -j 3 3 4 5 ``` -------------------------------- ### Add Entry to Dictionary in C Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Add an entry to the dictionary using a printf-like format and variadic arguments. This is the most generic method. ```C gcli_dict_add ``` -------------------------------- ### Search Pull Requests by Term and Label Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/Changelog.md Use this command to search for pull requests that match a specific search term and are associated with a given label. ```console $ gcli pulls -L bug segmentation fault ``` -------------------------------- ### Request a review for a pull request Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Requests a review from a specified user for a pull request. ```bash gcli pulls -i 42 request-review reviewer ``` -------------------------------- ### Create a GitHub Issue with gcli Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/05-Creating-an-issue.md Invoke gcli to create a new issue. The first argument after 'create' is the issue title. ```bash gcli -t github issues create -o herrhotzenplotz -r ghcli-playground \ "Bug: Doesn't work on my machine" ``` -------------------------------- ### Create a pull request with explicit options Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a pull request with explicit base and head branches, reviewers, a template file, and non-interactive confirmation. Automerge can be enabled with -a. ```bash gcli pulls create \ -t main \ -f myusername:feature-branch \ -R reviewer1 -R reviewer2 \ -T ./pr-template.md \ --yes \ "feat: implement new feature" ``` ```bash gcli pulls create -a "chore: bump dependencies" ``` -------------------------------- ### Create Pull Request Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/07-Creating-a-pull-request.md Initiate the creation of a pull request using gcli. You will be prompted for details like the source and target branches, repository owner, and the title of the pull request. ```bash $ gcli pulls create From (owner:branch) [herrhotzenplotz:my-amazing-feature]: Owner [contour-terminal]: Repository [contour]: To Branch [master]: Title: Add new amazing feature Enable automerge? [yN]: ``` -------------------------------- ### Stage Changes Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/07-Creating-a-pull-request.md Stage changes interactively before committing. ```bash git add -p ``` -------------------------------- ### Create a pull request interactively Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new pull request. Without arguments, it prompts interactively for details. With a title, it uses that title and opens an editor for the body. ```bash gcli pulls create ``` ```bash gcli pulls create "feat: add dark mode" ``` -------------------------------- ### Parse JSON Object into C Struct Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/pgen.org C code demonstrating how to use a generated PGEN parser to read JSON from stdin and populate a C struct. ```c #include <stdio.h> #include <stdlib.h> #include <gcli/json_util.h> #include <pdjson/pdjson.h> int main(int argc, char *argv[]) { struct json_stream input = {0}; thing the_thing = {0}; json_open_stream(&input, stdin); parse_thing(&input, &the_thing); json_close(&input); printf("id = %d\n", the_thing.id); printf("title = %s\n", the_thing.title); printf("users:\n"); for (size_t i = 0; i < the_thing.users_size; ++i) { printf(" - name = %s\n", the_thing.users[i].name); } return 0; } ``` -------------------------------- ### Create an issue interactively Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Creates a new issue. Without arguments, it prompts for title and body via an editor. With a title provided, it opens the editor for the body. ```bash gcli issues create ``` ```bash gcli issues create "Bug: segfault when listing forks" ``` -------------------------------- ### Show full details of a pull request Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Displays all details for a specific pull request, including status, original post, commits, and CI information. ```bash gcli pulls -i 11 all ``` -------------------------------- ### Inspect Pipeline Details Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Provides detailed information about a specific pipeline. Use -p to specify the pipeline ID. 'all' shows full summary, 'status' shows only status, 'jobs' lists jobs, 'children' lists child pipelines. ```sh gcli pipelines -p 420 all ``` ```sh gcli pipelines -p 420 status ``` ```sh gcli pipelines -p 3316 jobs ``` ```sh gcli pipelines -p 3316 children ``` -------------------------------- ### List open pull requests Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Lists open pull requests (PRs) in the current repository. Use -a to list all PRs (including closed and merged) and -s to sort them oldest-first. ```bash gcli pulls ``` ```bash gcli pulls -a -s ``` -------------------------------- ### Push Changes to Fork Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/07-Creating-a-pull-request.md Push your local branch with changes to your fork on GitHub. ```bash git push origin my-amazing-feature ``` -------------------------------- ### Change repository visibility Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Commands to change the visibility of a repository to either private or public. ```bash gcli repos -o myorg -r myrepo set-visibility private ``` ```bash gcli repos -o myorg -r myrepo set-visibility public ``` -------------------------------- ### Fetch GitHub Check Runs with cURL and jq Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/pgen.org This shell command fetches check runs for a specific GitHub commit using cURL and filters the output to display only the names of the check runs using jq. It's useful for inspecting CI/CD pipeline status. ```sh curl -4 -L "https://api.github.com/repos/quick-lint/quick-lint-js/commits/b4cc317fab45960888d708edb41c1ccbc4a4dd21/check-runs" \ | jq '.check_runs | .[].name' ``` -------------------------------- ### Run gcli Tests in Parallel Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/HACKING.md Execute all tests in parallel using the specified build directory and number of runners. ```bash tests/run.pl -b build -j 12 ``` -------------------------------- ### List GitHub Issues Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/02-First-Steps.md Lists the 30 most recent open issues for a specified GitHub repository. Use the -a flag to include closed issues, or -n followed by a number to limit the count. ```bash $ gcli -t github issues -o curl -r curl ``` ```bash $ gcli -t github issues -o curl -r curl -a ``` ```bash $ gcli -t github issues -o curl -r curl -n10 ``` -------------------------------- ### `gcli forks` — Manage Repository Forks Source: https://context7.com/herrhotzenplotz/gcli/llms.txt Manage repository forks. This includes listing forks, creating forks, and deleting forks. ```APIDOC ## `gcli forks` — Manage Repository Forks ### List forks of the current repo ```sh gcli forks ``` ### List forks of a specific repo ```sh gcli forks gh:herrhotzenplotz/gcli ``` ### Fork a repo into your personal account ```sh git clone git@github.com:vim/vim cd vim gcli forks create --into myusername # gcli offers to rename origin→upstream and set origin to your new fork ``` ### Set up .gcli for PR workflow after forking ```sh printf -- "pr.upstream=vim/vim\npr.base=master\n" >> .gcli ``` ### Fork into an organisation ```sh gcli forks create -o myorg -r myrepo --into my-organisation ``` ### Delete your fork without confirmation ```sh gcli forks -y delete ``` ``` -------------------------------- ### Use forge-path shorthand for pull requests Source: https://context7.com/herrhotzenplotz/gcli/llms.txt A shorthand syntax 'forge:owner/repo' can be used to specify the repository for pull requests. ```bash gcli pulls gh:herrhotzenplotz/gcli ``` -------------------------------- ### Search Issues by Author Source: https://github.com/herrhotzenplotz/gcli/blob/trunk/docs/website/tutorial/02-First-Steps.md Searches for issues in a repository, filtering by a specific author. The -a flag is used to include all issue states. ```bash $ gcli -t github issues -o openssl -r openssl -A blastwave -a ```