Usage: copilot [options] [command]
GitHub Copilot CLI - An AI-powered coding assistant
Options:
--add-dir <directory> Add a directory to the allowed list for file access (can be used multiple times)
--allow-all-tools Allow all tools to run automatically without confirmation; required for non-interactive mode (env: COPILOT_ALLOW_ALL)
--allow-tool [tools...] Allow specific tools
--banner Always show the animated banner on startup
--deny-tool [tools...] Deny specific tools, takes precedence over --allow-tool or --allow-all-tools
--disable-mcp-server <server-name> Disable a specific MCP server (can be used multiple times)
-h, --help display help for command
--log-dir <directory> Set log file directory (default: ~/.copilot/logs/)
--log-level <level> Set the log level (error, warning, info, debug, all, default, none)
--no-color Disable all color output
-p, --prompt <text> Execute a prompt directly without interactive mode
--resume [sessionId] Resume from a previous session (optionally specify session ID)
--screen-reader Enable screen reader optimizations
-v, --version show version information
Commands:
help [topic] Display help information
Help Topics:
config Configuration Settings
environment Environment Variables
logging Logging
permissions Tool Permissions
Examples:
# Start interactive mode
$ copilot
# Execute a prompt directly
$ copilot -p "Fix the bug in main.js" --allow-all-tools
# Resume the latest session
$ copilot --resume
# Resume a specific session by ID
$ copilot --resume session-id
# Resume with auto-approval
$ copilot --allow-all-tools --resume
# Show the animated banner
$ copilot --banner
# Set logging to ./logs
$ copilot --log-dir ./logs
# Enable debug level logging
$ copilot --log-level debug
# Allow access to additional directory
$ copilot --add-dir /home/user/projects
# Allow multiple directories
$ copilot --add-dir ~/workspace --add-dir /tmp
# Allow touch commands
$ copilot --allow-tool 'shell(touch)'
# Deny git push commands
$ copilot --deny-tool 'shell(git push)'
# Allow all file editing
$ copilot --allow-tool 'write'
# Allow all but one specific tool from MCP server with name "MyMCP"
$ copilot --deny-tool 'MyMCP(denied_tool)' --allow-tool 'MyMCP'
Interactive Mode Commands:
/add-dir <directory> Add a directory to the allowed list for file access
/clear Clear chat history on the screen
/cwd [directory] Change working directory or show current directory
/exit Exit the CLI
/feedback Provide feedback about the CLI
/help Show help for interactive commands
/list-dirs Display all allowed directories for file access
/login Log in to Copilot
/logout Log out of Copilot
/mcp [show|add|edit|delete|disable|enable] [server-name] Manage MCP server configuration
/reset-allowed-tools Reset the list of allowed tools
/session Show information about the current CLI session
/theme [show|set|list] [auto|dark|light] View or configure terminal theme
/user [show|list|switch] Manage GitHub user list
-
-
Save simonw/bc739b8c67aa6e7a5f4f519942e66671 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment