Using `gh` commands on the command line, bash, or zsh

Use GitHub CLI commands in bash or zsh with --body-file for multi-line text.

1|Updated Jan 9, 2024
One-click install
npx skills add https://github.com/rickypowell/dotfiles --skill using-gh-commands-on-the-command-line-bash-or-zsh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Using `gh` commands on the command line, bash, or zsh
Source: https://github.com/rickypowell/dotfiles/tree/main/opencode/.config/opencode/skills/gh
Command: npx skills add https://github.com/rickypowell/dotfiles --skill using-gh-commands-on-the-command-line-bash-or-zsh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you manage GitHub command-line operations more effectively, especially when dealing with multi-line descriptions or comments.

Core Features & Use Cases

  • Efficient Command Usage: Learn best practices for using the gh CLI.
  • Handling Multi-line Text: Understand how to use --body-file for cleaner output on GitHub's website.
  • Use Case: When creating a pull request with a detailed description, use this Skill to ensure your formatting is preserved correctly.

Quick Start

Use the gh skill to create a new issue with a detailed description from a file.

Frequently Asked Questions about Using `gh` commands on the command line, bash, or zsh

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

FAQPage Schema
How do I format multi-line text when creating a pull request with the GitHub CLI?▼

To format multi-line text when creating a pull request with the GitHub CLI, use the --body-file flag instead of --body. This ensures your complex descriptions and formatting are preserved correctly on the GitHub website.

Why does my GitHub CLI issue description lose formatting on the web interface?▼

Your GitHub CLI issue description loses formatting because the --body flag struggles with multi-line text. Using the --body-file flag resolves this by passing the description from a file, preserving the formatting.

What is the best way to manage GitHub command-line operations in bash or zsh?▼

The best way to manage GitHub command-line operations in bash or zsh is using the gh CLI with file-based inputs. Passing complex descriptions via --body-file ensures clean output and preserved formatting on GitHub.

Can I use the gh CLI to create issues with detailed descriptions from a file?▼

Yes, you can use the gh CLI to create issues with detailed descriptions from a file. This skill recommends using the --body-file flag over --body to efficiently handle complex multi-line descriptions in bash or zsh environments.

When do I need to use --body-file instead of --body for gh commands?▼

You need to use --body-file instead of --body for gh commands when your issue or pull request contains multi-line text. This approach addresses formatting challenges and ensures the output renders correctly on GitHub's web interface.