Copilot CLI is a command-line interface for interacting with GitHub Copilot's chat functionality. This tool allows users to send prompts to Copilot, specify models, and perform predefined actions.
- Send custom prompts to GitHub Copilot.
- Specify different models for chat completion.
- Use system prompts to guide the conversation.
- Perform predefined actions with customizable commands.
- Output responses to stdout or handle them with custom callbacks.
-
Clone the repository:
git clone https://github.com/yourusername/copilot-cli.git cd copilot-cli
-
Install the required dependencies:
pip install -r requirements.txt
-
You need need to already be connected to GitHub Copilot by VsCode, Neovim or any other IDE that supports Copilot.
To use the Copilot CLI, run the copilot-cli.py
script with the desired arguments:
python copilot-cli.py --prompt "Your prompt here" --model "gpt-4o"
--path
: Path to run the action in (default:.
).--prompt
: Prompt to send to Copilot Chat.--model
: Model to use for the chat (default:gpt-4
).--system_prompt
: System prompt to send to Copilot Chat.--action
: Action to perform (choices are defined inActionManager
).
python copilot-cli.py --prompt "Explain the concept of recursion"
python copilot-cli.py --action "gitignore" --prompt "Write a gitignore for Python" --path "/path/to/project"