{"slug": "github-cli", "name": "GitHub CLI", "category": "terminal", "category_name": "Terminal and shell", "description": "GitHub's official command-line tool for pull requests, issues, and repositories.", "recommenders": 5, "commenters": 8, "warners": 1, "score": 4.073, "rising": -0.31, "first": "2025-11-03", "latest": "2026-09-04", "why": "Liked as a CLI that AI agents like Claude already operate well, often in place of an MCP server, and for scripting PR creation and handling GitHub credentials.", "why_is_quote": false, "has_verdict": true, "sentiment": {"recommend": 5, "neutral": 2, "compare": 0, "warn": 1}, "spark": [0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0], "listed": true, "loved": ["AI agent friendly", "Pleasant to use"], "caveat": "Telemetry", "short_quote": "I use gh cli via Claude instead of their MCP, because I already had cli setup", "icon": true, "domain": null, "github_repo": null, "official_url": "https://cli.github.com", "pricing": "open source", "aliases": ["GitHub CLI"], "verdict": [{"text": "Liked as a CLI that AI agents like Claude already operate well, often in place of an MCP server,", "cites": [{"id": 792998528, "item_id": 49562408, "url": "https://news.ycombinator.com/item?id=49562408", "by": "5ersi", "date": "2026-09-04", "stance": "recommend", "quote": "I use gh cli via Claude instead of their MCP, because I already had cli setup", "excerpt": "MCPs are diminishing in value a bit, because AI Agents are getting smarter about using API/CLIs. For example, I use gh cli via Claude instead of their MCP, because I already had cli setup, so no need to use MCP. MCPs can potentially have great value if they cross multiple sources and combine results. For example at work we use an in-house MCP for log/metrics search across five different (legacy) systems. It finds cor", "context": "", "use_case": "GitHub access for AI agent", "switched_from": "", "story": "Ask HN: Who is using MCP in production?"}, {"id": 773295313, "item_id": 48330957, "url": "https://news.ycombinator.com/item?id=48330957", "by": "cowlby", "date": "2026-05-29", "stance": "recommend", "quote": "CLI: GitHub & AWS it already knows how to operate the CLIs well.", "excerpt": "I use all three (MCP/CLI/API) based on what Claude excels at: * CLI: GitHub & AWS it already knows how to operate the CLIs well. Even learned about a few new CLIs like 1Password's op which it volunteered one day. * MCP: Supabase, Shopify etc. where the CLI would be non-obvious and the affordances from the tools/descriptions helps Claude maneuver. * API: Sometimes it just knows an API exists and is able to call it dir", "context": "", "use_case": "driven by Claude", "switched_from": "", "story": "MCP Is Dead"}, {"id": 755381296, "item_id": 47211331, "url": "https://news.ycombinator.com/item?id=47211331", "by": "Robdel12", "date": "2026-03-01", "stance": "recommend", "quote": "Thank you so much to the GH CLI for making me realize this, really.", "excerpt": "YES, I have been thinking the same and wrote a bit about it: https://vizzly.dev/blog/cli-json-output-llm-friendly/ Thank you so much to the GH CLI for making me realize this, really. The only MCPs I use still are ones that don\u2019t have CLIs. Hell, I even just wrote a CLI for Bear Notes, for LLMs. It\u2019s just better. Seems like the last MCP use case is model to model communication but I\u2019m sure others have approach\u2019s for t", "context": "", "use_case": "CLI tool for LLMs", "switched_from": "", "story": "MCP is dead. Long live the CLI"}]}, {"text": " and for scripting PR creation and handling GitHub credentials.", "cites": [{"id": 732835826, "item_id": 45802239, "url": "https://news.ycombinator.com/item?id=45802239", "by": "paradox460", "date": "2025-11-03", "stance": "neutral", "quote": "wrapped up the various jj and github gh cli invocations to create a PR off a branch", "excerpt": "I was doing that for a while with some CLI scripts, never really melded them together, but I had one from before I started using JJ that would make a new git branch named off a JIRA ticket, and a newer one that wrapped up the various jj and github gh cli invocations to create a PR off a branch. The jira cli util I used, go-jira, hasn't been updated to use the new Atlassian APIs, and I haven't spent too much time look", "context": "", "use_case": "creating pull requests", "switched_from": "", "story": "Git CLI tool for intelligently creating branch names"}, {"id": 740258384, "item_id": 46266149, "url": "https://news.ycombinator.com/item?id=46266149", "by": "benfrancom", "date": "2025-12-14", "stance": "recommend", "quote": "If github, take a look at gh cli or git credential manager", "excerpt": "If github, take a look at gh cli or git credential manager: https://docs.github.com/en/get-started/git-basics/caching-your-github-credentials-in-git", "context": "", "use_case": "secure GitHub authentication", "switched_from": "", "story": "Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem"}]}, {"text": " The main complaint is its telemetry collection,", "cites": [{"id": 765805168, "item_id": 47862823, "url": "https://news.ycombinator.com/item?id=47862823", "by": "a2128", "date": "2026-04-22", "stance": "warn", "quote": "I'm curious why corporate development teams always feel the need to spy on their users?", "excerpt": "Why we collect telemetry ...our team needs visibility into how features are being used in practice. We use this data to prioritize our work and evaluate whether features are meeting real user needs. I'm curious why corporate development teams always feel the need to spy on their users? Is it not sufficient to employ good engineering and design practices? Git has served us well for 20+ years without detailed analytics", "context": "", "use_case": "", "switched_from": "", "story": "GitHub CLI now collects pseudoanonymous telemetry"}]}, {"text": " and GitHub's tokens are not granular enough to let agents comment on PRs without also being able to merge.", "cites": [{"id": 790084689, "item_id": 49380293, "url": "https://news.ycombinator.com/item?id=49380293", "by": "verdverm", "date": "2026-08-20", "stance": "neutral", "quote": "if you want to permit the GH cli for adding comments, but not merging", "excerpt": "Totally agree and this is actually on my short list. I use opencode, so one will need a custom plugin to gate tool calls. They have permission config, which I'm using to block file reads, but the orchestrator is allowed to use specific subagents for more targeted reviews, and they have file read permissions, which the main agent is abusing. Some of them can be deterministic rules, but others cannot. For example, if y", "context": "", "use_case": "agent commenting on GitHub", "switched_from": "", "story": "Every Model Cheats"}]}], "praise": [{"label": "AI agent friendly", "summary": "Claude and other agents already know how to use it, so commenters choose it over an MCP server.", "quotes": [{"id": 792998528, "item_id": 49562408, "url": "https://news.ycombinator.com/item?id=49562408", "by": "5ersi", "date": "2026-09-04", "stance": "recommend", "quote": "I use gh cli via Claude instead of their MCP, because I already had cli setup", "excerpt": "MCPs are diminishing in value a bit, because AI Agents are getting smarter about using API/CLIs. For example, I use gh cli via Claude instead of their MCP, because I already had cli setup, so no need to use MCP. MCPs can potentially have great value if they cross multiple sources and combine results. For example at work we use an in-house MCP for log/metrics search across five different (legacy) systems. It finds cor", "context": "", "use_case": "GitHub access for AI agent", "switched_from": "", "story": "Ask HN: Who is using MCP in production?"}, {"id": 773295313, "item_id": 48330957, "url": "https://news.ycombinator.com/item?id=48330957", "by": "cowlby", "date": "2026-05-29", "stance": "recommend", "quote": "CLI: GitHub & AWS it already knows how to operate the CLIs well.", "excerpt": "I use all three (MCP/CLI/API) based on what Claude excels at: * CLI: GitHub & AWS it already knows how to operate the CLIs well. Even learned about a few new CLIs like 1Password's op which it volunteered one day. * MCP: Supabase, Shopify etc. where the CLI would be non-obvious and the affordances from the tools/descriptions helps Claude maneuver. * API: Sometimes it just knows an API exists and is able to call it dir", "context": "", "use_case": "driven by Claude", "switched_from": "", "story": "MCP Is Dead"}, {"id": 755381296, "item_id": 47211331, "url": "https://news.ycombinator.com/item?id=47211331", "by": "Robdel12", "date": "2026-03-01", "stance": "recommend", "quote": "Thank you so much to the GH CLI for making me realize this, really.", "excerpt": "YES, I have been thinking the same and wrote a bit about it: https://vizzly.dev/blog/cli-json-output-llm-friendly/ Thank you so much to the GH CLI for making me realize this, really. The only MCPs I use still are ones that don\u2019t have CLIs. Hell, I even just wrote a CLI for Bear Notes, for LLMs. It\u2019s just better. Seems like the last MCP use case is model to model communication but I\u2019m sure others have approach\u2019s for t", "context": "", "use_case": "CLI tool for LLMs", "switched_from": "", "story": "MCP is dead. Long live the CLI"}]}, {"label": "Pleasant to use", "summary": "One commenter calls the gh CLI really nice.", "quotes": [{"id": 767006467, "item_id": 47937904, "url": "https://news.ycombinator.com/item?id=47937904", "by": "peterldowns", "date": "2026-04-28", "stance": "recommend", "quote": "The Github UI and the `gh` cli are actually really nice", "excerpt": "Yup! Still haven't switched off of Github, but considering it at this point. If you're in my shoes, here's some tools we use that help: - https://github.com/sethvargo/ratchet for pinning external Actions/Workflows to specific commit hashes - https://www.warpbuild.com/ for much faster runners (also: runs-on/namespace/buildjet/blacksmith/depot/... take your pick) - soon moving to Buildkite for orchestration of our CI j", "context": "", "use_case": "git hosting workflow", "switched_from": "", "story": "GitHub Actions is the weakest link"}]}, {"label": "Credential setup", "summary": "Suggested as a way to handle GitHub credentials for git.", "quotes": [{"id": 740258384, "item_id": 46266149, "url": "https://news.ycombinator.com/item?id=46266149", "by": "benfrancom", "date": "2025-12-14", "stance": "recommend", "quote": "If github, take a look at gh cli or git credential manager", "excerpt": "If github, take a look at gh cli or git credential manager: https://docs.github.com/en/get-started/git-basics/caching-your-github-credentials-in-git", "context": "", "use_case": "secure GitHub authentication", "switched_from": "", "story": "Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem"}]}, {"label": "Scriptable PRs", "summary": "Can be wrapped in scripts, including with jj, to create PRs from branches.", "quotes": [{"id": 732835826, "item_id": 45802239, "url": "https://news.ycombinator.com/item?id=45802239", "by": "paradox460", "date": "2025-11-03", "stance": "neutral", "quote": "wrapped up the various jj and github gh cli invocations to create a PR off a branch", "excerpt": "I was doing that for a while with some CLI scripts, never really melded them together, but I had one from before I started using JJ that would make a new git branch named off a JIRA ticket, and a newer one that wrapped up the various jj and github gh cli invocations to create a PR off a branch. The jira cli util I used, go-jira, hasn't been updated to use the new Atlassian APIs, and I haven't spent too much time look", "context": "", "use_case": "creating pull requests", "switched_from": "", "story": "Git CLI tool for intelligently creating branch names"}]}], "caveats": [{"label": "Telemetry", "summary": "One commenter objects to the tool collecting usage telemetry.", "quotes": [{"id": 765805168, "item_id": 47862823, "url": "https://news.ycombinator.com/item?id=47862823", "by": "a2128", "date": "2026-04-22", "stance": "warn", "quote": "I'm curious why corporate development teams always feel the need to spy on their users?", "excerpt": "Why we collect telemetry ...our team needs visibility into how features are being used in practice. We use this data to prioritize our work and evaluate whether features are meeting real user needs. I'm curious why corporate development teams always feel the need to spy on their users? Is it not sufficient to employ good engineering and design practices? Git has served us well for 20+ years without detailed analytics", "context": "", "use_case": "", "switched_from": "", "story": "GitHub CLI now collects pseudoanonymous telemetry"}]}, {"label": "Coarse permissions", "summary": "GitHub's tokens are not granular enough to allow commenting on PRs but not merging when agents use the CLI.", "quotes": [{"id": 790084689, "item_id": 49380293, "url": "https://news.ycombinator.com/item?id=49380293", "by": "verdverm", "date": "2026-08-20", "stance": "neutral", "quote": "if you want to permit the GH cli for adding comments, but not merging", "excerpt": "Totally agree and this is actually on my short list. I use opencode, so one will need a custom plugin to gate tool calls. They have permission config, which I'm using to block file reads, but the orchestrator is allowed to use specific subagents for more targeted reviews, and they have file read permissions, which the main agent is abusing. Some of them can be deterministic rules, but others cannot. For example, if y", "context": "", "use_case": "agent commenting on GitHub", "switched_from": "", "story": "Every Model Cheats"}]}], "who": [], "tags": ["for AI coding agents", "for PR automation", "for Git credential setup"], "use_cases": ["github access for ai agent", "agent commenting on github", "driven by claude", "git hosting workflow", "cli tool for llms", "secure github authentication"], "compared": [{"slug": "claude", "name": "Claude", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "git", "name": "Git", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49548600", "title": "Ask HN: Who is using MCP in production?", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49374635", "title": "Every Model Cheats", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48330436", "title": "MCP Is Dead", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47933257", "title": "GitHub Actions is the weakest link", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47862331", "title": "GitHub CLI now collects pseudoanonymous telemetry", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47208398", "title": "MCP is dead. Long live the CLI", "mentions": 1}], "sentiment_by_month": {"2025-11": {"neutral": 1}, "2025-12": {"recommend": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {"recommend": 1}, "2026-04": {"warn": 1, "recommend": 1}, "2026-05": {"recommend": 1}, "2026-06": {}, "2026-07": {}, "2026-08": {"neutral": 1}, "2026-09": {"recommend": 1}, "2026-10": {}}, "quotes": [{"id": 792998528, "item_id": 49562408, "url": "https://news.ycombinator.com/item?id=49562408", "by": "5ersi", "date": "2026-09-04", "stance": "recommend", "quote": "I use gh cli via Claude instead of their MCP, because I already had cli setup", "excerpt": "MCPs are diminishing in value a bit, because AI Agents are getting smarter about using API/CLIs. For example, I use gh cli via Claude instead of their MCP, because I already had cli setup, so no need to use MCP. MCPs can potentially have great value if they cross multiple sources and combine results. For example at work we use an in-house MCP for log/metrics search across five different (legacy) systems. It finds cor", "context": "", "use_case": "GitHub access for AI agent", "switched_from": "", "story": "Ask HN: Who is using MCP in production?"}, {"id": 790084689, "item_id": 49380293, "url": "https://news.ycombinator.com/item?id=49380293", "by": "verdverm", "date": "2026-08-20", "stance": "neutral", "quote": "if you want to permit the GH cli for adding comments, but not merging", "excerpt": "Totally agree and this is actually on my short list. I use opencode, so one will need a custom plugin to gate tool calls. They have permission config, which I'm using to block file reads, but the orchestrator is allowed to use specific subagents for more targeted reviews, and they have file read permissions, which the main agent is abusing. Some of them can be deterministic rules, but others cannot. For example, if y", "context": "", "use_case": "agent commenting on GitHub", "switched_from": "", "story": "Every Model Cheats"}, {"id": 773295313, "item_id": 48330957, "url": "https://news.ycombinator.com/item?id=48330957", "by": "cowlby", "date": "2026-05-29", "stance": "recommend", "quote": "CLI: GitHub & AWS it already knows how to operate the CLIs well.", "excerpt": "I use all three (MCP/CLI/API) based on what Claude excels at: * CLI: GitHub & AWS it already knows how to operate the CLIs well. Even learned about a few new CLIs like 1Password's op which it volunteered one day. * MCP: Supabase, Shopify etc. where the CLI would be non-obvious and the affordances from the tools/descriptions helps Claude maneuver. * API: Sometimes it just knows an API exists and is able to call it dir", "context": "", "use_case": "driven by Claude", "switched_from": "", "story": "MCP Is Dead"}, {"id": 767006467, "item_id": 47937904, "url": "https://news.ycombinator.com/item?id=47937904", "by": "peterldowns", "date": "2026-04-28", "stance": "recommend", "quote": "The Github UI and the `gh` cli are actually really nice", "excerpt": "Yup! Still haven't switched off of Github, but considering it at this point. If you're in my shoes, here's some tools we use that help: - https://github.com/sethvargo/ratchet for pinning external Actions/Workflows to specific commit hashes - https://www.warpbuild.com/ for much faster runners (also: runs-on/namespace/buildjet/blacksmith/depot/... take your pick) - soon moving to Buildkite for orchestration of our CI j", "context": "", "use_case": "git hosting workflow", "switched_from": "", "story": "GitHub Actions is the weakest link"}, {"id": 765805168, "item_id": 47862823, "url": "https://news.ycombinator.com/item?id=47862823", "by": "a2128", "date": "2026-04-22", "stance": "warn", "quote": "I'm curious why corporate development teams always feel the need to spy on their users?", "excerpt": "Why we collect telemetry ...our team needs visibility into how features are being used in practice. We use this data to prioritize our work and evaluate whether features are meeting real user needs. I'm curious why corporate development teams always feel the need to spy on their users? Is it not sufficient to employ good engineering and design practices? Git has served us well for 20+ years without detailed analytics", "context": "", "use_case": "", "switched_from": "", "story": "GitHub CLI now collects pseudoanonymous telemetry"}, {"id": 755381296, "item_id": 47211331, "url": "https://news.ycombinator.com/item?id=47211331", "by": "Robdel12", "date": "2026-03-01", "stance": "recommend", "quote": "Thank you so much to the GH CLI for making me realize this, really.", "excerpt": "YES, I have been thinking the same and wrote a bit about it: https://vizzly.dev/blog/cli-json-output-llm-friendly/ Thank you so much to the GH CLI for making me realize this, really. The only MCPs I use still are ones that don\u2019t have CLIs. Hell, I even just wrote a CLI for Bear Notes, for LLMs. It\u2019s just better. Seems like the last MCP use case is model to model communication but I\u2019m sure others have approach\u2019s for t", "context": "", "use_case": "CLI tool for LLMs", "switched_from": "", "story": "MCP is dead. Long live the CLI"}, {"id": 740258384, "item_id": 46266149, "url": "https://news.ycombinator.com/item?id=46266149", "by": "benfrancom", "date": "2025-12-14", "stance": "recommend", "quote": "If github, take a look at gh cli or git credential manager", "excerpt": "If github, take a look at gh cli or git credential manager: https://docs.github.com/en/get-started/git-basics/caching-your-github-credentials-in-git", "context": "", "use_case": "secure GitHub authentication", "switched_from": "", "story": "Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem"}, {"id": 732835826, "item_id": 45802239, "url": "https://news.ycombinator.com/item?id=45802239", "by": "paradox460", "date": "2025-11-03", "stance": "neutral", "quote": "wrapped up the various jj and github gh cli invocations to create a PR off a branch", "excerpt": "I was doing that for a while with some CLI scripts, never really melded them together, but I had one from before I started using JJ that would make a new git branch named off a JIRA ticket, and a newer one that wrapped up the various jj and github gh cli invocations to create a PR off a branch. The jira cli util I used, go-jira, hasn't been updated to use the new Atlassian APIs, and I haven't spent too much time look", "context": "", "use_case": "creating pull requests", "switched_from": "", "story": "Git CLI tool for intelligently creating branch names"}]}