gh-ask-docs

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2025 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Ask (GitHub) Docs CLI

CI

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.

Installation

Install this extension using the GitHub CLI:

gh extension install ebonsignori/gh-ask-docs

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 enterprise-server@3.17 "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)
--debug Show raw NDJSON from the API for troubleshooting

Development

Please see development docs.

License

MIT

Documentation

Overview

Command gh-ask-docs is a GitHub CLI extension that asks the LLM at docs.github.com questions about GitHub using the provided docs.github.com AI Search API.

Build / install:

gh extension install ebonsignori/gh-ask-docs

Usage:

gh ask-docs [flags] <query>

Flags:

--version     docs version (free-pro-team, enterprise-cloud,
              or enterprise-server@<3.13-3.17>)
--sources     display reference links
--no-render   stream raw Markdown (default renders with Glamour)
--no-stream   don't stream answer, only print only when complete (stdout-friendly)
--wrap        word-wrap width when rendering (0 = no wrap)
--debug       show raw NDJSON from the API

Notes:

  • Setting `--wrap=0` prevents Glamour from splitting long URLs by passing it an extremely large wrap width.
  • When wrapping is disabled the terminal may visually wrap long lines. The spinner logic counts **visual** lines so frames clear cleanly.
  • All spinner frames and debugging data are written to STDERR so STDOUT can be safely piped.

Directories

Path Synopsis
Package ndjson provides types for handling NDJSON (Newline Delimited JSON) format.
Package ndjson provides types for handling NDJSON (Newline Delimited JSON) format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL