GitHub CLI (gh)
Hacker ApprovedShares rank 8 of 86 privilege escalation tools by recommenders
People recommend gh for GitHub tasks in the terminal, especially with AI agents, which find it more token efficient than MCP. Critics note coarse token scopes.
People recommend gh for GitHub tasks in the terminal, especially with AI agents, which find it more token efficient than MCP. Critics note coarse token scopes.
38 people gave an opinion
- recommend it
- 34
- criticize it
- 4
- approval share
- 89%
Recommended in 11 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: not recommended
- August 2026: recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 34 people recommend itNeeds 10 or more, met.
- 8.5 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 11 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Cheaper and simpler than MCP
“it appears that using the gh cli is much more token efficient than MCP so that's a plus”
Comment from 4 Sep 2026 in “Ask HN: Who is using MCP in production?” “I found claude was better (trained?) with the gh command line than with the github mcp.”
Comment from 21 Sep 2026 in “MCP was always a bad idea?” “We started with the GitHub mcp but migrated to giving the gh cli to the agent directly.”
Comment from 11 Apr 2026 on Hacker News - Comment from 25 Feb 2026 in “I made MCP cheaper in one command”
- Comment from 26 Feb 2026 in “I made MCP cheaper in one command”
- Comment from 23 Aug 2026 in “New MCP Roadmap”
Agents already know how to use it
“I found claude was better (trained?) with the gh command line than with the github mcp.”
Comment from 21 Sep 2026 in “MCP was always a bad idea?” “agents tend to perform better with CLI tools since they've been heavily RL'd on them.”
Comment from 8 Feb 2026 in “Matchlock: Linux-based sandboxing for AI agents” “all you need is the gh cli, which the agent already knows how to use”
Comment from 10 Jan 2026 in “How to Code Claude Code in 200 Lines of Code” - Comment from 6 Jan 2026 in “Show HN: I replaced beads with a faster, simpler Markdown-based task tracker”
- Comment from 6 Jan 2026 in “Show HN: I replaced beads with a faster, simpler Markdown-based task tracker”
Handles authentication for you
“gh seems much easier than installing and setting up an MCP server connection”
Comment from 26 Feb 2026 in “I made MCP cheaper in one command” “The CLI is also nice because it abstracts away authentication.”
Comment from 13 Apr 2026 in “Building a CLI for All of Cloudflare” “all are a simple “click ok” in the browser to log in”
Comment from 5 Mar 2026 in “Googleworkspace/CLI” Faster than website or curl
“Ever since I discovered `gh`, I stopped going on the website itself.”
Comment from 3 Oct 2026 in “GitHub's new dashboard experience now the default” “AFAICT the gh command line tool makes this a bit smoother.”
Comment from 14 Apr 2026 in “GitHub Stacked PRs” “gh works so much better for me than crafting curl requests”
Comment from 22 Oct 2026 in “OpenAI CLI” - Comment from 2 May 2026 in “GhostBox – disposable little machines from the Global Free Tier.”
What people warn about
Each mark is one comment
Ties auth and pushes to gh
“because i was dumb enough to use the `gh` cli to auth”
Comment from 10 Jun 2026 in “GitHub Authentication issues related to API requests” “instead a ”gh” CLI is now needed to push a commit”
Comment from 31 Jul 2026 in “Stacked PRs are now live on GitHub”
Other privilege escalation tools people recommend
The four most recommended other privilege escalation tools, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
See all 86 privilege escalation tools, rankedWhat people said
32 of the 38 comments that mention it, newest first. Each links to the original comment.
“gh works so much better for me than crafting curl requests”
“Ever since I discovered `gh`, I stopped going on the website itself.”
“I found claude was better (trained?) with the gh command line than with the github mcp.”
“I wind up either scraping `gh run` (slow)”
“I also like our cli and did some work on it too”
“it appears that using the gh cli is much more token efficient than MCP so that's a plus”
“gh is way more efficient than using the github MCP”
“gh CLI using the API was able to make a PR while the web interface was inoperable.”
“instead a ”gh” CLI is now needed to push a commit”
“Agents I use have no trouble with gh or glab or tea.”
“because i was dumb enough to use the `gh` cli to auth”
“i'd love to be able to use fine grained tokens with gh and not expose every repo and org”
“claude code works really well the gh cli”
“It is a better CLI for GH workflows”
“AFAICT the gh command line tool makes this a bit smoother.”
“The CLI is also nice because it abstracts away authentication.”
“We started with the GitHub mcp but migrated to giving the gh cli to the agent directly.”
“i just shell out to gh cli and curl”
“all are a simple “click ok” in the browser to log in”
“it would be more beneficial to just use the CLI in this case”
“gh seems much easier than installing and setting up an MCP server connection”
“You'll see the difference immediately (espicially more if you have many MCPs)”
“agents tend to perform better with CLI tools since they've been heavily RL'd on them.”
“reminding Claude it could use gh cli to manage GitHub issues and never really looked back”
“all you need is the gh cli, which the agent already knows how to use”
“agents are great with the gh CLI”
“have CC make use of the gh CLI, works great”
“issue templates don't show up there at all”
“it uses 'gh' to do everything, including responding to human comments!”
“piggyback on top of existing tooling”
“the “gh” CLI tool is helpful”
“it's a significantly better dev experience having CC call out to the gh cli for actions”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.