About CLI de GitHub
CLI de GitHub is an open source tool for using GitHub from your computer's command line. When you're working from the command line, you can use the CLI de GitHub to save time and avoid switching context.
Getting started
-
Install CLI de GitHub on macOS, Windows, or Linux.
-
In the command line, authenticate to GitHub.
gh auth login -
Start working with GitHub in the command line. For example, find an issue to work on with
gh issue statusorgh issue list --assignee @me. Create a pull request withgh pr create. Review a pull request withgh pr checkout,gh pr diffandgh pr review.
Next steps
-
Tell CLI de GitHub which text editor to use for commands that open a text editor. For example, enter
gh config set editor "code -w"to set your preferred text editor to Visual Studio Code. For more information, seegh config set. -
Define aliases for commands that you commonly run. For example, if you run
gh alias set prd "pr create --draft", you will then be able to rungh prdto quickly open a draft pull request. For more information, seegh alias. -
Create or add custom commands with CLI de GitHub extensions. For more information, see "Using CLI de GitHub extensions" and "Creating CLI de GitHub extensions."
-
For more information about all of the commands that you can run with CLI de GitHub, see "CLI de GitHub reference."