GitHub CLI (gh) is the official command-line interface for GitHub, bringing pull requests, issues, actions, and repository management directly to the terminal. It eliminates the need to switch between the browser and terminal for common GitHub workflows.
For AI coding agents, gh is one of the most critical tools available. With a perfect agent support rating, it enables agents to create and review pull requests, manage issues, trigger CI workflows, browse repository metadata, and interact with the GitHub API — all through structured, scriptable commands. Its gh api subcommand provides direct access to any GitHub REST or GraphQL endpoint.
The CLI supports output formatting with --json and --jq flags, making it trivial to extract specific data for downstream processing. Combined with its MCP-compatible interface, gh serves as a bridge between AI agents and the collaborative development workflows that define modern software engineering.