gh¶
Gh ¶
Bases: Tool[_R]
Classes:
| Name | Description |
|---|---|
Auth |
|
Issue |
|
Label |
|
Pr |
|
Release |
|
Repo |
|
Run |
|
Workflow |
|
Api |
|
Methods:
| Name | Description |
|---|---|
__call__ |
Work seamlessly with GitHub from the command line. |
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
auth |
Auth[_R]
|
|
issue |
Issue[_R]
|
|
label |
Label[_R]
|
|
pr |
Pr[_R]
|
|
release |
Release[_R]
|
|
repo |
Repo[_R]
|
|
run |
Run[_R]
|
|
workflow |
Workflow[_R]
|
|
api |
Api[_R]
|
|
argv |
Gh[Argv]
|
|
Auth ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
Login |
|
Status |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
login |
Login[_R2]
|
|
status |
Status[_R2]
|
|
argv |
Auth[Argv]
|
|
Login ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Authenticate with a GitHub host. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Login[Argv]
|
|
__call__ ¶
__call__(*, clipboard: Flag = ..., git_protocol: Value = ..., hostname: Value = ..., insecure_storage: Flag = ..., scopes: Value = ..., skip_ssh_key: Flag = ..., web: Flag = ..., with_token: Flag = ..., **flags: Any) -> _R3
Authenticate with a GitHub host.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clipboard
|
Flag
|
Copy one-time OAuth device code to clipboard. |
...
|
git_protocol
|
Value
|
The protocol to use for git operations on this host: {ssh|https}. |
...
|
hostname
|
Value
|
The hostname of the GitHub instance to authenticate with. |
...
|
insecure_storage
|
Flag
|
Save authentication credentials in plain text instead of credential store. |
...
|
scopes
|
Value
|
Additional authentication scopes to request. |
...
|
skip_ssh_key
|
Flag
|
Skip generate/upload SSH key prompt. |
...
|
web
|
Flag
|
Open a browser to authenticate. |
...
|
with_token
|
Flag
|
Read token from standard input. |
...
|
Status ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Display active account and authentication state on each known GitHub |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Status[Argv]
|
|
__call__ ¶
__call__(*, active: Flag = ..., hostname: Value = ..., jq: Value = ..., json: Value = ..., show_token: Flag = ..., template: Value = ..., **flags: Any) -> _R3
Display active account and authentication state on each known GitHub host.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
active
|
Flag
|
Display the active account only. |
...
|
hostname
|
Value
|
Check only a specific hostname's auth status. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
show_token
|
Flag
|
Display the auth token. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
Issue ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
Create |
|
List |
|
View |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
create |
Create[_R2]
|
|
list |
List[_R2]
|
|
view |
View[_R2]
|
|
argv |
Issue[Argv]
|
|
Create ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Create an issue on GitHub. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Create[Argv]
|
|
__call__ ¶
__call__(*, assignee: Value = ..., blocked_by: Value = ..., blocking: Value = ..., body: Value = ..., body_file: Value = ..., editor: Flag = ..., label: Value = ..., milestone: Value = ..., parent: Value = ..., project: Value = ..., recover: Value = ..., repo: Value = ..., template: Value = ..., title: Value = ..., type: Value = ..., web: Flag = ..., **flags: Any) -> _R3
Create an issue on GitHub.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assignee
|
Value
|
Assign people by their login. |
...
|
blocked_by
|
Value
|
Mark the new issue as blocked by these issue numbers or URLs. Added in 2.94.0. |
...
|
blocking
|
Value
|
Mark the new issue as blocking these issue numbers or URLs. Added in 2.94.0. |
...
|
body
|
Value
|
Supply a body. |
...
|
body_file
|
Value
|
Read body text from file (use "-" to read from standard input). |
...
|
editor
|
Flag
|
Skip prompts and open the text editor to write the title and body in. |
...
|
label
|
Value
|
Add labels by name. |
...
|
milestone
|
Value
|
Add the issue to a milestone by name. |
...
|
parent
|
Value
|
Add the new issue as a sub-issue of the specified parent number or URL. Added in 2.94.0. |
...
|
project
|
Value
|
Add the issue to projects by title. |
...
|
recover
|
Value
|
Recover input from a failed run of create. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Template name to use as starting body text. |
...
|
title
|
Value
|
Supply a title. |
...
|
type
|
Value
|
Set the issue type by name. Added in 2.94.0. |
...
|
web
|
Flag
|
Open the browser to create an issue. |
...
|
List ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
List issues in a GitHub repository. By default, this only lists open |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
List[Argv]
|
|
__call__ ¶
__call__(*, app: Value = ..., assignee: Value = ..., author: Value = ..., jq: Value = ..., json: Value = ..., label: Value = ..., limit: Value = ..., mention: Value = ..., milestone: Value = ..., repo: Value = ..., search: Value = ..., state: Value = ..., template: Value = ..., type: Value = ..., web: Flag = ..., **flags: Any) -> _R3
List issues in a GitHub repository. By default, this only lists open issues.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Value
|
Filter by GitHub App author. |
...
|
assignee
|
Value
|
Filter by assignee. |
...
|
author
|
Value
|
Filter by author (use --app to filter by a GitHub App). |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
label
|
Value
|
Filter by label. |
...
|
limit
|
Value
|
Maximum number of issues to fetch. Defaults to |
...
|
mention
|
Value
|
Filter by mention. |
...
|
milestone
|
Value
|
Filter by milestone number or title. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
search
|
Value
|
Search issues with query. |
...
|
state
|
Value
|
Filter by state: {open|closed|all}. Defaults to |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
type
|
Value
|
Filter by issue type name. Added in 2.94.0. |
...
|
web
|
Flag
|
List issues in the web browser. |
...
|
View ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Display the title, body, and other information about an issue. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
View[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], comments: Flag = ..., jq: Value = ..., json: Value = ..., repo: Value = ..., template: Value = ..., web: Flag = ..., **flags: Any) -> _R3
Display the title, body, and other information about an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comments
|
Flag
|
View issue comments. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
web
|
Flag
|
Open an issue in the browser. |
...
|
Label ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
Create |
|
List |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
create |
Create[_R2]
|
|
list |
List[_R2]
|
|
argv |
Label[Argv]
|
|
Create ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Create a new label on GitHub, or update an existing one with |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Create[Argv]
|
|
__call__ ¶
__call__(name: str | PathLike[str], /, *args: str | PathLike[str], color: Value = ..., description: Value = ..., force: Flag = ..., repo: Value = ..., **flags: Any) -> _R3
Create a new label on GitHub, or update an existing one with
--force.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
color
|
Value
|
Color of the label. |
...
|
description
|
Value
|
Description of the label. |
...
|
force
|
Flag
|
Update the label color and description if label already exists. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
List ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Display labels in a GitHub repository. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
List[Argv]
|
|
__call__ ¶
__call__(*, jq: Value = ..., json: Value = ..., limit: Value = ..., order: Value = ..., repo: Value = ..., search: Value = ..., sort: Value = ..., template: Value = ..., web: Flag = ..., **flags: Any) -> _R3
Display labels in a GitHub repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
limit
|
Value
|
Maximum number of labels to fetch. Defaults to |
...
|
order
|
Value
|
Order of labels returned: {asc|desc}. Defaults to |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
search
|
Value
|
Search label names and descriptions. |
...
|
sort
|
Value
|
Sort fetched labels: {created|name}. Defaults to |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
web
|
Flag
|
List labels in the web browser. |
...
|
Pr ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
Checkout |
|
Create |
|
List |
|
Merge |
|
View |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
checkout |
Checkout[_R2]
|
|
create |
Create[_R2]
|
|
list |
List[_R2]
|
|
merge |
Merge[_R2]
|
|
view |
View[_R2]
|
|
argv |
Pr[Argv]
|
|
Checkout ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Check out a pull request in git |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Checkout[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], branch: Value = ..., detach: Flag = ..., force: Flag = ..., recurse_submodules: Flag = ..., repo: Value = ..., worktree: Value = ..., **flags: Any) -> _R3
Check out a pull request in git
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
branch
|
Value
|
Local branch name to use. Defaults to |
...
|
detach
|
Flag
|
Checkout PR with a detached HEAD. |
...
|
force
|
Flag
|
Reset the existing local branch to the latest state of the pull request. |
...
|
recurse_submodules
|
Flag
|
Update all submodules after checkout. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
worktree
|
Value
|
Check out the pull request into a worktree at the given path. Added in 2.98.0. |
...
|
Create ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Create a pull request on GitHub. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Create[Argv]
|
|
__call__ ¶
__call__(*, assignee: Value = ..., base: Value = ..., body: Value = ..., body_file: Value = ..., draft: Flag = ..., dry_run: Flag = ..., editor: Flag = ..., fill: Flag = ..., fill_first: Flag = ..., fill_verbose: Flag = ..., head: Value = ..., label: Value = ..., milestone: Value = ..., no_maintainer_edit: Flag = ..., project: Value = ..., recover: Value = ..., repo: Value = ..., reviewer: Value = ..., template: Value = ..., title: Value = ..., web: Flag = ..., **flags: Any) -> _R3
Create a pull request on GitHub.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assignee
|
Value
|
Assign people by their login. |
...
|
base
|
Value
|
The branch into which you want your code merged. |
...
|
body
|
Value
|
Body for the pull request. |
...
|
body_file
|
Value
|
Read body text from file (use "-" to read from standard input). |
...
|
draft
|
Flag
|
Mark pull request as a draft. |
...
|
dry_run
|
Flag
|
Print details instead of creating the PR. |
...
|
editor
|
Flag
|
Skip prompts and open the text editor to write the title and body in. |
...
|
fill
|
Flag
|
Use commit info for title and body. |
...
|
fill_first
|
Flag
|
Use first commit info for title and body. |
...
|
fill_verbose
|
Flag
|
Use commits msg+body for description. |
...
|
head
|
Value
|
The branch that contains commits for your pull request. Defaults to |
...
|
label
|
Value
|
Add labels by name. |
...
|
milestone
|
Value
|
Add the pull request to a milestone by name. |
...
|
no_maintainer_edit
|
Flag
|
Disable maintainer's ability to modify pull request. |
...
|
project
|
Value
|
Add the pull request to projects by title. |
...
|
recover
|
Value
|
Recover input from a failed run of create. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
reviewer
|
Value
|
Request reviews from people or teams by their handle. |
...
|
template
|
Value
|
Template file to use as starting body text. |
...
|
title
|
Value
|
Title for the pull request. |
...
|
web
|
Flag
|
Open the web browser to create a pull request. |
...
|
List ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
List pull requests in a GitHub repository. By default, this only |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
List[Argv]
|
|
__call__ ¶
__call__(*, app: Value = ..., assignee: Value = ..., author: Value = ..., base: Value = ..., draft: Flag = ..., head: Value = ..., jq: Value = ..., json: Value = ..., label: Value = ..., limit: Value = ..., repo: Value = ..., search: Value = ..., state: Value = ..., template: Value = ..., web: Flag = ..., **flags: Any) -> _R3
List pull requests in a GitHub repository. By default, this only lists open PRs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Value
|
Filter by GitHub App author. |
...
|
assignee
|
Value
|
Filter by assignee. |
...
|
author
|
Value
|
Filter by author (use --app to filter by a GitHub App). |
...
|
base
|
Value
|
Filter by base branch. |
...
|
draft
|
Flag
|
Filter by draft state. |
...
|
head
|
Value
|
Filter by head branch (" |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
label
|
Value
|
Filter by label. |
...
|
limit
|
Value
|
Maximum number of items to fetch. Defaults to |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
search
|
Value
|
Search pull requests with query. |
...
|
state
|
Value
|
Filter by state: {open|closed|merged|all}. Defaults to |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
web
|
Flag
|
List pull requests in the web browser. |
...
|
Merge ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Merge a pull request on GitHub. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Merge[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], admin: Flag = ..., author_email: Value = ..., auto: Flag = ..., body: Value = ..., body_file: Value = ..., delete_branch: Flag = ..., disable_auto: Flag = ..., match_head_commit: Value = ..., merge: Flag = ..., rebase: Flag = ..., repo: Value = ..., squash: Flag = ..., subject: Value = ..., **flags: Any) -> _R3
Merge a pull request on GitHub.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
admin
|
Flag
|
Use administrator privileges to merge a pull request that does not meet requirements. |
...
|
author_email
|
Value
|
Email text for merge commit author. |
...
|
auto
|
Flag
|
Automatically merge only after necessary requirements are met. |
...
|
body
|
Value
|
Body text for the merge commit. |
...
|
body_file
|
Value
|
Read body text from file (use "-" to read from standard input). |
...
|
delete_branch
|
Flag
|
Delete the local and remote branch after merge. |
...
|
disable_auto
|
Flag
|
Disable auto-merge for this pull request. |
...
|
match_head_commit
|
Value
|
Commit SHA that the pull request head must match to allow merge. |
...
|
merge
|
Flag
|
Merge the commits with the base branch. |
...
|
rebase
|
Flag
|
Rebase the commits onto the base branch. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
squash
|
Flag
|
Squash the commits into one commit and merge it into the base branch. |
...
|
subject
|
Value
|
Subject text for the merge commit. |
...
|
View ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Display the title, body, and other information about a pull request. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
View[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], comments: Flag = ..., jq: Value = ..., json: Value = ..., repo: Value = ..., template: Value = ..., web: Flag = ..., **flags: Any) -> _R3
Display the title, body, and other information about a pull request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comments
|
Flag
|
View pull request comments. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
web
|
Flag
|
Open a pull request in the browser. |
...
|
Release ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
Create |
|
List |
|
Upload |
|
View |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
create |
Create[_R2]
|
|
list |
List[_R2]
|
|
upload |
Upload[_R2]
|
|
view |
View[_R2]
|
|
argv |
Release[Argv]
|
|
Create ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Create a new GitHub Release for a repository. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Create[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], discussion_category: Value = ..., draft: Flag = ..., fail_on_no_commits: Flag = ..., generate_notes: Flag = ..., latest: Flag = ..., notes: Value = ..., notes_file: Value = ..., notes_from_tag: Flag = ..., notes_start_tag: Value = ..., prerelease: Flag = ..., repo: Value = ..., target: Value = ..., title: Value = ..., verify_tag: Flag = ..., **flags: Any) -> _R3
Create a new GitHub Release for a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
discussion_category
|
Value
|
Start a discussion in the specified category. |
...
|
draft
|
Flag
|
Save the release as a draft instead of publishing it. |
...
|
fail_on_no_commits
|
Flag
|
Fail if there are no commits since the last release (no impact on the first release). |
...
|
generate_notes
|
Flag
|
Automatically generate title and notes for the release via GitHub Release Notes API. |
...
|
latest
|
Flag
|
Mark this release as "Latest" . |
...
|
notes
|
Value
|
Release notes. |
...
|
notes_file
|
Value
|
Read release notes from file (use "-" to read from standard input). |
...
|
notes_from_tag
|
Flag
|
Fetch notes from the tag annotation or message of commit associated with tag. |
...
|
notes_start_tag
|
Value
|
Tag to use as the starting point for generating release notes. |
...
|
prerelease
|
Flag
|
Mark the release as a prerelease. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
target
|
Value
|
Target branch or full commit SHA. Defaults to |
...
|
title
|
Value
|
Release title. |
...
|
verify_tag
|
Flag
|
Abort in case the git tag doesn't already exist in the remote repository. |
...
|
List ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
List releases in a repository |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
List[Argv]
|
|
__call__ ¶
__call__(*, exclude_drafts: Flag = ..., exclude_pre_releases: Flag = ..., jq: Value = ..., json: Value = ..., limit: Value = ..., order: Value = ..., repo: Value = ..., template: Value = ..., **flags: Any) -> _R3
List releases in a repository
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exclude_drafts
|
Flag
|
Exclude draft releases. |
...
|
exclude_pre_releases
|
Flag
|
Exclude pre-releases. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
limit
|
Value
|
Maximum number of items to fetch. Defaults to |
...
|
order
|
Value
|
Order of releases returned: {asc|desc}. Defaults to |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
Upload ¶
View ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
View information about a GitHub Release. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
View[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], jq: Value = ..., json: Value = ..., repo: Value = ..., template: Value = ..., web: Flag = ..., **flags: Any) -> _R3
View information about a GitHub Release.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
web
|
Flag
|
Open the release in the browser. |
...
|
Repo ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
Clone |
|
View |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
clone |
Clone[_R2]
|
|
view |
View[_R2]
|
|
argv |
Repo[Argv]
|
|
Clone ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Clone a GitHub repository locally. Pass additional |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Clone[Argv]
|
|
View ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Display the description and the README of a GitHub repository. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
View[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], branch: Value = ..., jq: Value = ..., json: Value = ..., template: Value = ..., web: Flag = ..., **flags: Any) -> _R3
Display the description and the README of a GitHub repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
branch
|
Value
|
View a specific branch of the repository. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
web
|
Flag
|
Open a repository in the browser. |
...
|
Run ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
List |
|
View |
|
Watch |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
list |
List[_R2]
|
|
view |
View[_R2]
|
|
watch |
Watch[_R2]
|
|
argv |
Run[Argv]
|
|
List ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
List recent workflow runs. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
List[Argv]
|
|
__call__ ¶
__call__(*, all: Flag = ..., branch: Value = ..., commit: Value = ..., created: Value = ..., event: Value = ..., jq: Value = ..., json: Value = ..., limit: Value = ..., repo: Value = ..., status: Value = ..., template: Value = ..., user: Value = ..., workflow: Value = ..., **flags: Any) -> _R3
List recent workflow runs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all
|
Flag
|
Include disabled workflows. |
...
|
branch
|
Value
|
Filter runs by branch. |
...
|
commit
|
Value
|
Filter runs by the SHA of the commit. |
...
|
created
|
Value
|
Filter runs by the date it was created. |
...
|
event
|
Value
|
Filter runs by which event triggered the run. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
limit
|
Value
|
Maximum number of runs to fetch. Defaults to |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
status
|
Value
|
Filter runs by status: {queued|completed|in_progress|requested|waiting|pending|action_required|cancelled|failure|neutral|skipped|stale|startup_failure|success|timed_out}. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
user
|
Value
|
Filter runs by user who triggered the run. |
...
|
workflow
|
Value
|
Filter runs by workflow. |
...
|
View ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
View a summary of a workflow run. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
View[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], attempt: Value = ..., exit_status: Flag = ..., job: Value = ..., jq: Value = ..., json: Value = ..., log: Flag = ..., log_failed: Flag = ..., repo: Value = ..., template: Value = ..., verbose: Flag = ..., web: Flag = ..., **flags: Any) -> _R3
View a summary of a workflow run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attempt
|
Value
|
The attempt number of the workflow run. |
...
|
exit_status
|
Flag
|
Exit with non-zero status if run failed. |
...
|
job
|
Value
|
View a specific job ID from a run. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
log
|
Flag
|
View full log for either a run or specific job. |
...
|
log_failed
|
Flag
|
View the log for any failed steps in a run or specific job. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
verbose
|
Flag
|
Show job steps. |
...
|
web
|
Flag
|
Open run in the browser. |
...
|
Watch ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Watch a run until it completes, showing its progress. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Watch[Argv]
|
|
__call__ ¶
__call__(run_id: str | PathLike[str], /, *args: str | PathLike[str], compact: Flag = ..., exit_status: Flag = ..., interval: Value = ..., repo: Value = ..., **flags: Any) -> _R3
Watch a run until it completes, showing its progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
compact
|
Flag
|
Show only relevant/failed steps. |
...
|
exit_status
|
Flag
|
Exit with non-zero status if run fails. |
...
|
interval
|
Value
|
Refresh interval in seconds. Defaults to |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
Workflow ¶
Bases: Tool[_R2]
Classes:
| Name | Description |
|---|---|
List |
|
Run |
|
Methods:
| Name | Description |
|---|---|
__call__ |
|
flags |
Bind tool-level global options before the subcommand. |
Attributes:
| Name | Type | Description |
|---|---|---|
list |
List[_R2]
|
|
run |
Run[_R2]
|
|
argv |
Workflow[Argv]
|
|
List ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
List workflow files, hiding disabled workflows by default. |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
List[Argv]
|
|
__call__ ¶
__call__(*, all: Flag = ..., jq: Value = ..., json: Value = ..., limit: Value = ..., repo: Value = ..., template: Value = ..., **flags: Any) -> _R3
List workflow files, hiding disabled workflows by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all
|
Flag
|
Include disabled workflows. |
...
|
jq
|
Value
|
Filter JSON output using a jq expression. |
...
|
json
|
Value
|
Output JSON with the specified fields. |
...
|
limit
|
Value
|
Maximum number of workflows to fetch. Defaults to |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
Run ¶
Bases: Tool[_R3]
Methods:
| Name | Description |
|---|---|
__call__ |
Create a |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Run[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], field: Value = ..., json: Flag = ..., raw_field: Value = ..., ref: Value = ..., repo: Value = ..., **flags: Any) -> _R3
Create a workflow_dispatch event for a given workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
Value
|
Add a string parameter in key=value format, respecting @ syntax (see "gh help api"). |
...
|
json
|
Flag
|
Read workflow inputs as JSON via STDIN. |
...
|
raw_field
|
Value
|
Add a string parameter in key=value format. |
...
|
ref
|
Value
|
Branch or tag name which contains the version of the workflow file you'd like to run. |
...
|
repo
|
Value
|
Select another repository using the [HOST/]OWNER/REPO format. |
...
|
Api ¶
Bases: Tool[_R2]
Methods:
| Name | Description |
|---|---|
__call__ |
Makes an authenticated HTTP request to the GitHub API and prints the |
Attributes:
| Name | Type | Description |
|---|---|---|
argv |
Api[Argv]
|
|
__call__ ¶
__call__(*args: str | PathLike[str], allow_escape_sequences: Flag = ..., cache: Value = ..., field: Value = ..., header: Value = ..., hostname: Value = ..., include: Flag = ..., input: Value = ..., jq: Value = ..., method: Value = ..., paginate: Flag = ..., preview: Value = ..., raw_field: Value = ..., silent: Flag = ..., slurp: Flag = ..., template: Value = ..., verbose: Flag = ..., **flags: Any) -> _R2
Makes an authenticated HTTP request to the GitHub API and prints the response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
allow_escape_sequences
|
Flag
|
Allow printing terminal escape sequences. Added in 2.97.0. |
...
|
cache
|
Value
|
Cache the response, e.g. "3600s", "60m", "1h". |
...
|
field
|
Value
|
Add a typed parameter in key=value format (use "@ |
...
|
header
|
Value
|
Add a HTTP request header in key:value format. |
...
|
hostname
|
Value
|
The GitHub hostname for the request. Defaults to |
...
|
include
|
Flag
|
Include HTTP response status line and headers in the output. |
...
|
input
|
Value
|
The file to use as body for the HTTP request (use "-" to read from standard input). |
...
|
jq
|
Value
|
Query to select values from the response using jq syntax. |
...
|
method
|
Value
|
The HTTP method for the request. Defaults to |
...
|
paginate
|
Flag
|
Make additional HTTP requests to fetch all pages of results. |
...
|
preview
|
Value
|
Opt into GitHub API previews (names should omit '-preview'). |
...
|
raw_field
|
Value
|
Add a string parameter in key=value format. |
...
|
silent
|
Flag
|
Do not print the response body. |
...
|
slurp
|
Flag
|
Use with "--paginate" to return an array of all pages of either JSON arrays or objects. |
...
|
template
|
Value
|
Format JSON output using a Go template; see "gh help formatting". |
...
|
verbose
|
Flag
|
Include full HTTP request and response in the output. |
...
|
__call__ ¶
Work seamlessly with GitHub from the command line.