web: platform facades (metadata/discord/media_controls/spotify) + web-safe player; disable Spotify in web build

This commit is contained in:
IANewCool 2025-08-11 23:14:06 -04:00
parent 1ecd5f6ae6
commit ccd7c16899
330 changed files with 15290 additions and 141 deletions

BIN
gh.zip Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

BIN
gh_2.76.2_macOS_amd64/bin/gh Executable file

Binary file not shown.

View File

@ -0,0 +1,35 @@
.nh
.TH "GH-ALIAS-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-alias-delete - Delete set aliases
.SH SYNOPSIS
\fBgh alias delete {<alias> | --all} [flags]\fR
.SH OPTIONS
.TP
\fB--all\fR
Delete all aliases
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-alias(1)\fR

View File

@ -0,0 +1,71 @@
.nh
.TH "GH-ALIAS-IMPORT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-alias-import - Import aliases from a YAML file
.SH SYNOPSIS
\fBgh alias import [<filename> | -] [flags]\fR
.SH DESCRIPTION
Import aliases from the contents of a YAML file.
.PP
Aliases should be defined as a map in YAML, where the keys represent aliases and
the values represent the corresponding expansions. An example file should look like
the following:
.EX
bugs: issue list --label=bug
igrep: '!gh issue list --label="$1" | grep "$2"'
features: |-
issue list
--label=enhancement
.EE
.PP
Use \fB-\fR to read aliases (in YAML format) from standard input.
.PP
The output from \fBgh alias list\fR can be used to produce a YAML file
containing your aliases, which you can use to import them from one machine to
another. Run \fBgh help alias list\fR to learn more.
.SH OPTIONS
.TP
\fB--clobber\fR
Overwrite existing aliases of the same name
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Import aliases from a file
$ gh alias import aliases.yml
# Import aliases from standard input
$ gh alias import -
.EE
.SH SEE ALSO
\fBgh-alias(1)\fR

View File

@ -0,0 +1,37 @@
.nh
.TH "GH-ALIAS-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-alias-list - List your aliases
.SH SYNOPSIS
\fBgh alias list [flags]\fR
.SH DESCRIPTION
This command prints out all of the aliases gh is configured to use.
.SH ALIASES
gh alias ls
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-alias(1)\fR

View File

@ -0,0 +1,82 @@
.nh
.TH "GH-ALIAS-SET" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-alias-set - Create a shortcut for a gh command
.SH SYNOPSIS
\fBgh alias set <alias> <expansion> [flags]\fR
.SH DESCRIPTION
Define a word that will expand to a full gh command when invoked.
.PP
The expansion may specify additional arguments and flags. If the expansion includes
positional placeholders such as \fB$1\fR, extra arguments that follow the alias will be
inserted appropriately. Otherwise, extra arguments will be appended to the expanded
command.
.PP
Use \fB-\fR as expansion argument to read the expansion string from standard input. This
is useful to avoid quoting issues when defining expansions.
.PP
If the expansion starts with \fB!\fR or if \fB--shell\fR was given, the expansion is a shell
expression that will be evaluated through the \fBsh\fR interpreter when the alias is
invoked. This allows for chaining multiple commands via piping and redirection.
.SH OPTIONS
.TP
\fB--clobber\fR
Overwrite existing aliases of the same name
.TP
\fB-s\fR, \fB--shell\fR
Declare an alias to be passed through a shell interpreter
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Note: Command Prompt on Windows requires using double quotes for arguments
$ gh alias set pv 'pr view'
$ gh pv -w 123 #=> gh pr view -w 123
$ gh alias set bugs 'issue list --label=bugs'
$ gh bugs
$ gh alias set homework 'issue list --assignee @me'
$ gh homework
$ gh alias set 'issue mine' 'issue list --mention @me'
$ gh issue mine
$ gh alias set epicsBy 'issue list --author="$1" --label="epic"'
$ gh epicsBy vilmibm #=> gh issue list --author="vilmibm" --label="epic"
$ gh alias set --shell igrep 'gh issue list --label="$1" | grep "$2"'
$ gh igrep epic foo #=> gh issue list --label="epic" | grep "foo"
.EE
.SH SEE ALSO
\fBgh-alias(1)\fR

View File

