github-copilot-cli
TLDR
Explain a command
$ gh copilot explain "[command]"
Suggest a command$ gh copilot suggest "[what you want to do]"
Configure Copilot CLI$ gh copilot config
Get shell alias$ gh copilot alias [bash|zsh|fish]
SYNOPSIS
gh copilot command [args]
DESCRIPTION
GitHub Copilot CLI is an AI-powered command-line assistant that explains commands and suggests shell commands based on natural language descriptions. It's a GitHub CLI extension.
The tool helps users understand complex commands and discover the right command for a task without memorizing syntax. It supports various shells and command-line tools.
PARAMETERS
explain command
Get explanation of a command.suggest description
Suggest command for task.config
Configure Copilot CLI.alias shell
Get alias configuration for shell.
USAGE EXAMPLES
$ # Explain a complex command
gh copilot explain "find . -name '*.log' -mtime +7 -delete"
# Suggest a command
gh copilot suggest "compress all jpg files in directory"
# Set up aliases for quick access
eval "$(gh copilot alias -- bash)"
# Then use: ?? "find large files"
gh copilot explain "find . -name '*.log' -mtime +7 -delete"
# Suggest a command
gh copilot suggest "compress all jpg files in directory"
# Set up aliases for quick access
eval "$(gh copilot alias -- bash)"
# Then use: ?? "find large files"
CAVEATS
Requires GitHub Copilot subscription. Needs internet connection. Suggestions may not always be accurate. Review commands before executing. Privacy considerations for command data.
HISTORY
GitHub Copilot CLI was released as a GitHub CLI extension after the success of GitHub Copilot for code. It extends AI assistance from code editors to the command line.


