gh-cli
Audited by Runlayer on Feb 26, 2026
Malicious tool definition detected
**Version:** 2.85.0 (current as of January 2026) ## Prerequisites ### Installation ```bash # macOS brew install gh # Linux curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt in
git commit -m "Fix issue #123" git push # Create PR linking to issue gh pr create --title "Fix #123" --body "Closes #123" ``` ### Bulk Operations ```bash # Close multiple issues gh issue list --search "label:stale" \ --json number \ --jq '.[].number' | \ xargs -I {} gh issue close {} --comment "Closing as stale" # Add label to multiple PRs gh pr list --search "review:required" \ --json number \ --jq '.[].number' | \ xargs -I {} gh pr edit {} --add-label needs-review ``` ### Repository Setup Work
**JSON Parsing**: Use jq for complex data extraction ```bash gh pr list --json number,title --jq '.[] | select(.title | contains("fix"))' ``` 4.