@ -0,0 +1,54 @@
.nh
.TH "GH-ALIAS" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-alias - Create command shortcuts
.SH SYNOPSIS
\fBgh alias <command> [flags]\fR
.SH DESCRIPTION
Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
.PP
Run \fBgh help alias set\fR to learn more.
.SH AVAILABLE COMMANDS
.TP
\fBgh-alias-delete(1)\fR
Delete set aliases
.TP
\fBgh-alias-import(1)\fR
Import aliases from a YAML file
.TP
\fBgh-alias-list(1)\fR
List your aliases
.TP
\fBgh-alias-set(1)\fR
Create a shortcut for a gh command
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,241 @@
.nh
.TH "GH-API" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-api - Make an authenticated GitHub API request
.SH SYNOPSIS
\fBgh api <endpoint> [flags]\fR
.SH DESCRIPTION
Makes an authenticated HTTP request to the GitHub API and prints the response.
.PP
The endpoint argument should either be a path of a GitHub API v3 endpoint, or
\fBgraphql\fR to access the GitHub API v4.
.PP
Placeholder values \fB{owner}\fR, \fB{repo}\fR, and \fB{branch}\fR in the endpoint
argument will get replaced with values from the repository of the current
directory or the repository specified in the \fBGH_REPO\fR environment variable.
Note that in some shells, for example PowerShell, you may need to enclose
any value that contains \fB{...}\fR in quotes to prevent the shell from
applying special meaning to curly braces.
.PP
The \fB-p/--preview\fR flag enables opting into previews, which are feature-flagged,
experimental API endpoints or behaviors. The API expects opt-in via the \fBAccept\fR
header with format \fBapplication/vnd.github.<preview-name>-preview+json\fR and this
command facilitates that via \fB--preview <preview-name>\fR\&. To send a request for
the corsair and scarlet witch previews, you could use \fB-p corsair,scarlet-witch\fR
or \fB--preview corsair --preview scarlet-witch\fR\&.
.PP
The default HTTP request method is \fBGET\fR normally and \fBPOST\fR if any parameters
were added. Override the method with \fB--method\fR\&.
.PP
Pass one or more \fB-f/--raw-field\fR values in \fBkey=value\fR format to add static string
parameters to the request payload. To add non-string or placeholder-determined values, see
\fB-F/--field\fR below. Note that adding request parameters will automatically switch the
request method to \fBPOST\fR\&. To send the parameters as a \fBGET\fR query string instead, use
\fB--method GET\fR\&.
.PP
The \fB-F/--field\fR flag has magic type conversion based on the format of the value:
.IP \(bu 2
literal values \fBtrue\fR, \fBfalse\fR, \fBnull\fR, and integer numbers get converted to
appropriate JSON types;
.IP \(bu 2
placeholder values \fB{owner}\fR, \fB{repo}\fR, and \fB{branch}\fR get populated with values
from the repository of the current directory;
.IP \(bu 2
if the value starts with \fB@\fR, the rest of the value is interpreted as a
filename to read the value from. Pass \fB-\fR to read from standard input.
.PP
For GraphQL requests, all fields other than \fBquery\fR and \fBoperationName\fR are
interpreted as GraphQL variables.
.PP
To pass nested parameters in the request payload, use \fBkey[subkey]=value\fR syntax when
declaring fields. To pass nested values as arrays, declare multiple fields with the
syntax \fBkey[]=value1\fR, \fBkey[]=value2\fR\&. To pass an empty array, use \fBkey[]\fR without a
value.
.PP
To pass pre-constructed JSON or payloads in other formats, a request body may be read
from file specified by \fB--input\fR\&. Use \fB-\fR to read from standard input. When passing the
request body this way, any parameters specified via field flags are added to the query
string of the endpoint URL.
.PP
In \fB--paginate\fR mode, all pages of results will sequentially be requested until
there are no more pages of results. For GraphQL requests, this requires that the
original query accepts an \fB$endCursor: String\fR variable and that it fetches the
\fBpageInfo{ hasNextPage, endCursor }\fR set of fields from a collection. Each page is a separate
JSON array or object. Pass \fB--slurp\fR to wrap all pages of JSON arrays or objects
into an outer JSON array.
.SH OPTIONS
.TP
\fB--cache\fR \fB<duration>\fR
Cache the response, e.g. "3600s", "60m", "1h"
.TP
\fB-F\fR, \fB--field\fR \fB<key=value>\fR
Add a typed parameter in key=value format
.TP
\fB-H\fR, \fB--header\fR \fB<key:value>\fR
Add a HTTP request header in key:value format
.TP
\fB--hostname\fR \fB<string>\fR
The GitHub hostname for the request (default "github.com")
.TP
\fB-i\fR, \fB--include\fR
Include HTTP response status line and headers in the output
.TP
\fB--input\fR \fB<file>\fR
The file to use as body for the HTTP request (use "-" to read from standard input)
.TP
\fB-q\fR, \fB--jq\fR \fB<string>\fR
Query to select values from the response using jq syntax
.TP
\fB-X\fR, \fB--method\fR \fB<string> (default "GET")\fR
The HTTP method for the request
.TP
\fB--paginate\fR
Make additional HTTP requests to fetch all pages of results
.TP
\fB-p\fR, \fB--preview\fR \fB<strings>\fR
Opt into GitHub API previews (names should omit '-preview')
.TP
\fB-f\fR, \fB--raw-field\fR \fB<key=value>\fR
Add a string parameter in key=value format
.TP
\fB--silent\fR
Do not print the response body
.TP
\fB--slurp\fR
Use with "--paginate" to return an array of all pages of either JSON arrays or objects
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB--verbose\fR
Include full HTTP request and response in the output
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List releases in the current repository
$ gh api repos/{owner}/{repo}/releases
# Post an issue comment
$ gh api repos/{owner}/{repo}/issues/123/comments -f body='Hi from CLI'
# Post nested parameter read from a file
$ gh api gists -F 'files[myfile.txt][content]=@myfile.txt'
# Add parameters to a GET request
$ gh api -X GET search/issues -f q='repo:cli/cli is:open remote'
# Set a custom HTTP header
$ gh api -H 'Accept: application/vnd.github.v3.raw+json' ...
# Opt into GitHub API previews
$ gh api --preview baptiste,nebula ...
# Print only specific fields from the response
$ gh api repos/{owner}/{repo}/issues --jq '.[].title'
# Use a template for the output
$ gh api repos/{owner}/{repo}/issues --template \\
'{{range .}}{{.title}} ({{.labels | pluck "name" | join ", " | color "yellow"}}){{"\\n"}}{{end}}'
# Update allowed values of the "environment" custom property in a deeply nested array
$ gh api -X PATCH /orgs/{org}/properties/schema \\
-F 'properties[][property_name]=environment' \\
-F 'properties[][default_value]=production' \\
-F 'properties[][allowed_values][]=staging' \\
-F 'properties[][allowed_values][]=production'
# List releases with GraphQL
$ gh api graphql -F owner='{owner}' -F name='{repo}' -f query='
query($name: String!, $owner: String!) {
repository(owner: $owner, name: $name) {
releases(last: 3) {
nodes { tagName }
}
}
}
\&'
# List all repositories for a user
$ gh api graphql --paginate -f query='
query($endCursor: String) {
viewer {
repositories(first: 100, after: $endCursor) {
nodes { nameWithOwner }
pageInfo {
hasNextPage
endCursor
}
}
}
}
\&'
# Get the percentage of forks for the current user
$ gh api graphql --paginate --slurp -f query='
query($endCursor: String) {
viewer {
repositories(first: 100, after: $endCursor) {
nodes { isFork }
pageInfo {
hasNextPage
endCursor
}
}
}
}
\&' | jq 'def count(e): reduce e as $_ (0;.+1);
[.[].data.viewer.repositories.nodes[]] as $r | count(select($r[].isFork))/count($r[])'
.EE
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,105 @@
.nh
.TH "GH-ATTESTATION-DOWNLOAD" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-attestation-download - Download an artifact's attestations for offline use
.SH SYNOPSIS
\fBgh attestation download [<file-path> | oci://<image-uri>] [--owner | --repo] [flags]\fR
.SH DESCRIPTION
.SS NOTE: This feature is currently in public preview, and subject to change.
Download attestations associated with an artifact for offline use.
.PP
The command requires either:
* a file path to an artifact, or
* a container image URI (e.g. \fBoci://<image-uri>\fR)
* (note that if you provide an OCI URL, you must already be authenticated with
its container registry)
.PP
In addition, the command requires either:
* the \fB--repo\fR flag (e.g. --repo github/example).
* the \fB--owner\fR flag (e.g. --owner github), or
.PP
The \fB--repo\fR flag value must match the name of the GitHub repository
that the artifact is linked with.
.PP
The \fB--owner\fR flag value must match the name of the GitHub organization
that the artifact's linked repository belongs to.
.PP
Any associated bundle(s) will be written to a file in the
current directory named after the artifact's digest. For example, if the
digest is "sha256:1234", the file will be named "sha256:1234.jsonl".
.PP
Colons are special characters on Windows and cannot be used in
file names. To accommodate, a dash will be used to separate the algorithm
from the digest in the attestations file name. For example, if the digest
is "sha256:1234", the file will be named "sha256-1234.jsonl".
.SH OPTIONS
.TP
\fB-d\fR, \fB--digest-alg\fR \fB<string> (default "sha256")\fR
The algorithm used to compute a digest of the artifact: {sha256|sha512}
.TP
\fB--hostname\fR \fB<string>\fR
Configure host to use
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of attestations to fetch
.TP
\fB-o\fR, \fB--owner\fR \fB<string>\fR
GitHub organization to scope attestation lookup by
.TP
\fB--predicate-type\fR \fB<string>\fR
Filter attestations by provided predicate type
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Repository name in the format /
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Download attestations for a local artifact linked with an organization
$ gh attestation download example.bin -o github
# Download attestations for a local artifact linked with a repository
$ gh attestation download example.bin -R github/example
# Download attestations for an OCI image linked with an organization
$ gh attestation download oci://example.com/foo/bar:latest -o github
.EE
.SH SEE ALSO
\fBgh-attestation(1)\fR

View File

@ -0,0 +1,79 @@
.nh
.TH "GH-ATTESTATION-TRUSTED-ROOT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-attestation-trusted-root - Output trusted_root.jsonl contents, likely for offline verification
.SH SYNOPSIS
\fBgh attestation trusted-root [--tuf-url <url> --tuf-root <file-path>] [--verify-only] [flags]\fR
.SH DESCRIPTION
.SS NOTE: This feature is currently in public preview, and subject to change.
Output contents for a trusted_root.jsonl file, likely for offline verification.
.PP
When using \fBgh attestation verify\fR, if your machine is on the internet,
this will happen automatically. But to do offline verification, you need to
supply a trusted root file with \fB--custom-trusted-root\fR; this command
will help you fetch a \fBtrusted_root.jsonl\fR file for that purpose.
.PP
You can call this command without any flags to get a trusted root file covering
the Sigstore Public Good Instance as well as GitHub's Sigstore instance.
.PP
Otherwise you can use \fB--tuf-url\fR to specify the URL of a custom TUF
repository mirror, and \fB--tuf-root\fR should be the path to the
\fBroot.json\fR file that you securely obtained out-of-band.
.PP
If you just want to verify the integrity of your local TUF repository, and don't
want the contents of a trusted_root.jsonl file, use \fB--verify-only\fR\&.
.SH OPTIONS
.TP
\fB--hostname\fR \fB<string>\fR
Configure host to use
.TP
\fB--tuf-root\fR \fB<string>\fR
Path to the TUF root.json file on disk
.TP
\fB--tuf-url\fR \fB<string>\fR
URL to the TUF repository mirror
.TP
\fB--verify-only\fR
Don't output trusted_root.jsonl contents
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Get a trusted_root.jsonl for both Sigstore Public Good and GitHub's instance
$ gh attestation trusted-root
.EE
.SH SEE ALSO
\fBgh-attestation(1)\fR

View File

@ -0,0 +1,263 @@
.nh
.TH "GH-ATTESTATION-VERIFY" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-attestation-verify - Verify an artifact's integrity using attestations
.SH SYNOPSIS
\fBgh attestation verify [<file-path> | oci://<image-uri>] [--owner | --repo] [flags]\fR
.SH DESCRIPTION
Verify the integrity and provenance of an artifact using its associated
cryptographically signed attestations.
.SH Understanding Verification
An attestation is a claim (i.e. a provenance statement) made by an actor
(i.e. a GitHub Actions workflow) regarding a subject (i.e. an artifact).
.PP
In order to verify an attestation, you must provide an artifact and validate:
* the identity of the actor that produced the attestation
* the expected attestation predicate type (the nature of the claim)
.PP
By default, this command enforces the \fBhttps://slsa.dev/provenance/v1\fR
predicate type. To verify other attestation predicate types use the
\fB--predicate-type\fR flag.
.PP
The "actor identity" consists of:
* the repository or the repository owner the artifact is linked with
* the Actions workflow that produced the attestation (a.k.a the
signer workflow)
.PP
This identity is then validated against the attestation's certificate's
SourceRepository, SourceRepositoryOwner, and SubjectAlternativeName
(SAN) fields, among others.
.PP
It is up to you to decide how precisely you want to enforce this identity.
.PP
At a minimum, this command requires either:
* the \fB--owner\fR flag (e.g. --owner github), or
* the \fB--repo\fR flag (e.g. --repo github/example)
.PP
The more precisely you specify the identity, the more control you will
have over the security guarantees offered by the verification process.
.PP
Ideally, the path of the signer workflow is also validated using the
\fB--signer-workflow\fR or \fB--cert-identity\fR flags.
.PP
Please note: if your attestation was generated via a reusable workflow then
that reusable workflow is the signer whose identity needs to be validated.
In this situation, you must use either the \fB--signer-workflow\fR or
the \fB--signer-repo\fR flag.
.PP
For more options, see the other available flags.
.SH Loading Artifacts And Attestations
To specify the artifact, this command requires:
* a file path to an artifact, or
* a container image URI (e.g. \fBoci://<image-uri>\fR)
* (note that if you provide an OCI URL, you must already be authenticated with
its container registry)
.PP
By default, this command will attempt to fetch relevant attestations via the
GitHub API using the values provided to \fB--owner\fR or \fB--repo\fR\&.
.PP
To instead fetch attestations from your artifact's OCI registry, use the
\fB--bundle-from-oci\fR flag.
.PP
For offline verification using attestations stored on disk (c.f. the download command)
provide a path to the \fB--bundle\fR flag.
.SH Additional Policy Enforcement
Given the \fB--format=json\fR flag, upon successful verification this
command will output a JSON array containing one entry per verified attestation.
.PP
This output can then be used for additional policy enforcement, i.e. by being
piped into a policy engine.
.PP
Each object in the array contains two properties:
* an \fBattestation\fR object, which contains the bundle that was verified
* a \fBverificationResult\fR object, which is a parsed representation of the
contents of the bundle that was verified.
.PP
Within the \fBverificationResult\fR object you will find:
* \fBsignature.certificate\fR, which is a parsed representation of the X.509
certificate embedded in the attestation,
* \fBverifiedTimestamps\fR, an array of objects denoting when the attestation
was witnessed by a transparency log or a timestamp authority
* \fBstatement\fR, which contains the \fBsubject\fR array referencing artifacts,
the \fBpredicateType\fR field, and the \fBpredicate\fR object which contains
additional, often user-controllable, metadata
.PP
IMPORTANT: please note that only the \fBsignature.certificate\fR and the
\fBverifiedTimestamps\fR properties contain values that cannot be
manipulated by the workflow that originated the attestation.
.PP
When dealing with attestations created within GitHub Actions, the contents of
\fBsignature.certificate\fR are populated directly from the OpenID Connect
token that GitHub has generated. The contents of the \fBverifiedTimestamps\fR
array are populated from the signed timestamps originating from either a
transparency log or a timestamp authority and likewise cannot be forged by users.
.PP
When designing policy enforcement using this output, special care must be taken
when examining the contents of the \fBstatement.predicate\fR property:
should an attacker gain access to your workflow's execution context, they
could then falsify the contents of the \fBstatement.predicate\fR\&.
.PP
To mitigate this attack vector, consider using a "trusted builder": when generating
an artifact, have the build and attestation signing occur within a reusable workflow
whose execution cannot be influenced by input provided through the caller workflow.
.PP
See above re: \fB--signer-workflow\fR\&.
.SH OPTIONS
.TP
\fB-b\fR, \fB--bundle\fR \fB<string>\fR
Path to bundle on disk, either a single bundle in a JSON file or a JSON lines file with multiple bundles
.TP
\fB--bundle-from-oci\fR
When verifying an OCI image, fetch the attestation bundle from the OCI registry instead of from GitHub
.TP
\fB--cert-identity\fR \fB<string>\fR
Enforce that the certificate's SubjectAlternativeName matches the provided value exactly
.TP
\fB-i\fR, \fB--cert-identity-regex\fR \fB<string>\fR
Enforce that the certificate's SubjectAlternativeName matches the provided regex
.TP
\fB--cert-oidc-issuer\fR \fB<string> (default "https://token.actions.githubusercontent.com")\fR
Enforce that the issuer of the OIDC token matches the provided value
.TP
\fB--custom-trusted-root\fR \fB<string>\fR
Path to a trusted_root.jsonl file; likely for offline verification
.TP
\fB--deny-self-hosted-runners\fR
Fail verification for attestations generated on self-hosted runners
.TP
\fB-d\fR, \fB--digest-alg\fR \fB<string> (default "sha256")\fR
The algorithm used to compute a digest of the artifact: {sha256|sha512}
.TP
\fB--format\fR \fB<string>\fR
Output format: {json}
.TP
\fB--hostname\fR \fB<string>\fR
Configure host to use
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of attestations to fetch
.TP
\fB--no-public-good\fR
Do not verify attestations signed with Sigstore public good instance
.TP
\fB-o\fR, \fB--owner\fR \fB<string>\fR
GitHub organization to scope attestation lookup by
.TP
\fB--predicate-type\fR \fB<string> (default "https://slsa.dev/provenance/v1")\fR
Enforce that verified attestations' predicate type matches the provided value
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Repository name in the format /
.TP
\fB--signer-digest\fR \fB<string>\fR
Enforce that the digest associated with the signer workflow matches the provided value
.TP
\fB--signer-repo\fR \fB<string>\fR
Enforce that the workflow that signed the attestation's repository matches the provided value (/)
.TP
\fB--signer-workflow\fR \fB<string>\fR
Enforce that the workflow that signed the attestation matches the provided value ([host/]////)
.TP
\fB--source-digest\fR \fB<string>\fR
Enforce that the digest associated with the source repository matches the provided value
.TP
\fB--source-ref\fR \fB<string>\fR
Enforce that the git ref associated with the source repository matches the provided value
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Verify an artifact linked with a repository
$ gh attestation verify example.bin --repo github/example
# Verify an artifact linked with an organization
$ gh attestation verify example.bin --owner github
# Verify an artifact and output the full verification result
$ gh attestation verify example.bin --owner github --format json
# Verify an OCI image using attestations stored on disk
$ gh attestation verify oci://<image-uri> --owner github --bundle sha256:foo.jsonl
# Verify an artifact signed with a reusable workflow
$ gh attestation verify example.bin --owner github --signer-repo actions/example
.EE
.SH SEE ALSO
\fBgh-attestation(1)\fR

View File

@ -0,0 +1,51 @@
.nh
.TH "GH-ATTESTATION" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-attestation - Work with artifact attestations
.SH SYNOPSIS
\fBgh attestation [subcommand] [flags]\fR
.SH DESCRIPTION
Download and verify artifact attestations.
.SH AVAILABLE COMMANDS
.TP
\fBgh-attestation-download(1)\fR
Download an artifact's attestations for offline use
.TP
\fBgh-attestation-trusted-root(1)\fR
Output trusted_root.jsonl contents, likely for offline verification
.TP
\fBgh-attestation-verify(1)\fR
Verify an artifact's integrity using attestations
.SH ALIASES
gh at
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,118 @@
.nh
.TH "GH-AUTH-LOGIN" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-login - Log in to a GitHub account
.SH SYNOPSIS
\fBgh auth login [flags]\fR
.SH DESCRIPTION
Authenticate with a GitHub host.
.PP
The default hostname is \fBgithub.com\fR\&. This can be overridden using the \fB--hostname\fR
flag.
.PP
The default authentication mode is a web-based browser flow. After completion, an
authentication token will be stored securely in the system credential store.
If a credential store is not found or there is an issue using it gh will fallback
to writing the token to a plain text file. See \fBgh auth status\fR for its
stored location.
.PP
Alternatively, use \fB--with-token\fR to pass in a personal access token (classic) on standard input.
The minimum required scopes for the token are: \fBrepo\fR, \fBread:org\fR, and \fBgist\fR\&.
Take care when passing a fine-grained personal access token to \fB--with-token\fR
as the inherent scoping to certain resources may cause confusing behaviour when interacting with other
resources. Favour setting \fBGH_TOKEN\fR for fine-grained personal access token usage.
.PP
Alternatively, gh will use the authentication token found in environment variables.
This method is most suitable for "headless" use of gh such as in automation. See
\fBgh help environment\fR for more info.
.PP
To use gh in GitHub Actions, add \fBGH_TOKEN: ${{ github.token }}\fR to \fBenv\fR\&.
.PP
The git protocol to use for git operations on this host can be set with \fB--git-protocol\fR,
or during the interactive prompting. Although login is for a single account on a host, setting
the git protocol will take effect for all users on the host.
.PP
Specifying \fBssh\fR for the git protocol will detect existing SSH keys to upload,
prompting to create and upload a new key if one is not found. This can be skipped with
\fB--skip-ssh-key\fR flag.
.PP
For more information on OAuth scopes, see
\[la]https://docs.github.com/en/developers/apps/building\-oauth\-apps/scopes\-for\-oauth\-apps/\[ra]\&.
.SH OPTIONS
.TP
\fB-p\fR, \fB--git-protocol\fR \fB<string>\fR
The protocol to use for git operations on this host: {ssh|https}
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The hostname of the GitHub instance to authenticate with
.TP
\fB--insecure-storage\fR
Save authentication credentials in plain text instead of credential store
.TP
\fB-s\fR, \fB--scopes\fR \fB<strings>\fR
Additional authentication scopes to request
.TP
\fB--skip-ssh-key\fR
Skip generate/upload SSH key prompt
.TP
\fB-w\fR, \fB--web\fR
Open a browser to authenticate
.TP
\fB--with-token\fR
Read token from standard input
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Start interactive setup
$ gh auth login
# Authenticate against github.com by reading the token from a file
$ gh auth login --with-token < mytoken.txt
# Authenticate with specific host
$ gh auth login --hostname enterprise.internal
.EE
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,83 @@
.nh
.TH "GH-AUTH-LOGOUT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-logout - Log out of a GitHub account
.SH SYNOPSIS
\fBgh auth logout [flags]\fR
.SH DESCRIPTION
Remove authentication for a GitHub account.
.PP
This command removes the stored authentication configuration
for an account. The authentication configuration is only
removed locally.
.PP
This command does not revoke authentication tokens.
.PP
To revoke all authentication tokens generated by the GitHub CLI:
.IP " 1." 5
Visit
\[la]https://github.com/settings/applications\[ra]
.IP " 2." 5
Select the "GitHub CLI" application
.IP " 3." 5
Select "Revoke Access"
.IP " 4." 5
Select "I understand, revoke access"
.PP
Note: this procedure will revoke all authentication tokens ever
generated by the GitHub CLI across all your devices.
.PP
For more information about revoking OAuth application tokens, see:
\[la]https://docs.github.com/en/apps/oauth\-apps/using\-oauth\-apps/reviewing\-your\-authorized\-oauth\-apps\[ra]
.SH OPTIONS
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The hostname of the GitHub instance to log out of
.TP
\fB-u\fR, \fB--user\fR \fB<string>\fR
The account to log out of
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Select what host and account to log out of via a prompt
$ gh auth logout
# Log out of a specific host and specific account
$ gh auth logout --hostname enterprise.internal --user monalisa
.EE
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,96 @@
.nh
.TH "GH-AUTH-REFRESH" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-refresh - Refresh stored authentication credentials
.SH SYNOPSIS
\fBgh auth refresh [flags]\fR
.SH DESCRIPTION
Expand or fix the permission scopes for stored credentials for active account.
.PP
The \fB--scopes\fR flag accepts a comma separated list of scopes you want
your gh credentials to have. If no scopes are provided, the command
maintains previously added scopes.
.PP
The \fB--remove-scopes\fR flag accepts a comma separated list of scopes you
want to remove from your gh credentials. Scope removal is idempotent.
The minimum set of scopes (\fBrepo\fR, \fBread:org\fR, and \fBgist\fR) cannot be removed.
.PP
The \fB--reset-scopes\fR flag resets the scopes for your gh credentials to
the default set of scopes for your auth flow.
.PP
If you have multiple accounts in \fBgh auth status\fR and want to refresh the credentials for an
inactive account, you will have to use \fBgh auth switch\fR to that account first before using
this command, and then switch back when you are done.
.PP
For more information on OAuth scopes, see
\[la]https://docs.github.com/en/developers/apps/building\-oauth\-apps/scopes\-for\-oauth\-apps/\[ra]\&.
.SH OPTIONS
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The GitHub host to use for authentication
.TP
\fB--insecure-storage\fR
Save authentication credentials in plain text instead of credential store
.TP
\fB-r\fR, \fB--remove-scopes\fR \fB<strings>\fR
Authentication scopes to remove from gh
.TP
\fB--reset-scopes\fR
Reset authentication scopes to the default minimum set of scopes
.TP
\fB-s\fR, \fB--scopes\fR \fB<strings>\fR
Additional authentication scopes for gh to have
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Open a browser to add write:org and read:public_key scopes
$ gh auth refresh --scopes write:org,read:public_key
# Open a browser to ensure your authentication credentials have the correct minimum scopes
$ gh auth refresh
# Open a browser to idempotently remove the delete_repo scope
$ gh auth refresh --remove-scopes delete_repo
# Open a browser to re-authenticate with the default minimum scopes
$ gh auth refresh --reset-scopes
.EE
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,65 @@
.nh
.TH "GH-AUTH-SETUP-GIT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-setup-git - Setup git with GitHub CLI
.SH SYNOPSIS
\fBgh auth setup-git [flags]\fR
.SH DESCRIPTION
This command configures \fBgit\fR to use GitHub CLI as a credential helper.
For more information on git credential helpers please reference:
\[la]https://git\-scm.com/docs/gitcredentials\[ra]\&.
.PP
By default, GitHub CLI will be set as the credential helper for all authenticated hosts.
If there is no authenticated hosts the command fails with an error.
.PP
Alternatively, use the \fB--hostname\fR flag to specify a single host to be configured.
If the host is not authenticated with, the command fails with an error.
.SH OPTIONS
.TP
\fB-f\fR, \fB--force\fR \fB<--hostname>\fR
Force setup even if the host is not known. Must be used in conjunction with --hostname
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The hostname to configure git for
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Configure git to use GitHub CLI as the credential helper for all authenticated hosts
$ gh auth setup-git
# Configure git to use GitHub CLI as the credential helper for enterprise.internal host
$ gh auth setup-git --hostname enterprise.internal
.EE
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,56 @@
.nh
.TH "GH-AUTH-STATUS" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-status - Display active account and authentication state on each known GitHub host
.SH SYNOPSIS
\fBgh auth status [flags]\fR
.SH DESCRIPTION
Display active account and authentication state on each known GitHub host.
.PP
For each host, the authentication state of each known account is tested and any issues are included in the output.
Each host section will indicate the active account, which will be used when targeting that host.
If an account on any host (or only the one given via \fB--hostname\fR) has authentication issues,
the command will exit with 1 and output to stderr.
.PP
To change the active account for a host, see \fBgh auth switch\fR\&.
.SH OPTIONS
.TP
\fB-a\fR, \fB--active\fR
Display the active account only
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
Check only a specific hostname's auth status
.TP
\fB-t\fR, \fB--show-token\fR
Display the auth token
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,66 @@
.nh
.TH "GH-AUTH-SWITCH" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-switch - Switch active GitHub account
.SH SYNOPSIS
\fBgh auth switch [flags]\fR
.SH DESCRIPTION
Switch the active account for a GitHub host.
.PP
This command changes the authentication configuration that will
be used when running commands targeting the specified GitHub host.
.PP
If the specified host has two accounts, the active account will be switched
automatically. If there are more than two accounts, disambiguation will be
required either through the \fB--user\fR flag or an interactive prompt.
.PP
For a list of authenticated accounts you can run \fBgh auth status\fR\&.
.SH OPTIONS
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The hostname of the GitHub instance to switch account for
.TP
\fB-u\fR, \fB--user\fR \fB<string>\fR
The account to switch to
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Select what host and account to switch to via a prompt
$ gh auth switch
# Switch the active account on a specific host to a specific user
$ gh auth switch --hostname enterprise.internal --user monalisa
.EE
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,49 @@
.nh
.TH "GH-AUTH-TOKEN" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth-token - Print the authentication token gh uses for a hostname and account
.SH SYNOPSIS
\fBgh auth token [flags]\fR
.SH DESCRIPTION
This command outputs the authentication token for an account on a given GitHub host.
.PP
Without the \fB--hostname\fR flag, the default host is chosen.
.PP
Without the \fB--user\fR flag, the active account for the host is chosen.
.SH OPTIONS
.TP
\fB-h\fR, \fB--hostname\fR \fB<string>\fR
The hostname of the GitHub instance authenticated with
.TP
\fB-u\fR, \fB--user\fR \fB<string>\fR
The account to output the token for
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-auth(1)\fR

View File

@ -0,0 +1,59 @@
.nh
.TH "GH-AUTH" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-auth - Authenticate gh and git with GitHub
.SH SYNOPSIS
\fBgh auth <command> [flags]\fR
.SH AVAILABLE COMMANDS
.TP
\fBgh-auth-login(1)\fR
Log in to a GitHub account
.TP
\fBgh-auth-logout(1)\fR
Log out of a GitHub account
.TP
\fBgh-auth-refresh(1)\fR
Refresh stored authentication credentials
.TP
\fBgh-auth-setup-git(1)\fR
Setup git with GitHub CLI
.TP
\fBgh-auth-status(1)\fR
Display active account and authentication state on each known GitHub host
.TP
\fBgh-auth-switch(1)\fR
Switch active GitHub account
.TP
\fBgh-auth-token(1)\fR
Print the authentication token gh uses for a hostname and account
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,106 @@
.nh
.TH "GH-BROWSE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-browse - Open repositories, issues, pull requests, and more in the browser
.SH SYNOPSIS
\fBgh browse [<number> | <path> | <commit-sha>] [flags]\fR
.SH DESCRIPTION
Transition from the terminal to the web browser to view and interact with:
.IP \(bu 2
Issues
.IP \(bu 2
Pull requests
.IP \(bu 2
Repository content
.IP \(bu 2
Repository home page
.IP \(bu 2
Repository settings
.SH OPTIONS
.TP
\fB-b\fR, \fB--branch\fR \fB<string>\fR
Select another branch by passing in the branch name
.TP
\fB-c\fR, \fB--commit\fR \fB<string>\fR
Select another commit by passing in the commit SHA, default is the last commit
.TP
\fB-n\fR, \fB--no-browser\fR
Print destination URL instead of opening the browser
.TP
\fB-p\fR, \fB--projects\fR
Open repository projects
.TP
\fB-r\fR, \fB--releases\fR
Open repository releases
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.TP
\fB-s\fR, \fB--settings\fR
Open repository settings
.TP
\fB-w\fR, \fB--wiki\fR
Open repository wiki
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Open the home page of the current repository
$ gh browse
# Open the script directory of the current repository
$ gh browse script/
# Open issue or pull request 217
$ gh browse 217
# Open commit page
$ gh browse 77507cd94ccafcf568f8560cfecde965fcfa63
# Open repository settings
$ gh browse --settings
# Open main.go at line 312
$ gh browse main.go:312
# Open main.go with the repository at head of bug-fix branch
$ gh browse main.go --branch bug-fix
# Open main.go with the repository at commit 775007cd
$ gh browse main.go --commit=77507cd94ccafcf568f8560cfecde965fcfa63
.EE
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,72 @@
.nh
.TH "GH-CACHE-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-cache-delete - Delete GitHub Actions caches
.SH SYNOPSIS
\fBgh cache delete [<cache-id> | <cache-key> | --all] [flags]\fR
.SH DESCRIPTION
Delete GitHub Actions caches.
.PP
Deletion requires authorization with the \fBrepo\fR scope.
.SH OPTIONS
.TP
\fB-a\fR, \fB--all\fR
Delete all caches
.TP
\fB--succeed-on-no-caches\fR \fB<--all>\fR
Return exit code 0 if no caches found. Must be used in conjunction with --all
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Delete a cache by id
$ gh cache delete 1234
# Delete a cache by key
$ gh cache delete cache-key
# Delete a cache by id in a specific repo
$ gh cache delete 1234 --repo cli/cli
# Delete all caches (exit code 1 on no caches)
$ gh cache delete --all
# Delete all caches (exit code 0 on no caches)
$ gh cache delete --all --succeed-on-no-caches
.EE
.SH SEE ALSO
\fBgh-cache(1)\fR

View File

@ -0,0 +1,100 @@
.nh
.TH "GH-CACHE-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-cache-list - List GitHub Actions caches
.SH SYNOPSIS
\fBgh cache list [flags]\fR
.SH OPTIONS
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-k\fR, \fB--key\fR \fB<string>\fR
Filter by cache key prefix
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of caches to fetch
.TP
\fB-O\fR, \fB--order\fR \fB<string> (default "desc")\fR
Order of caches returned: {asc|desc}
.TP
\fB-r\fR, \fB--ref\fR \fB<string>\fR
Filter by ref, formatted as refs/heads/ or refs/pull//merge
.TP
\fB-S\fR, \fB--sort\fR \fB<string> (default "last_accessed_at")\fR
Sort fetched caches: {created_at|last_accessed_at|size_in_bytes}
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH ALIASES
gh cache ls
.SH JSON FIELDS
\fBcreatedAt\fR, \fBid\fR, \fBkey\fR, \fBlastAccessedAt\fR, \fBref\fR, \fBsizeInBytes\fR, \fBversion\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List caches for current repository
$ gh cache list
# List caches for specific repository
$ gh cache list --repo cli/cli
# List caches sorted by least recently accessed
$ gh cache list --sort last_accessed_at --order asc
# List caches that have keys matching a prefix (or that match exactly)
$ gh cache list --key key-prefix
# List caches for a specific branch, replace <branch-name> with the actual branch name
$ gh cache list --ref refs/heads/<branch-name>
# List caches for a specific pull request, replace <pr-number> with the actual pull request number
$ gh cache list --ref refs/pull/<pr-number>/merge
.EE
.SH SEE ALSO
\fBgh-cache(1)\fR

View File

@ -0,0 +1,57 @@
.nh
.TH "GH-CACHE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-cache - Manage GitHub Actions caches
.SH SYNOPSIS
\fBgh cache <command> [flags]\fR
.SH DESCRIPTION
Work with GitHub Actions caches.
.SH AVAILABLE COMMANDS
.TP
\fBgh-cache-delete(1)\fR
Delete GitHub Actions caches
.TP
\fBgh-cache-list(1)\fR
List GitHub Actions caches
.SH OPTIONS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh cache list
$ gh cache delete --all
.EE
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,51 @@
.nh
.TH "GH-CODESPACE-CODE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-code - Open a codespace in Visual Studio Code
.SH SYNOPSIS
\fBgh codespace code [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB--insiders\fR
Use the insiders version of Visual Studio Code
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.TP
\fB-w\fR, \fB--web\fR
Use the web version of Visual Studio Code
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,94 @@
.nh
.TH "GH-CODESPACE-CP" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-cp - Copy files between local and remote file systems
.SH SYNOPSIS
\fBgh codespace cp [-e] [-r] [-- [<scp flags>...]] <sources>... <dest>\fR
.SH DESCRIPTION
The \fBcp\fR command copies files between the local and remote file systems.
.PP
As with the UNIX \fBcp\fR command, the first argument specifies the source and the last
specifies the destination; additional sources may be specified after the first,
if the destination is a directory.
.PP
The \fB--recursive\fR flag is required if any source is a directory.
.PP
A \fBremote:\fR prefix on any file name argument indicates that it refers to
the file system of the remote (Codespace) machine. It is resolved relative
to the home directory of the remote user.
.PP
By default, remote file names are interpreted literally. With the \fB--expand\fR flag,
each such argument is treated in the manner of \fBscp\fR, as a Bash expression to
be evaluated on the remote machine, subject to expansion of tildes, braces, globs,
environment variables, and backticks. For security, do not use this flag with arguments
provided by untrusted users; see
\[la]https://lwn.net/Articles/835962/\[ra] for discussion.
.PP
By default, the \fBcp\fR command will create a public/private ssh key pair to authenticate with
the codespace inside the \fB~/.ssh directory\fR\&.
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-e\fR, \fB--expand\fR
Expand remote file names on remote shell
.TP
\fB-p\fR, \fB--profile\fR \fB<string>\fR
Name of the SSH profile to use
.TP
\fB-r\fR, \fB--recursive\fR
Recursively copy directories
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh codespace cp -e README.md 'remote:/workspaces/$RepositoryName/'
$ gh codespace cp -e 'remote:~/*.go' ./gofiles/
$ gh codespace cp -e 'remote:/workspaces/myproj/go.{mod,sum}' ./gofiles/
$ gh codespace cp -e -- -F ~/.ssh/codespaces_config 'remote:~/*.go' ./gofiles/
.EE
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,75 @@
.nh
.TH "GH-CODESPACE-CREATE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-create - Create a codespace
.SH SYNOPSIS
\fBgh codespace create [flags]\fR
.SH OPTIONS
.TP
\fB-b\fR, \fB--branch\fR \fB<string>\fR
Repository branch
.TP
\fB--default-permissions\fR
Do not prompt to accept additional permissions requested by the codespace
.TP
\fB--devcontainer-path\fR \fB<string>\fR
Path to the devcontainer.json file to use when creating codespace
.TP
\fB-d\fR, \fB--display-name\fR \fB<string>\fR
Display name for the codespace (48 characters or less)
.TP
\fB--idle-timeout\fR \fB<duration>\fR
Allowed inactivity before codespace is stopped, e.g. "10m", "1h"
.TP
\fB-l\fR, \fB--location\fR \fB<string>\fR
Location: {EastUs|SouthEastAsia|WestEurope|WestUs2} (determined automatically if not provided)
.TP
\fB-m\fR, \fB--machine\fR \fB<string>\fR
Hardware specifications for the VM
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Repository name with owner: user/repo
.TP
\fB--retention-period\fR \fB<duration>\fR
Allowed time after shutting down before the codespace is automatically deleted (maximum 30 days), e.g. "1h", "72h"
.TP
\fB-s\fR, \fB--status\fR
Show status of post-create command and dotfiles
.TP
\fB-w\fR, \fB--web\fR
Create codespace from browser, cannot be used with --display-name, --idle-timeout, or --retention-period
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,74 @@
.nh
.TH "GH-CODESPACE-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-delete - Delete codespaces
.SH SYNOPSIS
\fBgh codespace delete [flags]\fR
.SH DESCRIPTION
Delete codespaces based on selection criteria.
.PP
All codespaces for the authenticated user can be deleted, as well as codespaces for a
specific repository. Alternatively, only codespaces older than N days can be deleted.
.PP
Organization administrators may delete any codespace billed to the organization.
.SH OPTIONS
.TP
\fB--all\fR
Delete all codespaces
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB--days\fR \fB<N> (default 0)\fR
Delete codespaces older than N days
.TP
\fB-f\fR, \fB--force\fR
Skip confirmation for codespaces that contain unsaved changes
.TP
\fB-o\fR, \fB--org\fR \fB<login>\fR
The login handle of the organization (admin-only)
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.TP
\fB-u\fR, \fB--user\fR \fB<username>\fR
The username to delete codespaces for (used with --org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,51 @@
.nh
.TH "GH-CODESPACE-EDIT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-edit - Edit a codespace
.SH SYNOPSIS
\fBgh codespace edit [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-d\fR, \fB--display-name\fR \fB<string>\fR
Set the display name
.TP
\fB-m\fR, \fB--machine\fR \fB<string>\fR
Set hardware specifications for the VM
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,43 @@
.nh
.TH "GH-CODESPACE-JUPYTER" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-jupyter - Open a codespace in JupyterLab
.SH SYNOPSIS
\fBgh codespace jupyter [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,78 @@
.nh
.TH "GH-CODESPACE-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-list - List codespaces
.SH SYNOPSIS
\fBgh codespace list [flags]\fR
.SH DESCRIPTION
List codespaces of the authenticated user.
.PP
Alternatively, organization administrators may list all codespaces billed to the organization.
.SH OPTIONS
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of codespaces to list
.TP
\fB-o\fR, \fB--org\fR \fB<login>\fR
The login handle of the organization to list codespaces for (admin-only)
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Repository name with owner: user/repo
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB-u\fR, \fB--user\fR \fB<username>\fR
The username to list codespaces for (used with --org)
.TP
\fB-w\fR, \fB--web\fR
List codespaces in the web browser, cannot be used with --user or --org
.SH ALIASES
gh codespace ls, gh cs ls
.SH JSON FIELDS
\fBcreatedAt\fR, \fBdisplayName\fR, \fBgitStatus\fR, \fBlastUsedAt\fR, \fBmachineName\fR, \fBname\fR, \fBowner\fR, \fBrepository\fR, \fBstate\fR, \fBvscsTarget\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,47 @@
.nh
.TH "GH-CODESPACE-LOGS" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-logs - Access codespace logs
.SH SYNOPSIS
\fBgh codespace logs [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-f\fR, \fB--follow\fR
Tail and follow the logs
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,43 @@
.nh
.TH "GH-CODESPACE-PORTS-FORWARD" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-ports-forward - Forward ports
.SH SYNOPSIS
\fBgh codespace ports forward <remote-port>:<local-port>... [flags]\fR
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace-ports(1)\fR

View File

@ -0,0 +1,50 @@
.nh
.TH "GH-CODESPACE-PORTS-VISIBILITY" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-ports-visibility - Change the visibility of the forwarded port
.SH SYNOPSIS
\fBgh codespace ports visibility <port>:{public|private|org}... [flags]\fR
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh codespace ports visibility 80:org 3000:private 8000:public
.EE
.SH SEE ALSO
\fBgh-codespace-ports(1)\fR

View File

@ -0,0 +1,69 @@
.nh
.TH "GH-CODESPACE-PORTS" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-ports - List ports in a codespace
.SH SYNOPSIS
\fBgh codespace ports [flags]\fR
.SH AVAILABLE COMMANDS
.TP
\fBgh-codespace-ports-forward(1)\fR
Forward ports
.TP
\fBgh-codespace-ports-visibility(1)\fR
Change the visibility of the forwarded port
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.SH JSON FIELDS
\fBbrowseUrl\fR, \fBlabel\fR, \fBsourcePort\fR, \fBvisibility\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,55 @@
.nh
.TH "GH-CODESPACE-REBUILD" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-rebuild - Rebuild a codespace
.SH SYNOPSIS
\fBgh codespace rebuild [flags]\fR
.SH DESCRIPTION
Rebuilding recreates your codespace.
.PP
Your code and any current changes will be preserved. Your codespace will be rebuilt using
your working directory's dev container. A full rebuild also removes cached Docker images.
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB--full\fR
Perform a full rebuild
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,116 @@
.nh
.TH "GH-CODESPACE-SSH" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-ssh - SSH into a codespace
.SH SYNOPSIS
\fBgh codespace ssh [<flags>...] [-- <ssh-flags>...] [<command>]\fR
.SH DESCRIPTION
The \fBssh\fR command is used to SSH into a codespace. In its simplest form, you can
run \fBgh cs ssh\fR, select a codespace interactively, and connect.
.PP
The \fBssh\fR command will automatically create a public/private ssh key pair in the
\fB~/.ssh\fR directory if you do not have an existing valid key pair. When selecting the
key pair to use, the preferred order is:
.IP " 1." 5
Key specified by \fB-i\fR in \fB<ssh-flags>\fR
.IP " 2." 5
Automatic key, if it already exists
.IP " 3." 5
First valid key pair in ssh config (according to \fBssh -G\fR)
.IP " 4." 5
Automatic key, newly created
.PP
The \fBssh\fR command also supports deeper integration with OpenSSH using a \fB--config\fR
option that generates per-codespace ssh configuration in OpenSSH format.
Including this configuration in your \fB~/.ssh/config\fR improves the user experience
of tools that integrate with OpenSSH, such as Bash/Zsh completion of ssh hostnames,
remote path completion for \fBscp/rsync/sshfs\fR, \fBgit\fR ssh remotes, and so on.
.PP
Once that is set up (see the second example below), you can ssh to codespaces as
if they were ordinary remote hosts (using \fBssh\fR, not \fBgh cs ssh\fR).
.PP
Note that the codespace you are connecting to must have an SSH server pre-installed.
If the docker image being used for the codespace does not have an SSH server,
install it in your \fBDockerfile\fR or, for codespaces that use Debian-based images,
you can add the following to your \fBdevcontainer.json\fR:
.EX
"features": {
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
}
.EE
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB--config\fR
Write OpenSSH configuration to stdout
.TP
\fB-d\fR, \fB--debug\fR
Log debug data to a file
.TP
\fB--debug-file\fR \fB<string>\fR
Path of the file log to
.TP
\fB--profile\fR \fB<string>\fR
Name of the SSH profile to use
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.TP
\fB--server-port\fR \fB<int> (default 0)\fR
SSH server port number (0 => pick unused)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh codespace ssh
$ gh codespace ssh --config > ~/.ssh/codespaces
$ printf 'Match all\\nInclude ~/.ssh/codespaces\\n' >> ~/.ssh/config
.EE
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,51 @@
.nh
.TH "GH-CODESPACE-STOP" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-stop - Stop a running codespace
.SH SYNOPSIS
\fBgh codespace stop [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-o\fR, \fB--org\fR \fB<login>\fR
The login handle of the organization (admin-only)
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.TP
\fB-u\fR, \fB--user\fR \fB<username>\fR
The username to stop codespace for (used with --org)
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,76 @@
.nh
.TH "GH-CODESPACE-VIEW" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace-view - View details about a codespace
.SH SYNOPSIS
\fBgh codespace view [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--codespace\fR \fB<string>\fR
Name of the codespace
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-R\fR, \fB--repo\fR \fB<string>\fR
Filter codespace selection by repository name (user/repo)
.TP
\fB--repo-owner\fR \fB<string>\fR
Filter codespace selection by repository owner (username or org)
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.SH JSON FIELDS
\fBbillableOwner\fR, \fBcreatedAt\fR, \fBdevcontainerPath\fR, \fBdisplayName\fR, \fBenvironmentId\fR, \fBgitStatus\fR, \fBidleTimeoutMinutes\fR, \fBlastUsedAt\fR, \fBlocation\fR, \fBmachineDisplayName\fR, \fBmachineName\fR, \fBname\fR, \fBowner\fR, \fBprebuild\fR, \fBrecentFolders\fR, \fBrepository\fR, \fBretentionExpiresAt\fR, \fBretentionPeriodDays\fR, \fBstate\fR, \fBvscsTarget\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Select a codespace from a list of all codespaces you own
$ gh cs view
# View the details of a specific codespace
$ gh cs view -c codespace-name-12345
# View the list of all available fields for a codespace
$ gh cs view --json
# View specific fields for a codespace
$ gh cs view --json displayName,machineDisplayName,state
.EE
.SH SEE ALSO
\fBgh-codespace(1)\fR

View File

@ -0,0 +1,87 @@
.nh
.TH "GH-CODESPACE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-codespace - Connect to and manage codespaces
.SH SYNOPSIS
\fBgh codespace [flags]\fR
.SH AVAILABLE COMMANDS
.TP
\fBgh-codespace-code(1)\fR
Open a codespace in Visual Studio Code
.TP
\fBgh-codespace-cp(1)\fR
Copy files between local and remote file systems
.TP
\fBgh-codespace-create(1)\fR
Create a codespace
.TP
\fBgh-codespace-delete(1)\fR
Delete codespaces
.TP
\fBgh-codespace-edit(1)\fR
Edit a codespace
.TP
\fBgh-codespace-jupyter(1)\fR
Open a codespace in JupyterLab
.TP
\fBgh-codespace-list(1)\fR
List codespaces
.TP
\fBgh-codespace-logs(1)\fR
Access codespace logs
.TP
\fBgh-codespace-ports(1)\fR
List ports in a codespace
.TP
\fBgh-codespace-rebuild(1)\fR
Rebuild a codespace
.TP
\fBgh-codespace-ssh(1)\fR
SSH into a codespace
.TP
\fBgh-codespace-stop(1)\fR
Stop a running codespace
.TP
\fBgh-codespace-view(1)\fR
View details about a codespace
.SH ALIASES
gh cs
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,100 @@
.nh
.TH "GH-COMPLETION" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-completion - Generate shell completion scripts
.SH SYNOPSIS
\fBgh completion -s <shell>\fR
.SH DESCRIPTION
Generate shell completion scripts for GitHub CLI commands.
.PP
When installing GitHub CLI through a package manager, it's possible that
no additional shell configuration is necessary to gain completion support. For
Homebrew, see
\[la]https://docs.brew.sh/Shell\-Completion\[ra]
.PP
If you need to set up completions manually, follow the instructions below. The exact
config file locations might vary based on your system. Make sure to restart your
shell before testing whether completions are working.
.SS bash
First, ensure that you install \fBbash-completion\fR using your package manager.
.PP
After, add this to your \fB~/.bash_profile\fR:
.EX
eval "$(gh completion -s bash)"
.EE
.SS zsh
Generate a \fB_gh\fR completion script and put it somewhere in your \fB$fpath\fR:
.EX
gh completion -s zsh > /usr/local/share/zsh/site-functions/_gh
.EE
.PP
Ensure that the following is present in your \fB~/.zshrc\fR:
.EX
autoload -U compinit
compinit -i
.EE
.PP
Zsh version 5.7 or later is recommended.
.SS fish
Generate a \fBgh.fish\fR completion script:
.EX
gh completion -s fish > ~/.config/fish/completions/gh.fish
.EE
.SS PowerShell
Open your profile script with:
.EX
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
notepad $profile
.EE
.PP
Add the line and save the file:
.EX
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
.EE
.SH OPTIONS
.TP
\fB-s\fR, \fB--shell\fR \fB<string>\fR
Shell type: {bash|zsh|fish|powershell}
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,37 @@
.nh
.TH "GH-CONFIG-CLEAR-CACHE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-config-clear-cache - Clear the cli cache
.SH SYNOPSIS
\fBgh config clear-cache [flags]\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Clear the cli cache
$ gh config clear-cache
.EE
.SH SEE ALSO
\fBgh-config(1)\fR

View File

@ -0,0 +1,42 @@
.nh
.TH "GH-CONFIG-GET" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-config-get - Print the value of a given configuration key
.SH SYNOPSIS
\fBgh config get <key> [flags]\fR
.SH OPTIONS
.TP
\fB-h\fR, \fB--host\fR \fB<string>\fR
Get per-host setting
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh config get git_protocol
.EE
.SH SEE ALSO
\fBgh-config(1)\fR

View File

@ -0,0 +1,39 @@
.nh
.TH "GH-CONFIG-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-config-list - Print a list of configuration keys and values
.SH SYNOPSIS
\fBgh config list [flags]\fR
.SH OPTIONS
.TP
\fB-h\fR, \fB--host\fR \fB<string>\fR
Get per-host configuration
.SH ALIASES
gh config ls
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-config(1)\fR

View File

@ -0,0 +1,45 @@
.nh
.TH "GH-CONFIG-SET" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-config-set - Update configuration with a value for the given key
.SH SYNOPSIS
\fBgh config set <key> <value> [flags]\fR
.SH OPTIONS
.TP
\fB-h\fR, \fB--host\fR \fB<string>\fR
Set per-host setting
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh config set editor vim
$ gh config set editor "code --wait"
$ gh config set git_protocol ssh --host github.com
$ gh config set prompt disabled
.EE
.SH SEE ALSO
\fBgh-config(1)\fR

View File

@ -0,0 +1,65 @@
.nh
.TH "GH-CONFIG" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-config - Manage configuration for gh
.SH SYNOPSIS
\fBgh config <command> [flags]\fR
.SH DESCRIPTION
Display or change configuration settings for gh.
.PP
Current respected settings:
- \fBgit_protocol\fR: the protocol to use for git clone and push operations \fB{https | ssh}\fR (default \fBhttps\fR)
- \fBeditor\fR: the text editor program to use for authoring text
- \fBprompt\fR: toggle interactive prompting in the terminal \fB{enabled | disabled}\fR (default \fBenabled\fR)
- \fBprefer_editor_prompt\fR: toggle preference for editor-based interactive prompting in the terminal \fB{enabled | disabled}\fR (default \fBdisabled\fR)
- \fBpager\fR: the terminal pager program to send standard output to
- \fBhttp_unix_socket\fR: the path to a Unix socket through which to make an HTTP connection
- \fBbrowser\fR: the web browser to use for opening URLs
- \fBcolor_labels\fR: whether to display labels using their RGB hex color codes in terminals that support truecolor \fB{enabled | disabled}\fR (default \fBdisabled\fR)
- \fBaccessible_colors\fR: whether customizable, 4-bit accessible colors should be used \fB{enabled | disabled}\fR (default \fBdisabled\fR)
- \fBaccessible_prompter\fR: whether an accessible prompter should be used \fB{enabled | disabled}\fR (default \fBdisabled\fR)
- \fBspinner\fR: whether to use a animated spinner as a progress indicator \fB{enabled | disabled}\fR (default \fBenabled\fR)
.SH AVAILABLE COMMANDS
.TP
\fBgh-config-clear-cache(1)\fR
Clear the cli cache
.TP
\fBgh-config-get(1)\fR
Print the value of a given configuration key
.TP
\fBgh-config-list(1)\fR
Print a list of configuration keys and values
.TP
\fBgh-config-set(1)\fR
Update configuration with a value for the given key
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,67 @@
.nh
.TH "GH-EXTENSION-BROWSE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-browse - Enter a UI for browsing, adding, and removing extensions
.SH SYNOPSIS
\fBgh extension browse [flags]\fR
.SH DESCRIPTION
This command will take over your terminal and run a fully interactive
interface for browsing, adding, and removing gh extensions. A terminal
width greater than 100 columns is recommended.
.PP
To learn how to control this interface, press \fB?\fR after running to see
the help text.
.PP
Press \fBq\fR to quit.
.PP
Running this command with \fB--single-column\fR should make this command
more intelligible for users who rely on assistive technology like screen
readers or high zoom.
.PP
For a more traditional way to discover extensions, see:
.EX
gh ext search
.EE
.PP
along with \fBgh ext install\fR, \fBgh ext remove\fR, and \fBgh repo view\fR\&.
.SH OPTIONS
.TP
\fB--debug\fR
Log to /tmp/extBrowse-*
.TP
\fB-s\fR, \fB--single-column\fR
Render TUI with only one column of text
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,52 @@
.nh
.TH "GH-EXTENSION-CREATE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-create - Create a new extension
.SH SYNOPSIS
\fBgh extension create [<name>] [flags]\fR
.SH OPTIONS
.TP
\fB--precompiled\fR \fB<string>\fR
Create a precompiled extension. Possible values: go, other
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Use interactively
$ gh extension create
# Create a script-based extension
$ gh extension create foobar
# Create a Go extension
$ gh extension create --precompiled=go foobar
# Create a non-Go precompiled extension
$ gh extension create --precompiled=other foobar
.EE
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,47 @@
.nh
.TH "GH-EXTENSION-EXEC" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-exec - Execute an installed extension
.SH SYNOPSIS
\fBgh extension exec <name> [args] [flags]\fR
.SH DESCRIPTION
Execute an extension using the short name. For example, if the extension repository is
\fBowner/gh-extension\fR, you should pass \fBextension\fR\&. You can use this command when
the short name conflicts with a core gh command.
.PP
All arguments after the extension name will be forwarded to the executable
of the extension.
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Execute a label extension instead of the core gh label command
$ gh extension exec label
.EE
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,93 @@
.nh
.TH "GH-EXTENSION-INSTALL" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-install - Install a gh extension from a repository
.SH SYNOPSIS
\fBgh extension install <repository> [flags]\fR
.SH DESCRIPTION
Install a GitHub CLI extension from a GitHub or local repository.
.PP
For GitHub repositories, the repository argument can be specified in
\fBOWNER/REPO\fR format or as a full repository URL.
The URL format is useful when the repository is not hosted on \fBgithub.com\fR\&.
.PP
For remote repositories, the GitHub CLI first looks for the release artifacts assuming
that it's a binary extension i.e. prebuilt binaries provided as part of the release.
In the absence of a release, the repository itself is cloned assuming that it's a
script extension i.e. prebuilt executable or script exists on its root.
.PP
The \fB--pin\fR flag may be used to specify a tag or commit for binary and script
extensions respectively, the latest version is used otherwise.
.PP
For local repositories, often used while developing extensions, use \fB\&.\fR as the
value of the repository argument. Note the following:
.IP \(bu 2
After installing an extension from a locally cloned repository, the GitHub CLI will
manage this extension as a symbolic link (or equivalent mechanism on Windows) pointing
to an executable file with the same name as the repository in the repository's root.
For example, if the repository is named \fBgh-foobar\fR, the symbolic link will point
to \fBgh-foobar\fR in the extension repository's root.
.IP \(bu 2
When executing the extension, the GitHub CLI will run the executable file found
by following the symbolic link. If no executable file is found, the extension
will fail to execute.
.IP \(bu 2
If the extension is precompiled, the executable file must be built manually and placed
in the repository's root.
.PP
For the list of available extensions, see
\[la]https://github.com/topics/gh\-extension\[ra]\&.
.SH OPTIONS
.TP
\fB--force\fR
Force upgrade extension, or ignore if latest already installed
.TP
\fB--pin\fR \fB<string>\fR
Pin extension to a release tag or commit ref
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Install an extension from a remote repository hosted on GitHub
$ gh extension install owner/gh-extension
# Install an extension from a remote repository via full URL
$ gh extension install https://my.ghes.com/owner/gh-extension
# Install an extension from a local repository in the current working directory
$ gh extension install .
.EE
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,33 @@
.nh
.TH "GH-EXTENSION-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-list - List installed extension commands
.SH SYNOPSIS
\fBgh extension list [flags]\fR
.SH ALIASES
gh ext ls, gh extension ls, gh extensions ls
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,29 @@
.nh
.TH "GH-EXTENSION-REMOVE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-remove - Remove an installed extension
.SH SYNOPSIS
\fBgh extension remove <name> [flags]\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,138 @@
.nh
.TH "GH-EXTENSION-SEARCH" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-search - Search extensions to the GitHub CLI
.SH SYNOPSIS
\fBgh extension search [<query>] [flags]\fR
.SH DESCRIPTION
Search for gh extensions.
.PP
With no arguments, this command prints out the first 30 extensions
available to install sorted by number of stars. More extensions can
be fetched by specifying a higher limit with the \fB--limit\fR flag.
.PP
When connected to a terminal, this command prints out three columns.
The first has a ✓ if the extension is already installed locally. The
second is the full name of the extension repository in \fBOWNER/REPO\fR
format. The third is the extension's description.
.PP
When not connected to a terminal, the ✓ character is rendered as the
word "installed" but otherwise the order and content of the columns
are the same.
.PP
This command behaves similarly to \fBgh search repos\fR but does not
support as many search qualifiers. For a finer grained search of
extensions, try using:
.EX
gh search repos --topic "gh-extension"
.EE
.PP
and adding qualifiers as needed. See \fBgh help search repos\fR to learn
more about repository search.
.PP
For listing just the extensions that are already installed locally,
see:
.EX
gh ext list
.EE
.SH OPTIONS
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB--license\fR \fB<strings>\fR
Filter based on license type
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of extensions to fetch
.TP
\fB--order\fR \fB<string> (default "desc")\fR
Order of repositories returned, ignored unless '--sort' flag is specified: {asc|desc}
.TP
\fB--owner\fR \fB<strings>\fR
Filter on owner
.TP
\fB--sort\fR \fB<string> (default "best-match")\fR
Sort fetched repositories: {forks|help-wanted-issues|stars|updated}
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB-w\fR, \fB--web\fR
Open the search query in the web browser
.SH JSON FIELDS
\fBcreatedAt\fR, \fBdefaultBranch\fR, \fBdescription\fR, \fBforksCount\fR, \fBfullName\fR, \fBhasDownloads\fR, \fBhasIssues\fR, \fBhasPages\fR, \fBhasProjects\fR, \fBhasWiki\fR, \fBhomepage\fR, \fBid\fR, \fBisArchived\fR, \fBisDisabled\fR, \fBisFork\fR, \fBisPrivate\fR, \fBlanguage\fR, \fBlicense\fR, \fBname\fR, \fBopenIssuesCount\fR, \fBowner\fR, \fBpushedAt\fR, \fBsize\fR, \fBstargazersCount\fR, \fBupdatedAt\fR, \fBurl\fR, \fBvisibility\fR, \fBwatchersCount\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List the first 30 extensions sorted by star count, descending
$ gh ext search
# List more extensions
$ gh ext search --limit 300
# List extensions matching the term "branch"
$ gh ext search branch
# List extensions owned by organization "github"
$ gh ext search --owner github
# List extensions, sorting by recently updated, ascending
$ gh ext search --sort updated --order asc
# List extensions, filtering by license
$ gh ext search --license MIT
# Open search results in the browser
$ gh ext search -w
.EE
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,43 @@
.nh
.TH "GH-EXTENSION-UPGRADE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension-upgrade - Upgrade installed extensions
.SH SYNOPSIS
\fBgh extension upgrade {<name> | --all} [flags]\fR
.SH OPTIONS
.TP
\fB--all\fR
Upgrade all extensions
.TP
\fB--dry-run\fR
Only display upgrades
.TP
\fB--force\fR
Force upgrade extension
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-extension(1)\fR

View File

@ -0,0 +1,88 @@
.nh
.TH "GH-EXTENSION" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-extension - Manage gh extensions
.SH SYNOPSIS
\fBgh extension [flags]\fR
.SH DESCRIPTION
GitHub CLI extensions are repositories that provide additional gh commands.
.PP
The name of the extension repository must start with \fBgh-\fR and it must contain an
executable of the same name. All arguments passed to the \fBgh <extname>\fR invocation
will be forwarded to the \fBgh-<extname>\fR executable of the extension.
.PP
An extension cannot override any of the core gh commands. If an extension name conflicts
with a core gh command, you can use \fBgh extension exec <extname>\fR\&.
.PP
When an extension is executed, gh will check for new versions once every 24 hours and display
an upgrade notice. See \fBgh help environment\fR for information on disabling extension notices.
.PP
For the list of available extensions, see
\[la]https://github.com/topics/gh\-extension\[ra]\&.
.SH AVAILABLE COMMANDS
.TP
\fBgh-extension-browse(1)\fR
Enter a UI for browsing, adding, and removing extensions
.TP
\fBgh-extension-create(1)\fR
Create a new extension
.TP
\fBgh-extension-exec(1)\fR
Execute an installed extension
.TP
\fBgh-extension-install(1)\fR
Install a gh extension from a repository
.TP
\fBgh-extension-list(1)\fR
List installed extension commands
.TP
\fBgh-extension-remove(1)\fR
Remove an installed extension
.TP
\fBgh-extension-search(1)\fR
Search extensions to the GitHub CLI
.TP
\fBgh-extension-upgrade(1)\fR
Upgrade installed extensions
.SH ALIASES
gh extensions, gh ext
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,41 @@
.nh
.TH "GH-GIST-CLONE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-clone - Clone a gist locally
.SH SYNOPSIS
\fBgh gist clone <gist> [<directory>] [-- <gitflags>...]\fR
.SH DESCRIPTION
Clone a GitHub gist locally.
.PP
A gist can be supplied as argument in either of the following formats:
- by ID, e.g. \fB5b0e0062eb8e9654adad7bb1d81cc75f\fR
- by URL, e.g. \fBhttps://gist.github.com/OWNER/5b0e0062eb8e9654adad7bb1d81cc75f\fR
.PP
Pass additional \fBgit clone\fR flags by listing them after \fB--\fR\&.
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,85 @@
.nh
.TH "GH-GIST-CREATE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-create - Create a new gist
.SH SYNOPSIS
\fBgh gist create [<filename>... | <pattern>... | -] [flags]\fR
.SH DESCRIPTION
Create a new GitHub gist with given contents.
.PP
Gists can be created from one or multiple files. Alternatively, pass \fB-\fR as
filename to read from standard input.
.PP
By default, gists are secret; use \fB--public\fR to make publicly listed ones.
.SH OPTIONS
.TP
\fB-d\fR, \fB--desc\fR \fB<string>\fR
A description for this gist
.TP
\fB-f\fR, \fB--filename\fR \fB<string>\fR
Provide a filename to be used when reading from standard input
.TP
\fB-p\fR, \fB--public\fR
List the gist publicly (default "secret")
.TP
\fB-w\fR, \fB--web\fR
Open the web browser with created gist
.SH ALIASES
gh gist new
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Publish file 'hello.py' as a public gist
$ gh gist create --public hello.py
# Create a gist with a description
$ gh gist create hello.py -d "my Hello-World program in Python"
# Create a gist containing several files
$ gh gist create hello.py world.py cool.txt
# Create a gist containing several files using patterns
$ gh gist create *.md *.txt artifact.*
# Read from standard input to create a gist
$ gh gist create -
# Create a gist from output piped from another command
$ cat cool.txt | gh gist create
.EE
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,56 @@
.nh
.TH "GH-GIST-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-delete - Delete a gist
.SH SYNOPSIS
\fBgh gist delete {<id> | <url>} [flags]\fR
.SH DESCRIPTION
Delete a GitHub gist.
.PP
To delete a gist interactively, use \fBgh gist delete\fR with no arguments.
.PP
To delete a gist non-interactively, supply the gist id or url.
.SH OPTIONS
.TP
\fB--yes\fR
Confirm deletion without prompting
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Delete a gist interactively
$ gh gist delete
# Delete a gist non-interactively
$ gh gist delete 1234
.EE
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,47 @@
.nh
.TH "GH-GIST-EDIT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-edit - Edit one of your gists
.SH SYNOPSIS
\fBgh gist edit {<id> | <url>} [<filename>] [flags]\fR
.SH OPTIONS
.TP
\fB-a\fR, \fB--add\fR \fB<string>\fR
Add a new file to the gist
.TP
\fB-d\fR, \fB--desc\fR \fB<string>\fR
New description for the gist
.TP
\fB-f\fR, \fB--filename\fR \fB<string>\fR
Select a file to edit
.TP
\fB-r\fR, \fB--remove\fR \fB<string>\fR
Remove a file from the gist
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,92 @@
.nh
.TH "GH-GIST-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-list - List your gists
.SH SYNOPSIS
\fBgh gist list [flags]\fR
.SH DESCRIPTION
List gists from your user account.
.PP
You can use a regular expression to filter the description, file names,
or even the content of files in the gist using \fB--filter\fR\&.
.PP
For supported regular expression syntax, see
\[la]https://pkg.go.dev/regexp/syntax\[ra]\&.
.PP
Use \fB--include-content\fR to include content of files, noting that
this will be slower and increase the rate limit used. Instead of printing a table,
code will be printed with highlights similar to \fBgh search code\fR:
.EX
{{gist ID}} {{file name}}
{{description}}
{{matching lines from content}}
.EE
.PP
No highlights or other color is printed when output is redirected.
.SH OPTIONS
.TP
\fB--filter\fR \fB<expression>\fR
Filter gists using a regular expression
.TP
\fB--include-content\fR
Include gists' file content when filtering
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 10)\fR
Maximum number of gists to fetch
.TP
\fB--public\fR
Show only public gists
.TP
\fB--secret\fR
Show only secret gists
.SH ALIASES
gh gist ls
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List all secret gists from your user account
$ gh gist list --secret
# Find all gists from your user account mentioning "octo" anywhere
$ gh gist list --filter octo --include-content
.EE
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,33 @@
.nh
.TH "GH-GIST-RENAME" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-rename - Rename a file in a gist
.SH SYNOPSIS
\fBgh gist rename {<id> | <url>} <old-filename> <new-filename> [flags]\fR
.SH DESCRIPTION
Rename a file in the given gist ID / URL.
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,51 @@
.nh
.TH "GH-GIST-VIEW" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist-view - View a gist
.SH SYNOPSIS
\fBgh gist view [<id> | <url>] [flags]\fR
.SH DESCRIPTION
View the given gist or select from recent gists.
.SH OPTIONS
.TP
\fB-f\fR, \fB--filename\fR \fB<string>\fR
Display a single file from the gist
.TP
\fB--files\fR
List file names from the gist
.TP
\fB-r\fR, \fB--raw\fR
Print raw instead of rendered gist contents
.TP
\fB-w\fR, \fB--web\fR
Open gist in the browser
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gist(1)\fR

View File

@ -0,0 +1,63 @@
.nh
.TH "GH-GIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gist - Manage gists
.SH SYNOPSIS
\fBgh gist <command> [flags]\fR
.SH DESCRIPTION
Work with GitHub gists.
.SH AVAILABLE COMMANDS
.TP
\fBgh-gist-clone(1)\fR
Clone a gist locally
.TP
\fBgh-gist-create(1)\fR
Create a new gist
.TP
\fBgh-gist-delete(1)\fR
Delete a gist
.TP
\fBgh-gist-edit(1)\fR
Edit one of your gists
.TP
\fBgh-gist-list(1)\fR
List your gists
.TP
\fBgh-gist-rename(1)\fR
Rename a file in a gist
.TP
\fBgh-gist-view(1)\fR
View a gist
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,35 @@
.nh
.TH "GH-GPG-KEY-ADD" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gpg-key-add - Add a GPG key to your GitHub account
.SH SYNOPSIS
\fBgh gpg-key add [<key-file>] [flags]\fR
.SH OPTIONS
.TP
\fB-t\fR, \fB--title\fR \fB<string>\fR
Title for the new key
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gpg-key(1)\fR

View File

@ -0,0 +1,35 @@
.nh
.TH "GH-GPG-KEY-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gpg-key-delete - Delete a GPG key from your GitHub account
.SH SYNOPSIS
\fBgh gpg-key delete <key-id> [flags]\fR
.SH OPTIONS
.TP
\fB-y\fR, \fB--yes\fR
Skip the confirmation prompt
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gpg-key(1)\fR

View File

@ -0,0 +1,33 @@
.nh
.TH "GH-GPG-KEY-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gpg-key-list - Lists GPG keys in your GitHub account
.SH SYNOPSIS
\fBgh gpg-key list [flags]\fR
.SH ALIASES
gh gpg-key ls
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-gpg-key(1)\fR

View File

@ -0,0 +1,47 @@
.nh
.TH "GH-GPG-KEY" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-gpg-key - Manage GPG keys
.SH SYNOPSIS
\fBgh gpg-key <command> [flags]\fR
.SH DESCRIPTION
Manage GPG keys registered with your GitHub account.
.SH AVAILABLE COMMANDS
.TP
\fBgh-gpg-key-add(1)\fR
Add a GPG key to your GitHub account
.TP
\fBgh-gpg-key-delete(1)\fR
Delete a GPG key from your GitHub account
.TP
\fBgh-gpg-key-list(1)\fR
Lists GPG keys in your GitHub account
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,45 @@
.nh
.TH "GH-ISSUE-CLOSE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-close - Close issue
.SH SYNOPSIS
\fBgh issue close {<number> | <url>} [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--comment\fR \fB<string>\fR
Leave a closing comment
.TP
\fB-r\fR, \fB--reason\fR \fB<string>\fR
Reason for closing: {completed|not planned}
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,84 @@
.nh
.TH "GH-ISSUE-COMMENT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-comment - Add a comment to an issue
.SH SYNOPSIS
\fBgh issue comment {<number> | <url>} [flags]\fR
.SH DESCRIPTION
Add a comment to a GitHub issue.
.PP
Without the body text supplied through flags, the command will interactively
prompt for the comment text.
.SH OPTIONS
.TP
\fB-b\fR, \fB--body\fR \fB<text>\fR
The comment body text
.TP
\fB-F\fR, \fB--body-file\fR \fB<file>\fR
Read body text from file (use "-" to read from standard input)
.TP
\fB--create-if-none\fR
Create a new comment if no comments are found. Can be used only with --edit-last
.TP
\fB--delete-last\fR
Delete the last comment of the current user
.TP
\fB--edit-last\fR
Edit the last comment of the current user
.TP
\fB-e\fR, \fB--editor\fR
Skip prompts and open the text editor to write the body in
.TP
\fB-w\fR, \fB--web\fR
Open the web browser to write the comment
.TP
\fB--yes\fR
Skip the delete confirmation prompt when --delete-last is provided
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh issue comment 12 --body "Hi from GitHub CLI"
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,112 @@
.nh
.TH "GH-ISSUE-CREATE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-create - Create a new issue
.SH SYNOPSIS
\fBgh issue create [flags]\fR
.SH DESCRIPTION
Create an issue on GitHub.
.PP
Adding an issue to projects requires authorization with the \fBproject\fR scope.
To authorize, run \fBgh auth refresh -s project\fR\&.
.PP
The \fB--assignee\fR flag supports the following special values:
- \fB@me\fR: assign yourself
- \fB@copilot\fR: assign Copilot (not supported on GitHub Enterprise Server)
.SH OPTIONS
.TP
\fB-a\fR, \fB--assignee\fR \fB<login>\fR
Assign people by their login. Use "@me" to self-assign.
.TP
\fB-b\fR, \fB--body\fR \fB<string>\fR
Supply a body. Will prompt for one otherwise.
.TP
\fB-F\fR, \fB--body-file\fR \fB<file>\fR
Read body text from file (use "-" to read from standard input)
.TP
\fB-e\fR, \fB--editor\fR
Skip prompts and open the text editor to write the title and body in. The first line is the title and the remaining text is the body.
.TP
\fB-l\fR, \fB--label\fR \fB<name>\fR
Add labels by name
.TP
\fB-m\fR, \fB--milestone\fR \fB<name>\fR
Add the issue to a milestone by name
.TP
\fB-p\fR, \fB--project\fR \fB<title>\fR
Add the issue to projects by title
.TP
\fB--recover\fR \fB<string>\fR
Recover input from a failed run of create
.TP
\fB-T\fR, \fB--template\fR \fB<name>\fR
Template name to use as starting body text
.TP
\fB-t\fR, \fB--title\fR \fB<string>\fR
Supply a title. Will prompt for one otherwise.
.TP
\fB-w\fR, \fB--web\fR
Open the browser to create an issue
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH ALIASES
gh issue new
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh issue create --title "I found a bug" --body "Nothing works"
$ gh issue create --label "bug,help wanted"
$ gh issue create --label bug --label "help wanted"
$ gh issue create --assignee monalisa,hubot
$ gh issue create --assignee "@me"
$ gh issue create --assignee "@copilot"
$ gh issue create --project "Roadmap"
$ gh issue create --template "Bug Report"
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,41 @@
.nh
.TH "GH-ISSUE-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-delete - Delete issue
.SH SYNOPSIS
\fBgh issue delete {<number> | <url>} [flags]\fR
.SH OPTIONS
.TP
\fB--yes\fR
Confirm deletion without prompting
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,86 @@
.nh
.TH "GH-ISSUE-DEVELOP" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-develop - Manage linked branches for an issue
.SH SYNOPSIS
\fBgh issue develop {<number> | <url>} [flags]\fR
.SH DESCRIPTION
Manage linked branches for an issue.
.PP
When using the \fB--base\fR flag, the new development branch will be created from the specified
remote branch. The new branch will be configured as the base branch for pull requests created using
\fBgh pr create\fR\&.
.SH OPTIONS
.TP
\fB-b\fR, \fB--base\fR \fB<string>\fR
Name of the remote branch you want to make your new branch from
.TP
\fB--branch-repo\fR \fB<string>\fR
Name or URL of the repository where you want to create your new branch
.TP
\fB-c\fR, \fB--checkout\fR
Checkout the branch after creating it
.TP
\fB-l\fR, \fB--list\fR
List linked branches for the issue
.TP
\fB-n\fR, \fB--name\fR \fB<string>\fR
Name of the branch to create
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List branches for issue 123
$ gh issue develop --list 123
# List branches for issue 123 in repo cli/cli
$ gh issue develop --list --repo cli/cli 123
# Create a branch for issue 123 based on the my-feature branch
$ gh issue develop 123 --base my-feature
# Create a branch for issue 123 and checkout it out
$ gh issue develop 123 --checkout
# Create a branch in repo monalisa/cli for issue 123 in repo cli/cli
$ gh issue develop 123 --repo cli/cli --branch-repo monalisa/cli
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,110 @@
.nh
.TH "GH-ISSUE-EDIT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-edit - Edit issues
.SH SYNOPSIS
\fBgh issue edit {<numbers> | <urls>} [flags]\fR
.SH DESCRIPTION
Edit one or more issues within the same repository.
.PP
Editing issues' projects requires authorization with the \fBproject\fR scope.
To authorize, run \fBgh auth refresh -s project\fR\&.
.PP
The \fB--add-assignee\fR and \fB--remove-assignee\fR flags both support
the following special values:
- \fB@me\fR: assign or unassign yourself
- \fB@copilot\fR: assign or unassign Copilot (not supported on GitHub Enterprise Server)
.SH OPTIONS
.TP
\fB--add-assignee\fR \fB<login>\fR
Add assigned users by their login. Use "@me" to assign yourself, or "@copilot" to assign Copilot.
.TP
\fB--add-label\fR \fB<name>\fR
Add labels by name
.TP
\fB--add-project\fR \fB<title>\fR
Add the issue to projects by title
.TP
\fB-b\fR, \fB--body\fR \fB<string>\fR
Set the new body.
.TP
\fB-F\fR, \fB--body-file\fR \fB<file>\fR
Read body text from file (use "-" to read from standard input)
.TP
\fB-m\fR, \fB--milestone\fR \fB<name>\fR
Edit the milestone the issue belongs to by name
.TP
\fB--remove-assignee\fR \fB<login>\fR
Remove assigned users by their login. Use "@me" to unassign yourself, or "@copilot" to unassign Copilot.
.TP
\fB--remove-label\fR \fB<name>\fR
Remove labels by name
.TP
\fB--remove-milestone\fR
Remove the milestone association from the issue
.TP
\fB--remove-project\fR \fB<title>\fR
Remove the issue from projects by title
.TP
\fB-t\fR, \fB--title\fR \fB<string>\fR
Set the new title.
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh issue edit 23 --title "I found a bug" --body "Nothing works"
$ gh issue edit 23 --add-label "bug,help wanted" --remove-label "core"
$ gh issue edit 23 --add-assignee "@me" --remove-assignee monalisa,hubot
$ gh issue edit 23 --add-assignee "@copilot"
$ gh issue edit 23 --add-project "Roadmap" --remove-project v1,v2
$ gh issue edit 23 --milestone "Version 1"
$ gh issue edit 23 --remove-milestone
$ gh issue edit 23 --body-file body.txt
$ gh issue edit 23 34 --add-label "help wanted"
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,118 @@
.nh
.TH "GH-ISSUE-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-list - List issues in a repository
.SH SYNOPSIS
\fBgh issue list [flags]\fR
.SH DESCRIPTION
List issues in a GitHub repository. By default, this only lists open issues.
.PP
The search query syntax is documented here:
\[la]https://docs.github.com/en/search\-github/searching\-on\-github/searching\-issues\-and\-pull\-requests\[ra]
.SH OPTIONS
.TP
\fB--app\fR \fB<string>\fR
Filter by GitHub App author
.TP
\fB-a\fR, \fB--assignee\fR \fB<string>\fR
Filter by assignee
.TP
\fB-A\fR, \fB--author\fR \fB<string>\fR
Filter by author
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-l\fR, \fB--label\fR \fB<strings>\fR
Filter by label
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of issues to fetch
.TP
\fB--mention\fR \fB<string>\fR
Filter by mention
.TP
\fB-m\fR, \fB--milestone\fR \fB<string>\fR
Filter by milestone number or title
.TP
\fB-S\fR, \fB--search\fR \fB<query>\fR
Search issues with query
.TP
\fB-s\fR, \fB--state\fR \fB<string> (default "open")\fR
Filter by state: {open|closed|all}
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB-w\fR, \fB--web\fR
List issues in the web browser
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH ALIASES
gh issue ls
.SH JSON FIELDS
\fBassignees\fR, \fBauthor\fR, \fBbody\fR, \fBclosed\fR, \fBclosedAt\fR, \fBclosedByPullRequestsReferences\fR, \fBcomments\fR, \fBcreatedAt\fR, \fBid\fR, \fBisPinned\fR, \fBlabels\fR, \fBmilestone\fR, \fBnumber\fR, \fBprojectCards\fR, \fBprojectItems\fR, \fBreactionGroups\fR, \fBstate\fR, \fBstateReason\fR, \fBtitle\fR, \fBupdatedAt\fR, \fBurl\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh issue list --label "bug" --label "help wanted"
$ gh issue list --author monalisa
$ gh issue list --assignee "@me"
$ gh issue list --milestone "The big 1.0"
$ gh issue list --search "error no:assignee sort:created-asc"
$ gh issue list --state all
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,41 @@
.nh
.TH "GH-ISSUE-LOCK" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-lock - Lock issue conversation
.SH SYNOPSIS
\fBgh issue lock {<number> | <url>} [flags]\fR
.SH OPTIONS
.TP
\fB-r\fR, \fB--reason\fR \fB<string>\fR
Optional reason for locking conversation (off_topic, resolved, spam, too_heated).
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,56 @@
.nh
.TH "GH-ISSUE-PIN" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-pin - Pin a issue
.SH SYNOPSIS
\fBgh issue pin {<number> | <url>} [flags]\fR
.SH DESCRIPTION
Pin an issue to a repository.
.PP
The issue can be specified by issue number or URL.
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Pin an issue to the current repository
$ gh issue pin 23
# Pin an issue by URL
$ gh issue pin https://github.com/owner/repo/issues/23
# Pin an issue to specific repository
$ gh issue pin 23 --repo owner/repo
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,41 @@
.nh
.TH "GH-ISSUE-REOPEN" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-reopen - Reopen issue
.SH SYNOPSIS
\fBgh issue reopen {<number> | <url>} [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--comment\fR \fB<string>\fR
Add a reopening comment
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,53 @@
.nh
.TH "GH-ISSUE-STATUS" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-status - Show status of relevant issues
.SH SYNOPSIS
\fBgh issue status [flags]\fR
.SH OPTIONS
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH JSON FIELDS
\fBassignees\fR, \fBauthor\fR, \fBbody\fR, \fBclosed\fR, \fBclosedAt\fR, \fBclosedByPullRequestsReferences\fR, \fBcomments\fR, \fBcreatedAt\fR, \fBid\fR, \fBisPinned\fR, \fBlabels\fR, \fBmilestone\fR, \fBnumber\fR, \fBprojectCards\fR, \fBprojectItems\fR, \fBreactionGroups\fR, \fBstate\fR, \fBstateReason\fR, \fBtitle\fR, \fBupdatedAt\fR, \fBurl\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,35 @@
.nh
.TH "GH-ISSUE-TRANSFER" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-transfer - Transfer issue to another repository
.SH SYNOPSIS
\fBgh issue transfer {<number> | <url>} <destination-repo> [flags]\fR
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,35 @@
.nh
.TH "GH-ISSUE-UNLOCK" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-unlock - Unlock issue conversation
.SH SYNOPSIS
\fBgh issue unlock {<number> | <url>} [flags]\fR
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,56 @@
.nh
.TH "GH-ISSUE-UNPIN" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-unpin - Unpin a issue
.SH SYNOPSIS
\fBgh issue unpin {<number> | <url>} [flags]\fR
.SH DESCRIPTION
Unpin an issue from a repository.
.PP
The issue can be specified by issue number or URL.
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Unpin issue from the current repository
$ gh issue unpin 23
# Unpin issue by URL
$ gh issue unpin https://github.com/owner/repo/issues/23
# Unpin an issue from specific repository
$ gh issue unpin 23 --repo owner/repo
.EE
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,68 @@
.nh
.TH "GH-ISSUE-VIEW" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue-view - View an issue
.SH SYNOPSIS
\fBgh issue view {<number> | <url>} [flags]\fR
.SH DESCRIPTION
Display the title, body, and other information about an issue.
.PP
With \fB--web\fR flag, open the issue in a web browser instead.
.SH OPTIONS
.TP
\fB-c\fR, \fB--comments\fR
View issue comments
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB-w\fR, \fB--web\fR
Open an issue in the browser
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH JSON FIELDS
\fBassignees\fR, \fBauthor\fR, \fBbody\fR, \fBclosed\fR, \fBclosedAt\fR, \fBclosedByPullRequestsReferences\fR, \fBcomments\fR, \fBcreatedAt\fR, \fBid\fR, \fBisPinned\fR, \fBlabels\fR, \fBmilestone\fR, \fBnumber\fR, \fBprojectCards\fR, \fBprojectItems\fR, \fBreactionGroups\fR, \fBstate\fR, \fBstateReason\fR, \fBtitle\fR, \fBupdatedAt\fR, \fBurl\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-issue(1)\fR

View File

@ -0,0 +1,112 @@
.nh
.TH "GH-ISSUE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-issue - Manage issues
.SH SYNOPSIS
\fBgh issue <command> [flags]\fR
.SH DESCRIPTION
Work with GitHub issues.
.SH GENERAL COMMANDS
.TP
\fBgh-issue-create(1)\fR
Create a new issue
.TP
\fBgh-issue-list(1)\fR
List issues in a repository
.TP
\fBgh-issue-status(1)\fR
Show status of relevant issues
.SH TARGETED COMMANDS
.TP
\fBgh-issue-close(1)\fR
Close issue
.TP
\fBgh-issue-comment(1)\fR
Add a comment to an issue
.TP
\fBgh-issue-delete(1)\fR
Delete issue
.TP
\fBgh-issue-develop(1)\fR
Manage linked branches for an issue
.TP
\fBgh-issue-edit(1)\fR
Edit issues
.TP
\fBgh-issue-lock(1)\fR
Lock issue conversation
.TP
\fBgh-issue-pin(1)\fR
Pin a issue
.TP
\fBgh-issue-reopen(1)\fR
Reopen issue
.TP
\fBgh-issue-transfer(1)\fR
Transfer issue to another repository
.TP
\fBgh-issue-unlock(1)\fR
Unlock issue conversation
.TP
\fBgh-issue-unpin(1)\fR
Unpin a issue
.TP
\fBgh-issue-view(1)\fR
View an issue
.SH OPTIONS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh issue list
$ gh issue create --label bug
$ gh issue view 123 --web
.EE
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,67 @@
.nh
.TH "GH-LABEL-CLONE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-label-clone - Clones labels from one repository to another
.SH SYNOPSIS
\fBgh label clone <source-repository> [flags]\fR
.SH DESCRIPTION
Clones labels from a source repository to a destination repository on GitHub.
By default, the destination repository is the current repository.
.PP
All labels from the source repository will be copied to the destination
repository. Labels in the destination repository that are not in the source
repository will not be deleted or modified.
.PP
Labels from the source repository that already exist in the destination
repository will be skipped. You can overwrite existing labels in the
destination repository using the \fB--force\fR flag.
.SH OPTIONS
.TP
\fB-f\fR, \fB--force\fR
Overwrite labels in the destination repository
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Clone and overwrite labels from cli/cli repository into the current repository
$ gh label clone cli/cli --force
# Clone labels from cli/cli repository into a octocat/cli repository
$ gh label clone cli/cli --repo octocat/cli
.EE
.SH SEE ALSO
\fBgh-label(1)\fR

View File

@ -0,0 +1,68 @@
.nh
.TH "GH-LABEL-CREATE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-label-create - Create a new label
.SH SYNOPSIS
\fBgh label create <name> [flags]\fR
.SH DESCRIPTION
Create a new label on GitHub, or update an existing one with \fB--force\fR\&.
.PP
Must specify name for the label. The description and color are optional.
If a color isn't provided, a random one will be chosen.
.PP
The label color needs to be 6 character hex value.
.SH OPTIONS
.TP
\fB-c\fR, \fB--color\fR \fB<string>\fR
Color of the label
.TP
\fB-d\fR, \fB--description\fR \fB<string>\fR
Description of the label
.TP
\fB-f\fR, \fB--force\fR
Update the label color and description if label already exists
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Create new bug label
$ gh label create bug --description "Something isn't working" --color E99695
.EE
.SH SEE ALSO
\fBgh-label(1)\fR

View File

@ -0,0 +1,41 @@
.nh
.TH "GH-LABEL-DELETE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-label-delete - Delete a label from a repository
.SH SYNOPSIS
\fBgh label delete <name> [flags]\fR
.SH OPTIONS
.TP
\fB--yes\fR
Confirm deletion without prompting
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-label(1)\fR

View File

@ -0,0 +1,70 @@
.nh
.TH "GH-LABEL-EDIT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-label-edit - Edit a label
.SH SYNOPSIS
\fBgh label edit <name> [flags]\fR
.SH DESCRIPTION
Update a label on GitHub.
.PP
A label can be renamed using the \fB--name\fR flag.
.PP
The label color needs to be 6 character hex value.
.SH OPTIONS
.TP
\fB-c\fR, \fB--color\fR \fB<string>\fR
Color of the label
.TP
\fB-d\fR, \fB--description\fR \fB<string>\fR
Description of the label
.TP
\fB-n\fR, \fB--name\fR \fB<string>\fR
New name of the label
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Update the color of the bug label
$ gh label edit bug --color FF0000
# Rename and edit the description of the bug label
$ gh label edit bug --name big-bug --description "Bigger than normal bug"
.EE
.SH SEE ALSO
\fBgh-label(1)\fR

View File

@ -0,0 +1,96 @@
.nh
.TH "GH-LABEL-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-label-list - List labels in a repository
.SH SYNOPSIS
\fBgh label list [flags]\fR
.SH DESCRIPTION
Display labels in a GitHub repository.
.PP
When using the \fB--search\fR flag results are sorted by best match of the query.
This behavior cannot be configured with the \fB--order\fR or \fB--sort\fR flags.
.SH OPTIONS
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of labels to fetch
.TP
\fB--order\fR \fB<string> (default "asc")\fR
Order of labels returned: {asc|desc}
.TP
\fB-S\fR, \fB--search\fR \fB<string>\fR
Search label names and descriptions
.TP
\fB--sort\fR \fB<string> (default "created")\fR
Sort fetched labels: {created|name}
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB-w\fR, \fB--web\fR
List labels in the web browser
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH ALIASES
gh label ls
.SH JSON FIELDS
\fBcolor\fR, \fBcreatedAt\fR, \fBdescription\fR, \fBid\fR, \fBisDefault\fR, \fBname\fR, \fBupdatedAt\fR, \fBurl\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Sort labels by name
$ gh label list --sort name
# Find labels with "bug" in the name or description
$ gh label list --search bug
.EE
.SH SEE ALSO
\fBgh-label(1)\fR

View File

@ -0,0 +1,61 @@
.nh
.TH "GH-LABEL" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-label - Manage labels
.SH SYNOPSIS
\fBgh label <command> [flags]\fR
.SH DESCRIPTION
Work with GitHub labels.
.SH AVAILABLE COMMANDS
.TP
\fBgh-label-clone(1)\fR
Clones labels from one repository to another
.TP
\fBgh-label-create(1)\fR
Create a new label
.TP
\fBgh-label-delete(1)\fR
Delete a label from a repository
.TP
\fBgh-label-edit(1)\fR
Edit a label
.TP
\fBgh-label-list(1)\fR
List labels in a repository
.SH OPTIONS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,50 @@
.nh
.TH "GH-ORG-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-org-list - List organizations for the authenticated user.
.SH SYNOPSIS
\fBgh org list [flags]\fR
.SH OPTIONS
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of organizations to list
.SH ALIASES
gh org ls
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List the first 30 organizations
$ gh org list
# List more organizations
$ gh org list --limit 100
.EE
.SH SEE ALSO
\fBgh-org(1)\fR

View File

@ -0,0 +1,46 @@
.nh
.TH "GH-ORG" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-org - Manage organizations
.SH SYNOPSIS
\fBgh org <command> [flags]\fR
.SH DESCRIPTION
Work with GitHub organizations.
.SH GENERAL COMMANDS
.TP
\fBgh-org-list(1)\fR
List organizations for the authenticated user.
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh org list
.EE
.SH SEE ALSO
\fBgh(1)\fR

View File

@ -0,0 +1,66 @@
.nh
.TH "GH-PR-CHECKOUT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-checkout - Check out a pull request in git
.SH SYNOPSIS
\fBgh pr checkout [<number> | <url> | <branch>] [flags]\fR
.SH OPTIONS
.TP
\fB-b\fR, \fB--branch\fR \fB<string>\fR
Local branch name to use (default [the name of the head branch])
.TP
\fB--detach\fR
Checkout PR with a detached HEAD
.TP
\fB-f\fR, \fB--force\fR
Reset the existing local branch to the latest state of the pull request
.TP
\fB--recurse-submodules\fR
Update all submodules after checkout
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# Interactively select a PR from the 10 most recent to check out
$ gh pr checkout
# Checkout a specific PR
$ gh pr checkout 32
$ gh pr checkout https://github.com/OWNER/REPO/pull/32
$ gh pr checkout feature
.EE
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,89 @@
.nh
.TH "GH-PR-CHECKS" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-checks - Show CI status for a single pull request
.SH SYNOPSIS
\fBgh pr checks [<number> | <url> | <branch>] [flags]\fR
.SH DESCRIPTION
Show CI status for a single pull request.
.PP
Without an argument, the pull request that belongs to the current branch
is selected.
.PP
When the \fB--json\fR flag is used, it includes a \fBbucket\fR field, which categorizes
the \fBstate\fR field into \fBpass\fR, \fBfail\fR, \fBpending\fR, \fBskipping\fR, or \fBcancel\fR\&.
.PP
Additional exit codes:
8: Checks pending
.SH OPTIONS
.TP
\fB--fail-fast\fR
Exit watch mode on first check failure
.TP
\fB-i\fR, \fB--interval\fR \fB<--watch> (default 10)\fR
Refresh interval in seconds when using --watch flag
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB--required\fR
Only show checks that are required
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB--watch\fR
Watch checks until they finish
.TP
\fB-w\fR, \fB--web\fR
Open the web browser to show details about checks
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH JSON FIELDS
\fBbucket\fR, \fBcompletedAt\fR, \fBdescription\fR, \fBevent\fR, \fBlink\fR, \fBname\fR, \fBstartedAt\fR, \fBstate\fR, \fBworkflow\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,45 @@
.nh
.TH "GH-PR-CLOSE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-close - Close a pull request
.SH SYNOPSIS
\fBgh pr close {<number> | <url> | <branch>} [flags]\fR
.SH OPTIONS
.TP
\fB-c\fR, \fB--comment\fR \fB<string>\fR
Leave a closing comment
.TP
\fB-d\fR, \fB--delete-branch\fR
Delete the local and remote branch after close
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,84 @@
.nh
.TH "GH-PR-COMMENT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-comment - Add a comment to a pull request
.SH SYNOPSIS
\fBgh pr comment [<number> | <url> | <branch>] [flags]\fR
.SH DESCRIPTION
Add a comment to a GitHub pull request.
.PP
Without the body text supplied through flags, the command will interactively
prompt for the comment text.
.SH OPTIONS
.TP
\fB-b\fR, \fB--body\fR \fB<text>\fR
The comment body text
.TP
\fB-F\fR, \fB--body-file\fR \fB<file>\fR
Read body text from file (use "-" to read from standard input)
.TP
\fB--create-if-none\fR
Create a new comment if no comments are found. Can be used only with --edit-last
.TP
\fB--delete-last\fR
Delete the last comment of the current user
.TP
\fB--edit-last\fR
Edit the last comment of the current user
.TP
\fB-e\fR, \fB--editor\fR
Skip prompts and open the text editor to write the body in
.TP
\fB-w\fR, \fB--web\fR
Open the web browser to write the comment
.TP
\fB--yes\fR
Skip the delete confirmation prompt when --delete-last is provided
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh pr comment 13 --body "Hi from GitHub CLI"
.EE
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,176 @@
.nh
.TH "GH-PR-CREATE" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-create - Create a pull request
.SH SYNOPSIS
\fBgh pr create [flags]\fR
.SH DESCRIPTION
Create a pull request on GitHub.
.PP
Upon success, the URL of the created pull request will be printed.
.PP
When the current branch isn't fully pushed to a git remote, a prompt will ask where
to push the branch and offer an option to fork the base repository. Use \fB--head\fR to
explicitly skip any forking or pushing behavior.
.PP
\fB--head\fR supports \fB<user>:<branch>\fR syntax to select a head repo owned by \fB<user>\fR\&.
Using an organization as the \fB<user>\fR is currently not supported.
For more information, see
\[la]https://github.com/cli/cli/issues/10093\[ra]
.PP
A prompt will also ask for the title and the body of the pull request. Use \fB--title\fR and
\fB--body\fR to skip this, or use \fB--fill\fR to autofill these values from git commits.
It's important to notice that if the \fB--title\fR and/or \fB--body\fR are also provided
alongside \fB--fill\fR, the values specified by \fB--title\fR and/or \fB--body\fR will
take precedence and overwrite any autofilled content.
.PP
The base branch for the created PR can be specified using the \fB--base\fR flag. If not provided,
the value of \fBgh-merge-base\fR git branch config will be used. If not configured, the repository's
default branch will be used. Run \fBgit config branch.{current}.gh-merge-base {base}\fR to configure
the current branch to use the specified merge base.
.PP
Link an issue to the pull request by referencing the issue in the body of the pull
request. If the body text mentions \fBFixes #123\fR or \fBCloses #123\fR, the referenced issue
will automatically get closed when the pull request gets merged.
.PP
By default, users with write access to the base repository can push new commits to the
head branch of the pull request. Disable this with \fB--no-maintainer-edit\fR\&.
.PP
Adding a pull request to projects requires authorization with the \fBproject\fR scope.
To authorize, run \fBgh auth refresh -s project\fR\&.
.SH OPTIONS
.TP
\fB-a\fR, \fB--assignee\fR \fB<login>\fR
Assign people by their login. Use "@me" to self-assign.
.TP
\fB-B\fR, \fB--base\fR \fB<branch>\fR
The branch into which you want your code merged
.TP
\fB-b\fR, \fB--body\fR \fB<string>\fR
Body for the pull request
.TP
\fB-F\fR, \fB--body-file\fR \fB<file>\fR
Read body text from file (use "-" to read from standard input)
.TP
\fB-d\fR, \fB--draft\fR
Mark pull request as a draft
.TP
\fB--dry-run\fR
Print details instead of creating the PR. May still push git changes.
.TP
\fB-e\fR, \fB--editor\fR
Skip prompts and open the text editor to write the title and body in. The first line is the title and the remaining text is the body.
.TP
\fB-f\fR, \fB--fill\fR
Use commit info for title and body
.TP
\fB--fill-first\fR
Use first commit info for title and body
.TP
\fB--fill-verbose\fR
Use commits msg+body for description
.TP
\fB-H\fR, \fB--head\fR \fB<branch>\fR
The branch that contains commits for your pull request (default [current branch])
.TP
\fB-l\fR, \fB--label\fR \fB<name>\fR
Add labels by name
.TP
\fB-m\fR, \fB--milestone\fR \fB<name>\fR
Add the pull request to a milestone by name
.TP
\fB--no-maintainer-edit\fR
Disable maintainer's ability to modify pull request
.TP
\fB-p\fR, \fB--project\fR \fB<title>\fR
Add the pull request to projects by title
.TP
\fB--recover\fR \fB<string>\fR
Recover input from a failed run of create
.TP
\fB-r\fR, \fB--reviewer\fR \fB<handle>\fR
Request reviews from people or teams by their handle
.TP
\fB-T\fR, \fB--template\fR \fB<file>\fR
Template file to use as starting body text
.TP
\fB-t\fR, \fB--title\fR \fB<string>\fR
Title for the pull request
.TP
\fB-w\fR, \fB--web\fR
Open the web browser to create a pull request
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH ALIASES
gh pr new
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh pr create --title "The bug is fixed" --body "Everything works again"
$ gh pr create --reviewer monalisa,hubot --reviewer myorg/team-name
$ gh pr create --project "Roadmap"
$ gh pr create --base develop --head monalisa:feature
$ gh pr create --template "pull_request_template.md"
.EE
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,64 @@
.nh
.TH "GH-PR-DIFF" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-diff - View changes in a pull request
.SH SYNOPSIS
\fBgh pr diff [<number> | <url> | <branch>] [flags]\fR
.SH DESCRIPTION
View changes in a pull request.
.PP
Without an argument, the pull request that belongs to the current branch
is selected.
.PP
With \fB--web\fR flag, open the pull request diff in a web browser instead.
.SH OPTIONS
.TP
\fB--color\fR \fB<string> (default "auto")\fR
Use color in diff output: {always|never|auto}
.TP
\fB--name-only\fR
Display only names of changed files
.TP
\fB--patch\fR
Display diff in patch format
.TP
\fB-w\fR, \fB--web\fR
Open the pull request diff in the browser
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,129 @@
.nh
.TH "GH-PR-EDIT" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-edit - Edit a pull request
.SH SYNOPSIS
\fBgh pr edit [<number> | <url> | <branch>] [flags]\fR
.SH DESCRIPTION
Edit a pull request.
.PP
Without an argument, the pull request that belongs to the current branch
is selected.
.PP
Editing a pull request's projects requires authorization with the \fBproject\fR scope.
To authorize, run \fBgh auth refresh -s project\fR\&.
.PP
The \fB--add-assignee\fR and \fB--remove-assignee\fR flags both support
the following special values:
- \fB@me\fR: assign or unassign yourself
- \fB@copilot\fR: assign or unassign Copilot (not supported on GitHub Enterprise Server)
.PP
The \fB--add-reviewer\fR and \fB--remove-reviewer\fR flags do not support
these special values.
.SH OPTIONS
.TP
\fB--add-assignee\fR \fB<login>\fR
Add assigned users by their login. Use "@me" to assign yourself, or "@copilot" to assign Copilot.
.TP
\fB--add-label\fR \fB<name>\fR
Add labels by name
.TP
\fB--add-project\fR \fB<title>\fR
Add the pull request to projects by title
.TP
\fB--add-reviewer\fR \fB<login>\fR
Add reviewers by their login.
.TP
\fB-B\fR, \fB--base\fR \fB<branch>\fR
Change the base branch for this pull request
.TP
\fB-b\fR, \fB--body\fR \fB<string>\fR
Set the new body.
.TP
\fB-F\fR, \fB--body-file\fR \fB<file>\fR
Read body text from file (use "-" to read from standard input)
.TP
\fB-m\fR, \fB--milestone\fR \fB<name>\fR
Edit the milestone the pull request belongs to by name
.TP
\fB--remove-assignee\fR \fB<login>\fR
Remove assigned users by their login. Use "@me" to unassign yourself, or "@copilot" to unassign Copilot.
.TP
\fB--remove-label\fR \fB<name>\fR
Remove labels by name
.TP
\fB--remove-milestone\fR
Remove the milestone association from the pull request
.TP
\fB--remove-project\fR \fB<title>\fR
Remove the pull request from projects by title
.TP
\fB--remove-reviewer\fR \fB<login>\fR
Remove reviewers by their login.
.TP
\fB-t\fR, \fB--title\fR \fB<string>\fR
Set the new title.
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
$ gh pr edit 23 --title "I found a bug" --body "Nothing works"
$ gh pr edit 23 --add-label "bug,help wanted" --remove-label "core"
$ gh pr edit 23 --add-reviewer monalisa,hubot --remove-reviewer myorg/team-name
$ gh pr edit 23 --add-assignee "@me" --remove-assignee monalisa,hubot
$ gh pr edit 23 --add-assignee "@copilot"
$ gh pr edit 23 --add-project "Roadmap" --remove-project v1,v2
$ gh pr edit 23 --milestone "Version 1"
$ gh pr edit 23 --remove-milestone
.EE
.SH SEE ALSO
\fBgh-pr(1)\fR

View File

@ -0,0 +1,130 @@
.nh
.TH "GH-PR-LIST" "1" "Jul 2025" "GitHub CLI 2.76.2" "GitHub CLI manual"
.SH NAME
gh-pr-list - List pull requests in a repository
.SH SYNOPSIS
\fBgh pr list [flags]\fR
.SH DESCRIPTION
List pull requests in a GitHub repository. By default, this only lists open PRs.
.PP
The search query syntax is documented here:
\[la]https://docs.github.com/en/search\-github/searching\-on\-github/searching\-issues\-and\-pull\-requests\[ra]
.SH OPTIONS
.TP
\fB--app\fR \fB<string>\fR
Filter by GitHub App author
.TP
\fB-a\fR, \fB--assignee\fR \fB<string>\fR
Filter by assignee
.TP
\fB-A\fR, \fB--author\fR \fB<string>\fR
Filter by author
.TP
\fB-B\fR, \fB--base\fR \fB<string>\fR
Filter by base branch
.TP
\fB-d\fR, \fB--draft\fR
Filter by draft state
.TP
\fB-H\fR, \fB--head\fR \fB<string>\fR
Filter by head branch (":" syntax not supported)
.TP
\fB-q\fR, \fB--jq\fR \fB<expression>\fR
Filter JSON output using a jq expression
.TP
\fB--json\fR \fB<fields>\fR
Output JSON with the specified fields
.TP
\fB-l\fR, \fB--label\fR \fB<strings>\fR
Filter by label
.TP
\fB-L\fR, \fB--limit\fR \fB<int> (default 30)\fR
Maximum number of items to fetch
.TP
\fB-S\fR, \fB--search\fR \fB<query>\fR
Search pull requests with query
.TP
\fB-s\fR, \fB--state\fR \fB<string> (default "open")\fR
Filter by state: {open|closed|merged|all}
.TP
\fB-t\fR, \fB--template\fR \fB<string>\fR
Format JSON output using a Go template; see "gh help formatting"
.TP
\fB-w\fR, \fB--web\fR
List pull requests in the web browser
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.TP
\fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR
Select another repository using the [HOST/]OWNER/REPO format
.SH ALIASES
gh pr ls
.SH JSON FIELDS
\fBadditions\fR, \fBassignees\fR, \fBauthor\fR, \fBautoMergeRequest\fR, \fBbaseRefName\fR, \fBbaseRefOid\fR, \fBbody\fR, \fBchangedFiles\fR, \fBclosed\fR, \fBclosedAt\fR, \fBclosingIssuesReferences\fR, \fBcomments\fR, \fBcommits\fR, \fBcreatedAt\fR, \fBdeletions\fR, \fBfiles\fR, \fBfullDatabaseId\fR, \fBheadRefName\fR, \fBheadRefOid\fR, \fBheadRepository\fR, \fBheadRepositoryOwner\fR, \fBid\fR, \fBisCrossRepository\fR, \fBisDraft\fR, \fBlabels\fR, \fBlatestReviews\fR, \fBmaintainerCanModify\fR, \fBmergeCommit\fR, \fBmergeStateStatus\fR, \fBmergeable\fR, \fBmergedAt\fR, \fBmergedBy\fR, \fBmilestone\fR, \fBnumber\fR, \fBpotentialMergeCommit\fR, \fBprojectCards\fR, \fBprojectItems\fR, \fBreactionGroups\fR, \fBreviewDecision\fR, \fBreviewRequests\fR, \fBreviews\fR, \fBstate\fR, \fBstatusCheckRollup\fR, \fBtitle\fR, \fBupdatedAt\fR, \fBurl\fR
.SH EXIT CODES
0: Successful execution
.PP
1: Error
.PP
2: Command canceled
.PP
4: Authentication required
.PP
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
.SH EXAMPLE
.EX
# List PRs authored by you
$ gh pr list --author "@me"
# List PRs with a specific head branch name
$ gh pr list --head "typo"
# List only PRs with all of the given labels
$ gh pr list --label bug --label "priority 1"
# Filter PRs using search syntax
$ gh pr list --search "status:success review:required"
# Find a PR that introduced a given commit
$ gh pr list --search "<SHA>" --state merged
.EE
.SH SEE ALSO
\fBgh-pr(1)\fR

Some files were not shown because too many files have changed in this diff Show More