gh-cli

Reference gh CLI commands for GitHub repository and workflow management.

9|1|Updated Jul 21, 2025
One-click install
npx skills add https://github.com/usepowershell/PoshMcp --skill gh-cli-usepowershell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/usepowershell/PoshMcp/tree/main/.squad/templates/skills/gh-cli
Command: npx skills add https://github.com/usepowershell/PoshMcp --skill gh-cli-usepowershell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The GitHub CLI reference centralizes command patterns, flags, and workflows so users can efficiently manage repositories, issues, pull requests, Actions, releases, gists, codespaces, and organization tasks from the terminal without switching to the web UI or guessing flags.

Core Features & Use Cases

  • Comprehensive Command Reference: Detailed coverage of gh subcommands for auth, repo, issue, pr, run, workflow, release, gist, codespace, and project operations.
  • Automation & Scripting Support: Guidance for JSON output, non-interactive flags, and examples for CI/CD and automation scripts.
  • Real-world Example: Triage issues, create a draft PR from an issue, run a workflow manually with inputs, and publish a release — all driven from terminal scripts or automation pipelines.

Quick Start

List open pull requests for owner/repo and summarize their status and reviewers.

Frequently Asked Questions about gh-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage GitHub pull requests and issues from the terminal?

You can manage GitHub pull requests and issues from the terminal by using GitHub CLI command patterns to triage, create, and review them without switching to the web UI. The reference provides specific subcommands and flags for these operations.

Can I use GitHub CLI commands for CI/CD automation and scripting?

Yes, GitHub CLI commands support CI/CD automation and scripting by utilizing JSON output and non-interactive flags. This allows you to integrate repository management, workflow runs, and release tasks directly into automated pipelines.

Do I need an installed and authenticated GitHub CLI to manage repositories via command line?

Yes, managing repositories via command line requires an installed and authenticated GitHub CLI. Once authenticated, you can execute commands for repo operations, codespaces, and gists directly from your terminal.

What is the best way to trigger GitHub Actions workflows from a script?

The best way to trigger GitHub Actions workflows from a script is using the GitHub CLI run and workflow subcommands. You can manually run workflows with specific inputs and monitor their status directly within terminal automation scripts.

How do I create a draft pull request from an existing issue using command line?

Creating a draft pull request from an existing issue using the command line involves chaining GitHub CLI subcommands for issues and pull requests. The reference supplies command patterns to extract issue data and generate the corresponding draft PR.