# GitHub CLI
> GitHub's official command-line tool for seamless workflow

## Summary
GitHub's official CLI. Manage pull requests, issues, releases, Actions, and repositories from the terminal with full GitHub API access.

## Capabilities
- Create and manage pull requests and issues
- Trigger and view GitHub Actions workflows
- Browse and clone repositories
- Full GitHub API access via gh api

## When to Use
- Managing GitHub PRs, issues, and releases from the terminal
- Automating GitHub workflows in scripts
- Need quick access to the GitHub API

## When NOT to Use
- Working with non-GitHub remotes (GitLab, Bitbucket)

## Key Flags
- `pr create`: Create a new pull request from the current branch
- `pr view`: View details and checks for a pull request
- `issue list`: List issues in the current repository
- `api`: Make authenticated requests to the GitHub API
- `repo clone`: Clone a GitHub repository by owner/name shorthand

## Usage Patterns
### Create a pull request
```
gh pr create --fill
```
Creates a PR with title and body from commit messages

### View PR checks
```
gh pr checks
```
Shows CI/CD check status for the current PR

## Installation
- **homebrew**: `brew install gh`
- **apt**: `sudo apt install gh`
- **pacman**: `sudo pacman -S github-cli`

## Related Tools
- [lazygit](/tools/lazygit) (complementary): lazygit for local git operations, gh for GitHub-specific features

---
Source: https://littlescripts.sh/tools/gh
