All apps/GitHub CLI

GitHub CLI

gh

GitHub on the command line: pull requests, issues and releases without leaving the terminal.

Runs as gh|macOS, Linux, Windows|cli.github.com

Command form

ai-draft · 6 tasks · 32 fields

Work with pull requests, issues and repositories on GitHub. Only list, create and clone are covered; the api, auth, workflow, codespace and project commands are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui gh

gh pr create

Create a pull request

Open a pull request for the current branch.

Create a pull requestExample values, fixed in this page — nothing here reaches a terminal
Basic
Base branch
string
Fill from commits
--fill
Draft
--draft
Reviewers
string
TasksEach one presets the form for one job
Quick PR from commits
fillbasedraftreviewer
Draft PR
titlebodybasedraft
ParametersOnly these flags are editable in the form
Title
string
--title-t
Body
string
--body-b
Base branch
string
--base-B
Head branch
Defaults to the current branch.
string
--head-H
Fill from commits
Skip prompts and use commit info for title and body.
boolean
--fill-f
Draft
boolean
--draft-d
Reviewers
string · repeatable
--reviewer-r
Assignees
string · repeatable
--assignee-a
Open in browser
boolean
--web-w

gh pr list

List pull requests

List and filter pull requests in this repository.

List pull requestsExample values, fixed in this page — nothing here reaches a terminal
Basic
State
Openenum
Limit
integer
TasksEach one presets the form for one job
My open PRs
statelimit
ParametersOnly these flags are editable in the form
State
enum
--state-sopenclosedmergedall
Assignee
string
--assignee-a
Base branch
string
--base-B
Label
string · repeatable
--label-l
Limit
integer
--limit-L

gh issue create

Create an issue

Open a new issue.

Create an issueExample values, fixed in this page — nothing here reaches a terminal
Basic
Title*
string
Body
string
Labels
string
Assignees
string
TasksEach one presets the form for one job
Quick issue
titlebodylabelassignee
ParametersOnly these flags are editable in the form
Title
string
--title-t
Body
string
--body-b
Body file
path
--body-file-F
Labels
string · repeatable
--label-l
Assignees
Use @me to self-assign.
string · repeatable
--assignee-a
Milestone
string
--milestone-m
Repository
OWNER/REPO, when not in a checkout.
string
--repo-R
Open in browser
boolean
--web-w

gh issue list

List issues

List and filter issues in this repository.

List issuesExample values, fixed in this page — nothing here reaches a terminal
Basic
State
string
Labels
string
Limit
integer
TasksEach one presets the form for one job
Issues assigned to me
statelabellimit
ParametersOnly these flags are editable in the form
State
string
--state-sopenclosedall
Assignee
string
--assignee-a
Author
string
--author-A
Labels
string · repeatable
--label-l
Search query
string
--search-S
Limit
integer
--limit-L
Repository
OWNER/REPO, when not in a checkout.
string
--repo-R

gh repo clone

Clone a repository

Clone a GitHub repository locally.

Clone a repositoryExample values, fixed in this page — nothing here reaches a terminal
Basic
Repository*
string
Directory
directory
TasksEach one presets the form for one job
Clone
repositorydirectory
ParametersOnly these flags are editable in the form
Repository
OWNER/REPO. The owner defaults to you if omitted.
string · positional 0
Directory
path · positional 1
Upstream remote name
Remote name used when cloning a fork.
string
--upstream-remote-name-u
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed gh against its version. A form that does not match your version is not offered.