GitHub CLI (gh)

Manage GitHub issues, PRs, repos, actions, and code search from the terminal. Use when an agent needs to create issues, open pull requests, manage releases, or search code on GitHub.

composio-community 524cdf1 1.1 KB Updated

File contents

GitHub CLI (gh)

Issues, PRs, repos, actions, and code search from the terminal.

Installation

brew install gh
gh auth login

Key Commands

gh issue list --json number,title,state
gh issue create --title "Bug" --body "Description"
gh pr list --json number,title,headRefName
gh pr create --title "Feature" --body "Description"
gh pr merge <number> --squash
gh repo clone owner/repo
gh repo create my-repo --public
gh run list --json status,name,conclusion
gh api repos/owner/repo/releases --jq '.[0].tag_name'
gh search code "function_name" --json path,repository

Agent-Friendly Features

  • --json with --jq for precise field extraction
  • gh api for arbitrary GitHub API calls
  • Token auth via GH_TOKEN or GITHUB_TOKEN
  • Non-interactive mode for all commands
  • Structured exit codes

composio-community/awesome-agent-clis/tree/main/github-cli commit 524cdf1995

Frequently asked questions

npx skillmds@latest add composio-community/github-cli-gh