Skip to content

A tool to ease the use of GitHub Copilot in a CLI.

Notifications You must be signed in to change notification settings

rachartier/copilot-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Copilot CLI

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.

Features

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/copilot-cli.git
    cd copilot-cli
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. You need need to already be connected to GitHub Copilot by VsCode, Neovim or any other IDE that supports Copilot.

Usage

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"

Arguments

  • --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 in ActionManager).

Example

python copilot-cli.py --prompt "Explain the concept of recursion"

Actions

python copilot-cli.py --action "gitignore" --prompt "Write a gitignore for Python" --path "/path/to/project"

Acknowledgements

About

A tool to ease the use of GitHub Copilot in a CLI.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages