Skip to content

Ebonsignori/gh-ask-docs

Repository files navigation

Ask (GitHub) Docs CLI

Test and Lint

A CLI Extension for the GitHub CLI that lets you ask an LLM questions about GitHub using the official GitHub documentation.

Questions are answered by the AI search API provided by docs.github.com.

Demonstration of asking gh ask-docs a question and getting a streamed response.

Installation

Install this extension using the GitHub CLI:

gh extension install ebonsignori/gh-ask-docs

Prerequisites

You'll need the GitHub CLI installed first:

Usage

gh ask-docs [flags] <query>

Examples

Ask a basic question:

gh ask-docs "How do I create a pull request?"

Get sources with your answer:

gh ask-docs --sources "What are GitHub Actions?"

Query for Enterprise Server documentation:

gh ask-docs --version [email protected] "How to configure SAML?"

Stream raw markdown without rendering:

gh ask-docs --no-render "Git workflow best practices"

Query without streaming the response:

gh ask-docs --no-stream "How do I add GitHub Copilot to my IDE?"

Flags

Flag Description
--version Docs version (free-pro-team, enterprise-cloud, or enterprise-server@<3.13-3.17>)
--sources Display reference links after the answer
--no-render Stream raw Markdown without Glamour rendering
--no-stream Don't stream answer, print only when complete (stdout-friendly)
--wrap Word-wrap width when rendering (0 = no wrap)
--theme Color theme: auto (default), light, dark
--debug Show raw NDJSON from the API for troubleshooting

Development

Please see development docs.

License

MIT

About

A `gh` CLI extension for asking an LLM questions about GitHub from your terminal.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •