Repolode
intitni

intitni/CopilotForXcode

An Xcode Source Editor Extension that adds GitHub Copilot, Codeium and ChatGPT code suggestions, chat and code modification to Xcode.

Open-source alternative to:GitHub Copilot

Stars
8,203
Forks
428
Open issues
36
Last commit
14 days ago

What is it?

Copilot for Xcode is a Source Editor Extension for Apple's Xcode IDE. It brings GitHub Copilot and Codeium code suggestions into the editor, and connects ChatGPT and other LLMs for a chat panel and for natural-language code modification.

The suggestion feature shows completions based on the open files, either near the text cursor or in a floating widget. Chat can use the selected code, file path, editor errors and cursor position as context. Prompt to Code lets you rewrite selected code from a natural-language instruction.

Users can define custom commands with prompt templates that run in chat or modification, and can reference variables such as the selected code, editor language and clipboard. A background helper app handles the work while Xcode runs.

Key features

  • 01Real-time code suggestions from GitHub Copilot or Codeium
  • 02Chat panel with ChatGPT and other LLMs, aware of the selected code
  • 03Prompt to Code for rewriting selected code from natural language
  • 04Custom commands with template variables for chat and modification
  • 05Files listed in .gitignore are excluded from suggestions

Use cases

  • Getting AI code completions while writing Swift or Objective-C in Xcode
  • Asking questions about selected code or editor errors without leaving Xcode
  • Refactoring, documenting or translating strings in a selected block of code
  • Building reusable AI prompts as custom menu commands for a team's workflow

Quick start

  1. 1

    Install the app with Homebrew

    brew install --cask copilot-for-xcode
  2. 2

    Open the app once so it sets up its background service, then enable the Xcode Source Editor extension in System Settings

  3. 3

    Grant Accessibility API permission to CopilotForXcodeExtensionService.app

  4. 4

    Set up GitHub Copilot, Codeium, or an OpenAI model in the host app

Things to know

  • Requires Xcode and macOS, since it is an Xcode Source Editor Extension.
  • Chat and prompt-to-code features need a valid OpenAI API key or other LLM access.
  • Suggestions need an active GitHub Copilot subscription or a Codeium account, and Node.js for Copilot.
  • It requires Accessibility API permission, which the README notes can be a concern for key logging.

In collections

Topics

FAQ

What is CopilotForXcode?
An Xcode Source Editor Extension that adds GitHub Copilot, Codeium and ChatGPT code suggestions, chat and code modification to Xcode. Copilot for Xcode is a Source Editor Extension for Apple's Xcode IDE. It brings GitHub Copilot and Codeium code suggestions into the editor, and connects ChatGPT and other LLMs for a chat panel and for natural-language code modification.
Is CopilotForXcode free to use? What license does it have?
CopilotForXcode is open source under the MIT license. Check the license terms before using it in commercial products.
Is CopilotForXcode still maintained?
Actively maintained. The last commit to CopilotForXcode was on Oct 24, 2026.
What can I use CopilotForXcode for?
Getting AI code completions while writing Swift or Objective-C in Xcode Asking questions about selected code or editor errors without leaving Xcode Refactoring, documenting or translating strings in a selected block of code Building reusable AI prompts as custom menu commands for a team's workflow
How do I install CopilotForXcode?
Install the app with Homebrew: brew install --cask copilot-for-xcode Open the app once so it sets up its background service, then enable the Xcode Source Editor extension in System Settings Grant Accessibility API permission to CopilotForXcodeExtensionService.app Set up GitHub Copilot, Codeium, or an OpenAI model in the host app
Where can I get CopilotForXcode?
The source code and installation instructions are on GitHub: https://github.com/intitni/CopilotForXcode

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects