Awesome
<img align="center" height="70" src="./Docs/AppIcon.png"/> GitHub Copilot for Xcode
<img alt="Demo of GitHub Copilot for Xcode" src="./Docs/demo.gif" width="800" />GitHub Copilot is an AI pair programmer tool that helps you write code faster and smarter. Copilot for Xcode is an Xcode extension that provides inline coding suggestions as you type.
Beta Preview Policy
Use of the GitHub Copilot Xcode Extension is subject to GitHub's Pre-Release Terms. We want to remind you that:
Beta Previews may not be supported or may change at any time. You may receive confidential information through those programs that must remain confidential while the program is private. We'd love your feedback to make our Beta Previews better.
Requirements
- macOS 12+
- Xcode 8+
- A GitHub Copilot subscription. To learn more, visit https://github.com/features/copilot.
Getting Started
-
Install via Homebrew:
brew install --cask github-copilot-for-xcode
Or download the
<p align="center"> <img alt="Screenshot of opened dmg" src="./Docs/dmg-open.png" width="512" /> </p>dmg
from the latest release. DragGitHub Copilot for Xcode
into theApplications
folder:Updates can be downloaded and installed by the app.
-
A background item will be added to enable Copilot to start when Xcode is opened.
<p align="center"> <img alt="Screenshot of background item" src="./Docs/background-item.png" width="370" /> </p> -
Two permissions are required:
Accessibility
andXcode Source Editor Extension
. For more on why these permissions are required see TROUBLESHOOTING.md.The first time the application is run the
<p align="center"> <img alt="Screenshot of accessibility permission request" src="./Docs/accessibility-permission-request.png" width="529" /> </p>Accessibility
permission should be requested:The
<p align="center"> <img alt="Screenshot of extension permission" src="./Docs/extension-permission.png" width="582" /> </p>Xcode Source Editor Extension
permission needs to be enabled manually. ClickExtension Permission
from theCopilot for Xcode
settings to open the System Preferences to theExtensions
panel. SelectXcode Source Editor
and enableGitHub Copilot
: -
After granting the extension permission, please restart Xcode to ensure the
<p align="center"> <img alt="Screenshot of Xcode Editor GitHub Copilot menu item" src="./Docs/xcode-menu.png" width="648" /> </p>Github Copilot
menu is available and not disabled under the XcodeEditor
menu. <br>Keyboard shortcuts can be set for all menu items in the
Key Bindings
section of Xcode preferences. -
To sign into GitHub Copilot, click the
<p align="center"> <img alt="Screenshot of sign-in popup" src="./Docs/device-code.png" width="372" /> </p>Sign in
button in the settings application. This will open a browser window and copy a code to the clipboard. Paste the code into the GitHub login page and authorize the application. -
To install updates, click
Check for Updates
from the menu item or in the settings application.After installing a new version, Xcode must be restarted to use the new version correctly.
New versions can also be installed from
dmg
files downloaded from the releases page. When installing a new version viadmg
, the application must be run manually the first time to accept the downloaded from the internet warning. -
To avoid confusion, we recommend disabling
Predictive code completion
underXcode
>Preferences
>Text Editing
>Editing
. -
Press
<p align="center"> <img alt="Screenshot of welcome screen" src="./Docs/welcome.png" width="672" /> </p>tab
to accept the first line of a suggestion, holdoption
to view the full suggestion, and pressoption
+tab
to accept the full suggestion.
License
This project is licensed under the terms of the MIT open source license. Please refer to LICENSE.txt for the full terms.
Privacy
We follow responsible practices in accordance with our Privacy Statement.
To get the latest security fixes, please use the latest version of the GitHub Copilot for Xcode.
Support
We’d love to get your help in making GitHub Copilot better! If you have feedback or encounter any problems, please reach out on our Feedback forum.
Acknowledgements
Thank you to @intitni for creating the original project that this is based on.
Attributions can be found under About when running the app or in Credits.rtf.