Text of cli.github.com › manual › gh_help_reference as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

GitHub CLI | Take GitHub to the command line

CLI manual gh reference gh reference gh agent-task <command> Work with agent tasks (preview) Aliases gh agent-tasks, gh agent, gh agents gh agent-task create [<task description>] [flags] Create an agent task (preview) -b, --base string Base branch for the pull request (use default branch if not provided) -a, --custom-agent string Use a custom agent for the task. e.g., use 'my-agent' for the 'my-agent.md' agent --follow[=true|false] Follow agent session logs -F, --from-file file Read task description from file (use "-" to read from standard input) gh agent-task list [flags] List agent tasks (preview) -q, --jq expression Filter JSON output using a jq expression --json fields Output JSON with the specified fields -L, --limit int Maximum number of agent tasks to fetch (default 30) -t, --template string Format JSON output using a Go template; see "gh help formatting" -w, --web[=true|false] Open agent tasks in the browser gh agent-task view [<session-id> | <pr-number> | <pr-url> | <pr-branch>] [flags] View an agent task session (preview) --follow[=true|false] Follow agent session logs -q, --jq expression Filter JSON output using a jq expression --json fields Output JSON with the specified fields --log[=true|false] Show agent session logs -t, --template string Format JSON output using a Go template; see "gh help formatting" -w, --web[=true|false] Open agent task in the browser gh alias <command> Create command shortcuts gh alias delete {<alias> | --all} [flags] Delete set aliases --all[=true|false] Delete all aliases gh alias import [<filename> | -] [flags] Import aliases from a YAML file --clobber[=true|false] Overwrite existing aliases of the same name gh alias list List your aliases Aliases gh alias ls gh alias set <alias> <expansion> [flags] Create a shortcut for a gh command --clobber[=true|false] Overwrite existing aliases of the same name -s, --shell[=true|false] Declare an alias to be passed through a shell interpreter gh api <endpoint> [flags] Make an authenticated GitHub API request --allow-escape-sequences[=true|false] Allow printing terminal escape sequences --cache duration Cache the response, e.g.

"3600s", "60m", "1h" -F, --field key=value Add a typed parameter in key=value format (use "@<path>" or "@-" to read value from file or stdin) -H, --header key:value Add a HTTP request header in key:value format --hostname string The GitHub hostname for the request (default "github.com") -i, --include[=true|false] Include HTTP response status line and headers in the output --input file The file to use as body for the HTTP request (use "-" to read from standard input) -q, --jq string Query to select values from the response using jq syntax -X, --method string The HTTP method for the request (default "GET") --paginate[=true|false] Make additional HTTP requests to fetch all pages of results -p, --preview strings Opt into GitHub API previews (names should omit '-preview') -f, --raw-field key=value Add a string parameter in key=value format --silent[=true|false] Do not print the response body --slurp[=true|false] Use with "--paginate" to return an array of all pages of either JSON arrays or objects -t, --template string Format JSON output using a Go template; see "gh help formatting" --verbose[=true|false] Include full HTTP request and response in the output gh attestation [subcommand] Work with artifact attestations Aliases gh at gh attestation download [<file-path> | oci://<image-uri>] [--owner | --repo] [flags] Download an artifact's attestations for offline use -d, --digest-alg string The algorithm used to compute a digest of the artifact: {sha256|sha512} (default "sha256") --hostname string Configure host to use -L, --limit int Maximum number of attestations to fetch (default 30) -o, --owner string GitHub organization to scope attestation lookup by --predicate-type string Filter attestations by provided predicate type -R, --repo string Repository name in the format <owner>/<repo> gh attestation trusted-root [--tuf-url <url> --tuf-root <file-path>] [--verify-only] [flags] Output trusted_root.jsonl contents, likely for offline verification --hostname string Configure host to use --tuf-root string Path to the TUF root.json file on disk --tuf-url string URL to the TUF repository mirror --verify-only[=true|false] Don't output trusted_root.jsonl contents gh attestation verify [<file-path> | oci://<image-uri>] [--owner | --repo] [flags] Verify an artifact's integrity using attestations -b, --bundle string Path to bundle on disk, either a single bundle in a JSON file or a JSON lines file with multiple bundles --bundle-from-oci[=true|false] When verifying an OCI image, fetch the attestation bundle from the OCI registry instead of from GitHub --cert-identity string Enforce that the certificate's SubjectAlternativeName matches the provided value exactly -i, --cert-identity-regex string Enforce that the certificate's SubjectAlternativeName matches the provided regex --cert-oidc-issuer string Enforce that the issuer of the OIDC token matches the provided value (default "https://token.actions.githubusercontent.com") --custom-trusted-root string Path to a trusted_root.jsonl file; likely for offline verification --deny-self-hosted-runners[=true|false] Fail verification for attestations generated on self-hosted runners -d, --digest-alg string The algorithm used to compute a digest of the artifact: {sha256|sha512} (default "sha256") --format string Output format: {json} --hostname string Configure host to use -q, --jq expression Filter JSON output using a jq expression -L, --limit int Maximum number of attestations to fetch (default 30) --no-public-good[=true|false] Do not verify attestations signed with Sigstore public good instance -o, --owner string GitHub organization to scope attestation lookup by --predicate-type string Enforce that verified attestations' predicate type matches the provided value (default "https://slsa.dev/provenance/v1") -R, --repo string Repository name in the format <owner>/<repo> --signer-digest string Enforce that the digest associated with the signer workflow matches the provided value --signer-repo string Enforce that the workflow that signed the attestation's repository matches the provided value (<owner>/<repo>) --signer-workflow string Enforce that the workflow that signed the attestation matches the provided value ([host/]<owner>/<repo>/<path>/<to>/<workflow>) --source-digest string Enforce that the digest associated with the source repository matches the provided value --source-ref string Enforce that the git ref associated with the source repository matches the provided value -t, --template string Format JSON output using a Go template; see "gh help formatting" gh auth <command> Authenticate gh and git with GitHub gh auth login [flags] Log in to a GitHub account -c, --clipboard[=true|false] Copy one-time OAuth device code to clipboard --expiring[=true|false] Prefer expiring credentials that gh refreshes automatically, if the host supports them -p, --git-protocol string The protocol to use for git operations on this host: {ssh|https} -h, --hostname string The hostname of the GitHub instance to authenticate with --insecure-storage[=true|false] Save authentication credentials in plain text instead of credential store -s, --scopes strings Additional authentication scopes to request --skip-ssh-key[=true|false] Skip generate/upload SSH key prompt -w, --web[=true|false] Open a browser to authenticate --with-token[=true|false] Read token from standard input gh auth logout [flags] Log out of a GitHub account -h, --hostname string The hostname of the GitHub instance to log out of -u, --user string The account to log out of gh auth refresh [flags] Refresh stored authentication credentials -c, --clipboard[=true|false] Copy one-time OAuth device code to clipboard --expiring[=true|false] Prefer expiring credentials that gh refreshes automatically, if the host supports them -h, --hostname string The GitHub host to use for authentication --insecur

The rest of this page is on the live site.