Skip to main content

Command Reference

This page is a quick-reference companion to Operating Modes & Commands. Use it to look up slash commands, keyboard shortcuts, and tool approval settings.

Slash Commands

Slash commands are prefixed with / and provide quick access to CLI features without leaving the conversation. They are the primary way to control Copilot CLI behavior during an interactive session.

Discovering Commands

  • Type /help to see the full list of available commands
  • Press ctrl+x then / to run a command via keyboard shortcut
  • Commands are tab-completable. Start typing / followed by the first letters

Command Categories

CategoryCommandsPurpose
Session/clear, /session, /resume, /rename, /usageManage session lifecycle
Navigation/cwd, /cd, /add-dir, /list-dirsControl directory scope
Context/context, /compactMonitor and optimize token usage
Tools/allow-all, /yolo, /reset-allowed-toolsManage tool permissions at runtime
Review/diff, /review, /planCode review and planning workflows
Configuration/model, /mcp, /theme, /terminal-setup, /experimentalCustomize CLI behavior
Extensibility/skills, /plugin, /agentManage skills, plugins, and agents
Sharing/share, /feedbackExport sessions and submit feedback
Account/login, /logout, /userAuthentication and user management
System/help, /exit, /quit, /init, /tasks, /lsp, /update, /changelogGeneral utilities

Keyboard Shortcuts

In addition to slash commands, Copilot CLI supports keyboard shortcuts:

Full Keyboard Shortcuts
ShortcutAction
@Mention files: include file contents in context
!Execute a shell command directly (bypass Copilot; also the only way to access shell mode since v0.0.410)
EscCancel the current operation
ctrl+x → /Run a slash command
ctrl+cCancel operation / clear input / exit
ctrl+dShutdown / exit CLI on empty prompt (v0.0.410+)
ctrl+lClear the screen
ctrl+nNavigate down (alternative to down arrow, v0.0.410+)
ctrl+pNavigate up (alternative to up arrow, v0.0.410+)
ctrl+oExpand recent timeline (when no input)
ctrl+eExpand all timeline (when no input); or cycle to end of visual/logical line (v0.0.413+ overrides in edit mode)
ctrl+tToggle model reasoning display
ctrl+aCycle to beginning of visual line; repeated press goes to beginning of logical line (v0.0.413+)
ctrl+uDelete to beginning of logical line (v0.0.413+)
ctrl+yEdit plan in terminal editor (v0.0.412+)
ctrl+x → ctrl+eEdit prompt in terminal editor (v0.0.412+)
ctrl+zSuspend/resume CLI (Unix platforms only, v0.0.410+)
ctrl+insertCopy selected text in alt-screen mode (v0.0.413+)
Home / EndNavigate within visual line (v0.0.415+)
ctrl+Home / ctrl+EndJump to text boundaries (v0.0.415+)
Shift+TabCycle through modes: (suggest) ⟷ (normal) since v0.0.410; use ! for shell mode
Shift+EnterInsert newline in prompt (requires kitty keyboard protocol, v0.0.410+)
Page Up / Page DownScroll in alt-screen mode (v0.0.410+)
Double-clickSelect word in alt-screen mode (v0.0.412+)
Triple-clickSelect line in alt-screen mode (v0.0.412+)
warning

Some keyboard shortcuts require specific terminal capabilities:

  • Shift+Enter for newlines requires terminals with kitty keyboard protocol support
  • Ctrl+Z suspend/resume works on Unix platforms only
  • Page Up/Down, Double/Triple-click require alt-screen mode support
  • Ctrl+Y and Ctrl+X Ctrl+E require a terminal editor (set via $EDITOR or $VISUAL)

Key Commands Not Covered in Other Modules

Some commands are covered in depth in later modules (/mcp in Module 6, /skills in Module 7, /plugin in Module 8, /context and /compact in Module 11). The following important commands are unique to this section:

CommandDescription
/plan [prompt]Ask Copilot to create an implementation plan before writing code
/review [prompt]Run a code review agent to analyze changes
/diffReview all changes made in the current directory during the session
/initInitialize Copilot instructions and agentic features for a repository
/tasksView and manage background tasks (subagents, shell sessions)
/rename <name>Rename the current session for easy identification
/theme [show|set|list]View or configure the terminal color theme
/terminal-setupConfigure terminal for multiline input support (shift+enter)
/lspView configured Language Server Protocol servers
/user [show|list|switch]Manage GitHub user list (multi-account support)
/updateView update instructions for the latest Copilot CLI version
/changelogView the changelog for recent Copilot CLI releases

Tool Approval Reference

Approval Options Explained

OptionBehaviorRisk Level
YesAllow this one timeLow - Full control
Yes, for sessionAllow all similar for sessionMedium - Review first use
NoDeny and redirectNone - Maximum safety

Dangerous Commands to Watch

⚠️ Be careful approving session-wide permissions for:

  • rm - File deletion
  • chmod - Permission changes
  • git push - Pushing to remote
  • sudo - Elevated privileges
  • Network commands - Data exfiltration risk

Safe Commands for Session Approval

Generally safe for session-wide approval:

  • ls, cat, head, tail - Read-only
  • git status, git log, git diff - Read-only git
  • pwd, echo - Environment queries
  • Linters and formatters - Analysis only

Summary

  • Slash commands provide quick access to CLI features via /command syntax
  • Keyboard shortcuts offer fast navigation and control (e.g., @ for files, ! for shell)
  • Tool approval has one-time and session-wide options
  • Be cautious with session-wide approval for destructive commands
  • Use /help to discover all available commands at any time

References