An Emacs Lisp package that puts the Aider AI pair-programming tool inside Emacs, with transient menus, code-region refactoring and prompt files.
chep/gh-copilot-chat.el
An Emacs Lisp plugin for chatting with GitHub Copilot, with code-aware prompts, buffer context, and an optional Claude CLI backend.
Open-source alternative to:GitHub Copilot Chat
- Stars
- 402
- Forks
- 45
- Open issues
- 21
- Last commit
- 24 hours ago
What is it?
gh-copilot-chat.el is an Emacs package that lets you chat with GitHub Copilot inside a buffer. You can send prompts, get answers streamed token by token with the default curl backend, and choose between org, markdown, and shell-maker frontends for the chat display.
The package is built around working with code in Emacs. You can add the current buffer, a workspace, or selected files as context that is sent with each prompt, and use commands to explain, review, document, fix, optimize, or write tests for a selected region or function. It also generates Git commit messages through Magit and can yank code blocks from answers into your buffers.
An alternative ~claude~ backend uses the Claude Code CLI instead of the Copilot API, so it does not need a GitHub account. It supports session resumption, MCP servers configured through the mcp package, and per-session tool permissions.
Key features
- 01Chat with GitHub Copilot models from a buffer, with token-by-token output via curl
- 02Add buffers, workspace files, or directories as context sent with each prompt
- 03Commands to explain, review, document, fix, optimize, and test selected code
- 04Generate Git commit messages in Magit, with a no-clobber variant
- 05Optional Claude CLI backend with session resumption and MCP server support
Use cases
- Asking Copilot to explain or review the function under point without leaving Emacs
- Generating commit messages while writing commits in Magit
- Adding a project's files as context for questions about a codebase
- Using Claude Code through Emacs when you do not have a GitHub Copilot account
Quick start
- 1
Install the package from MELPA with M-x package-install
M-x package-install RET gh-copilot-chat RET - 2
Load the package in your Emacs config
(use-package gh-copilot-chat) - 3
Open the chat buffer and start chatting; authenticate with GitHub when prompted
(gh-copilot-chat-display)
Things to know
- The default curl backend needs a GitHub account with Copilot API access.
- The claude backend requires separately installing and logging in to the Claude CLI.
In collections
Topics
FAQ
- What is gh-copilot-chat.el?
- An Emacs Lisp plugin for chatting with GitHub Copilot, with code-aware prompts, buffer context, and an optional Claude CLI backend. gh-copilot-chat.el is an Emacs package that lets you chat with GitHub Copilot inside a buffer. You can send prompts, get answers streamed token by token with the default curl backend, and choose between org, markdown, and shell-maker frontends for the chat display.
- Is gh-copilot-chat.el free to use? What license does it have?
- gh-copilot-chat.el is open source under the MIT license. Check the license terms before using it in commercial products.
- Is gh-copilot-chat.el still maintained?
- Actively maintained. The last commit to gh-copilot-chat.el was on Nov 5, 2026.
- What can I use gh-copilot-chat.el for?
- Asking Copilot to explain or review the function under point without leaving Emacs Generating commit messages while writing commits in Magit Adding a project's files as context for questions about a codebase Using Claude Code through Emacs when you do not have a GitHub Copilot account
- How do I install gh-copilot-chat.el?
- Install the package from MELPA with M-x package-install: M-x package-install RET gh-copilot-chat RET Load the package in your Emacs config: (use-package gh-copilot-chat) Open the chat buffer and start chatting; authenticate with GitHub when prompted: (gh-copilot-chat-display)
- Where can I get gh-copilot-chat.el?
- The source code and installation instructions are on GitHub: https://github.com/chep/gh-copilot-chat.el
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A modular in-buffer completion framework for GNU Emacs that shows code and text completion candidates while you type.
A minimalist vertical completion UI for Emacs that builds on the built-in completion system and works with its completion commands.
An Emacs package for using local and cloud LLMs in chat, text editing, code tasks and agent loops without leaving Emacs.
A Neovim plugin that brings GitHub Copilot Chat into the editor, with buffer, file, git diff and URL context plus optional tool calling.
A Neovim plugin that brings Cursor-style AI chat, code suggestions and one-click diff application to your editor.