/gh-extension-tutorial

tutorial for making GitHub CLI extensions in Go

The Curious Instructional Manual For Creating GitHub CLI Extensions

This repository houses a markdown-based guide for making GitHub CLI extensions. While GitHub's official docs are a great reference and can get you started, this guide will help you step-by-step to not only start an extension from scratch but also teaches the basics of making robust CLI applications in Go and how to make the most of the go-gh library.

Intended audience

People with programming experience and familiarity with using CLI applications. Go is a scrutable language and any previous programming experience should carry over to reading and writing basic Go programs, though there are chapters in this guide on how to extend the GitHub CLI with languages other than Go.

Contents

  1. Prerequisites
  2. Introduction
  3. Designing our extension
  4. Generating scaffolding
  5. Command dispatch
  6. User Input
  7. Calling the GitHub API
  8. Output Formatting
  9. Configuration
  10. Shipping your extension
  11. Non-Go extensions: Bash example
  12. Non-Go extensions: Rust example

Author

vilmibm (Nate Smith) vilmibm@github.com