GitHub CLI brings GitHub to your terminal. Free and open source. Official website: https://cli.github.com
GitHub CLI is official released on September 17, 2020.
PS F:\Projects\github> winget upgrade gh Found GitHub CLI [GitHub.cli] This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/cli/cli/releases/download/v2.0.0/gh_2.0.0_windows_amd64.msi ██████████████████████████████ 6.97 MB / 6.97 MB Successfully verified installer hash Starting package install... Successfully installed PS F:\Projects\github>
gh -h gh auth login gh repo view gh repo list gh repo rename new-name-here
PS F:\Projects\github\lthwgh> gh --help Work seamlessly with GitHub from the command line. USAGE gh <command> <subcommand> [flags] CORE COMMANDS browse: Open the repository in the browser gist: Manage gists issue: Manage issues pr: Manage pull requests release: Manage GitHub releases repo: Create, clone, fork, and view repositories ACTIONS COMMANDS actions: Learn about working with GitHub actions run: View details about workflow runs workflow: View details about GitHub Actions workflows ADDITIONAL COMMANDS alias: Create command shortcuts api: Make an authenticated GitHub API request auth: Login, logout, and refresh your authentication completion: Generate shell completion scripts config: Manage configuration for gh help: Help about any command secret: Manage GitHub secrets ssh-key: Manage SSH keys FLAGS --help Show help for command --version Show gh version EXAMPLES $ gh issue create $ gh repo clone cli/cli $ gh pr checkout 321 ENVIRONMENT VARIABLES See 'gh help environment' for the list of supported environment variables. LEARN MORE Use 'gh <command> <subcommand> --help' for more information about a command. Read the manual at https://cli.github.com/manual FEEDBACK Open an issue using 'gh issue create -R github.com/cli/cli' PS F:\Projects\github\lthwgh>
PS F:\Projects\github> gh repo create lthwgh Welcome to GitHub CLI! To authenticate, please run `gh auth login`. PS F:\Projects\github> gh auth login ? What account do you want to log into? GitHub.com ? What is your preferred protocol for Git operations? HTTPS ? Authenticate Git with your GitHub credentials? Yes ? How would you like to authenticate GitHub CLI? Login with a web browser ! First copy your one-time code: 0BBC-F1C8 - Press Enter to open github.com in your browser... ✓ Authentication complete. Press Enter to continue... - gh config set -h github.com git_protocol https ✓ Configured git protocol ✓ Logged in as tuyendq PS F:\Projects\github> gh repo create lthwgh ? Visibility Public ? Would you like to add a .gitignore? No ? Would you like to add a license? No ? This will create the "lthwgh" repository on GitHub. Continue? Yes ? Create a local project directory for "tuyendq/lthwgh"? Yes Initialized empty Git repository in F:/Projects/github/lthwgh/.git/ ✓ Initialized repository in "lthwgh" PS F:\Projects\github> cd lthwgh PS F:\Projects\github\lthwgh> git status On branch main No commits yet nothing to commit (create/copy files and use "git add" to track) PS F:\Projects\github\lthwgh> git remote -v origin https://github.com/tuyendq/lthwgh.git (fetch) origin https://github.com/tuyendq/lthwgh.git (push) PS F:\Projects\github\lthwgh>