# How to use the /share command in GitHub Copilot CLI | Demo

Source: https://www.youtube.com/watch?v=E17SXyL53w4
Recap page: https://rapidrecap.app/video/E17SXyL53w4
Generated: 2026-02-02T15:35:11.101+00:00

---
## Quick Overview

The GitHub Copilot CLI's /share command allows users to export the entire recorded session, including user prompts, Copilot reasoning, and generated content, to a secret GitHub Gist for later review or sharing, as demonstrated by sharing an entire session that produced an ASCII architecture diagram for a Next.js codebase.

**Key Points:**
- The demonstration focuses on using the GitHub Copilot CLI, specifically showing version 0.0.382 and utilizing the Claude Opus 4.5 model.
- The user initially asks Copilot to generate an ASCII architecture diagram for the Hanselminutes Admin codebase to understand its structure, which Copilot successfully produces.
- The session context reveals that the codebase uses Next.js, TypeScript, and involves features like API routes, middleware for auth checks, and external services like Azure Blob Storage and RSS Feed.
- After generating the diagram and providing key concepts, the user requests to share the entire session using the `/share [file|gist] [path]` command, opting for a secret Gist.
- The session sharing confirms success, providing a GitHub Gist URL, and then displays usage statistics like total duration (2m 46.333s wall time) and model usage (Claude-opus-4.5).
- The video concludes by showing the user installing the GitHub Copilot CLI tool itself using Winget on Windows: `winget install github.copilot`.

![Screenshot at 00:07: The initial launch screen of the GitHub Copilot CLI, showing connection status, logged-in user \('shanselman'\), and the currently selected AI model \('claude-opus-4.5 \(3x\)'\) before the user issues their first prompt.](https://ss.rapidrecap.app/screens/E17SXyL53w4/00-00-07.jpg)

**Context:** Scott Hanselman demonstrates the GitHub Copilot Command Line Interface (CLI), focusing on its ability to interpret and visualize codebases, specifically in the context of a Next.js application called 'Hanselminutes Admin'. The demonstration involves using Copilot to explore the project structure and generate an architectural overview, setting the stage for showcasing the utility of sharing the entire interactive session history.

## Detailed Analysis

The video demonstrates the GitHub Copilot CLI, version 0.0.382, running on a system configured with Claude Opus 4.5 as the AI agent. The host starts by asking Copilot to create an ASCII architecture diagram for the 'Hanselminutes Admin' codebase, which is a Next.js/TypeScript backend application. Copilot first explores the directory structure, listing files found in key directories like 'src', 'src/app', 'src/services', and 'src/components'. It then generates a detailed, multi-layered ASCII diagram illustrating the structure, data flow (Browser -> Middleware -> Page/API Route -> Service -> External Services), and key concepts like Mini-Apps Pattern, API Routes, and Layouts. Following this, the user requests an expansion on routing, which leads Copilot to generate a detailed diagram focusing specifically on Next.js App Router conventions (page.tsx for UI, route.ts for API endpoints, layout.tsx for shared UI). Finally, the host executes the `/share [file|gist] [path]` command, choosing to share the session as a secret Gist, which is confirmed with a URL and usage statistics (Total duration: 2m 46.333s wall time). The session concludes with the host showing how to install the Copilot CLI itself using `winget install github.copilot` on Windows.

### Initial Setup and Model Selection

- Initializing Copilot CLI (v0.0.382)
- Authenticating as user 'shanselman'
- Selecting Claude Opus 4.5 as the default model

### Codebase Exploration and Diagram Generation

- User requests an ASCII architecture diagram for the Hanselminutes Admin codebase
- Copilot explores the file structure via directory listing commands
- Copilot generates a high-level architecture diagram detailing backend components, data flow, and key concepts

### Deep Dive into Routing

- User requests expansion on Next.js App Router routing
- Copilot produces a detailed diagram mapping folder paths to URLs and showing key file roles (page.tsx, route.ts, layout.tsx, middleware.ts)

### Session Sharing and Metrics

- User executes `/share gist` to save the entire session to a secret GitHub Gist
- Session summary shows 6 estimated premium requests and a total wall time duration of 2m 46.333s

### Tool Installation

- The demonstration concludes with instructions for installing the Copilot CLI tool on different platforms, specifically showing the Windows command `winget install github.copilot`.

![Screenshot at 00:05: The initial welcome screen of the GitHub Copilot CLI, displaying the logo, version 0.0.382, and a summary of its capabilities \(write, test, debug code from the terminal\).](https://ss.rapidrecap.app/screens/E17SXyL53w4/00-00-05.jpg)
![Screenshot at 00:13: Copilot displaying the list of available AI models, showing Claude Opus 4.5 is currently selected \(marked with a checkmark\) out of options like Claude Sonnet and various GPT models.](https://ss.rapidrecap.app/screens/E17SXyL53w4/00-00-13.jpg)
![Screenshot at 00:37: The user prompts Copilot to create an ASCII architecture diagram for the codebase, indicating the need for contextual understanding.](https://ss.rapidrecap.app/screens/E17SXyL53w4/00-00-37.jpg)
![Screenshot at 01:01: Copilot generates the first ASCII architecture diagram for the Hanselminutes Admin Backend, showing the flow from Browser through middleware, app router, and into specific modules like /auth, /dashboard, and /tools.](https://ss.rapidrecap.app/screens/E17SXyL53w4/00-01-01.jpg)
![Screenshot at 02:28: The command line showing the user executing the /share gist command and the resulting confirmation message, including the secret Gist URL.](https://ss.rapidrecap.app/screens/E17SXyL53w4/00-02-28.jpg)
