Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
DATA_AND_DATABASES
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

GitHub CLI Cheat Sheet

GitHub CLI Cheat Sheet

Back to Developer ToolsUpdated 2026-05-16

GitHub CLI (gh) is the official command-line tool for interacting with GitHub from your terminal, enabling repository management, issue tracking, pull request workflows, and GitHub Actions operations without leaving the command line. It eliminates context switching by bringing GitHub's web features directly to developers' terminals, supporting automation through scripting and integration with CI/CD pipelines. Unlike Git (which manages version control), GitHub CLI specifically handles GitHub platform features — issues, PRs, releases, gists, actions, and API access — while seamlessly integrating with Git workflows to provide a complete development experience from the terminal.

What This Cheat Sheet Covers

This topic spans 18 focused tables and 179 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Installation and AuthenticationTable 2: Repository ManagementTable 3: Issue ManagementTable 4: Pull Request WorkflowsTable 5: Release ManagementTable 6: Gist OperationsTable 7: GitHub Actions and WorkflowsTable 8: SSH and GPG Key ManagementTable 9: Configuration and AliasesTable 10: API Integration with jqTable 11: Output Formatting and TemplatesTable 12: Extension SystemTable 13: Codespaces ManagementTable 14: Search and BrowseTable 15: Secrets and VariablesTable 16: Labels and ProjectsTable 17: Environment VariablesTable 18: Advanced Topics

Table 1: Installation and Authentication

CommandExampleDescription
gh auth login
gh auth login
Authenticate with GitHub interactively via browser or token
• prompts for GitHub.com or Enterprise
• stores credentials securely
gh auth status
gh auth status
Display currently authenticated accounts and token scopes
• shows which user is logged in
• useful for verifying authentication state
gh auth token
gh auth token
Print the authentication token for the active account
• outputs token to stdout
• useful for scripting or debugging
gh auth refresh
gh auth refresh -s project
Add additional OAuth scopes to existing token
• re-authenticates to request expanded permissions
• required for projects, gists, or codespaces
gh auth switch
gh auth switch
Switch between multiple authenticated accounts interactively
• useful for managing personal + work accounts

More in Developer Tools

  • GitHub Actions Cheat Sheet
  • GitHub Codespaces Cheat Sheet
  • AI-LLM Code Generation Cheat Sheet
  • Docker Desktop for Developers Cheat Sheet
  • Notepad++ Cheat Sheet
  • Sublime Text Cheat Sheet
View all 55 topics in Developer Tools