| name | github-cli |
| description | GitHub CLI operations for repository and workflow management |
When to Use
- GitHub API operations
- Pull request management
- Workflow triggering
- Issue management
Prerequisites
- GitHub CLI installed and authenticated
- Appropriate repository permissions
Commands
Authentication
gh auth status
gh auth login
Repository Operations
gh repo clone <owner/repo>
gh repo view
gh repo create <name> --public --description "Description"
Pull Request Operations
gh pr create --title "Title" --body "Description"
gh pr list
gh pr view <number>
gh pr merge <number> --merge
Workflow Operations
gh workflow list
gh workflow run <workflow-name>
gh run view <run-id>
gh run watch <run-id>
Issue Operations
gh issue create --title "Title" --body "Description"
gh issue list
gh issue close <number>
Best Practices
- Use gh api for advanced operations
- Set default repository with gh repo set-default
- Use --json flag for scripting
- Authenticate with tokens for CI/CD
Output Format
- Command executed
- Operation result
- URLs for created resources
- Next steps
Integration with Agents
Used by: @devops, @reviewer