In this demo, GitHub showcases how to use the /share command in GitHub Copilot CLI. Author GitHub walks through exporting session data, model selection options, and visualizing routing for Next.js—all from the terminal.

How to Use the /share Command in GitHub Copilot CLI

Presented by GitHub, this demo explores practical ways developers can enhance collaboration using the GitHub Copilot CLI’s sharing features.

Key Highlights

  • /share Command: Learn how to export your Copilot CLI conversation logs and diagrams directly to a GitHub gist, making it easy to share insights with your team.
  • Model Selection: The CLI allows you to choose among different advanced models including Claude Opus and Sonnet, providing flexibility for diverse coding scenarios.
  • Next.js Routing Visualization: See how you can visualize routing structures for Next.js projects directly within your terminal session, giving immediate insight into project architecture.

Practical Steps

  1. Exporting Sessions
    • Use the /share command in GitHub Copilot CLI to generate a gist containing your session history and diagrams.
    • Share the generated gist URL with teammates for collaboration or reference.
  2. Choosing AI Models
    • Switch between models like Claude Opus and Sonnet based on context and desired output quality or speed.
    • Model selection is performed via specific CLI flags or commands during your Copilot session.
  3. Visualizing Next.js Routing
    • The CLI can display routing diagrams of Next.js applications within the terminal, aiding in code navigation and architecture understanding.

Additional GitHub Resources

About GitHub

GitHub is a platform for over 180 million developers to create, share, and ship software globally. Learn more at github.com.