GitHub CLI · API Governance Rules
GitHub CLI API Rules
Spectral linting rules defining API design standards and conventions for GitHub CLI.
0 Rules
Spectral Ruleset
x-aid: github-cli:rules
x-name: GitHub CLI Rules
description: Rules and operational guidance for using the GitHub CLI (gh).
rules:
- name: Authentication Required
description: Most commands require an authenticated session via gh auth login.
- name: Token Scopes
description: Operations are gated by the OAuth scopes granted to the active token.
- name: Default Host
description: Defaults to github.com; use --hostname or GH_HOST for GitHub Enterprise.
- name: Output Formats
description: Many commands support --json with --jq for machine-readable output.
- name: Editor Integration
description: Interactive commands open the editor defined by GH_EDITOR or VISUAL/EDITOR.
- name: Pager Control
description: Output paging is controlled by GH_PAGER and the PAGER environment variable.
- name: Open Source License
description: Distributed under the MIT License at github.com/cli/cli.
- name: Extensibility
description: Extensions live under gh-* namespace and are managed via gh extension install.
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for spectral rules
4 MCP tools reach this
find_rulesBrowse and filter every ruleset in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/github-cli-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.