GitHub Copilot CLI for Beginners: Overview of common slash commands

· Source: The GitHub Blog · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Novice, medium

Summary

The GitHub Copilot CLI offers a suite of slash commands, introduced on June 15, 2026, to provide users with enhanced control over their command-line interactions. These built-in controls act as a command center, enabling users to guide Copilot's behavior, inspect changes, manage context, and efficiently navigate sessions and projects. Key commands include "/model" for switching between models based on capabilities, availability, and cost multipliers, and "/context" to monitor token usage within the context window. Users can also employ "/compact" to summarize conversations, "/clear" to reset sessions, "/resume" to access past local and remote sessions, and "/diff" to review recent project modifications. Additionally, "/cwd" allows changing the working directory, and "/reset-allowed-tools" revokes tool permissions, ensuring precise control over Copilot's actions.

Key takeaway

For AI Engineers or developers integrating GitHub Copilot CLI into your workflow, mastering slash commands is crucial for efficient project management. You should actively use commands like "/model" to select the most cost-effective and capable AI for your task, and "/context" to monitor and manage your session's token usage. Regularly employing "/compact" or "/clear" will help maintain a clean working environment, while "/cwd" enables seamless navigation across diverse repositories without exiting Copilot. Explore the full list by typing "/" in your terminal to discover further controls.

Key insights

Slash commands provide granular control over GitHub Copilot CLI, optimizing workflow and resource management.

Principles

Method

To use slash commands, type "/" in the Copilot CLI for a list of options. Select a command like "/model" to switch AI models or "/context" to check token usage. Use "/compact" to summarize or "/clear" to reset sessions.

In practice

Topics

Code references

Best for: Software Engineer, AI Engineer, AI Student

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by The GitHub Blog.