-
Notifications
You must be signed in to change notification settings - Fork 711
Improve and reformat README.md for clarity, accessibility, and user… #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,148 +1,202 @@ | ||
# <img align="center" height="70" src="./Docs/AppIcon.png"/> GitHub Copilot for Xcode | ||
|
||
[GitHub Copilot](https://github.com/features/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 and a chat assistant to answer your coding questions. | ||
[GitHub Copilot](https://github.com/features/copilot) is an AI pair programmer that helps you write code faster and smarter. Copilot for Xcode is an Xcode extension that provides inline coding suggestions as you type and a chat assistant to answer your coding questions. | ||
|
||
## Chat | ||
--- | ||
|
||
GitHub Copilot Chat provides suggestions to your specific coding tasks via chat. | ||
<img alt="Chat of GitHub Copilot for Xcode" src="./Docs/chat_dark.gif" width="800" /> | ||
## Table of Contents | ||
|
||
## Code Completion | ||
- [Features](#features) | ||
- [Requirements](#requirements) | ||
- [Quick Start](#quick-start) | ||
- [Getting Started](#getting-started) | ||
- [How to Use Chat](#how-to-use-chat) | ||
- [How to Use Code Completion](#how-to-use-code-completion) | ||
- [Keyboard Shortcuts](#keyboard-shortcuts) | ||
- [Troubleshooting](#troubleshooting) | ||
- [License](#license) | ||
- [Privacy](#privacy) | ||
- [Support](#support) | ||
- [Acknowledgements](#acknowledgements) | ||
|
||
You can receive auto-complete type suggestions from GitHub Copilot either by starting to write the code you want to use, or by writing a natural language comment describing what you want the code to do. | ||
<img alt="Code Completion of GitHub Copilot for Xcode" src="./Docs/demo.gif" width="800" /> | ||
--- | ||
|
||
## Features | ||
|
||
### Chat | ||
GitHub Copilot Chat provides suggestions for your specific coding tasks via a conversational interface. | ||
|
||
 | ||
|
||
### Code Completion | ||
Receive AI-powered auto-complete suggestions from GitHub Copilot by starting to write code or by describing your intent in a natural language comment. | ||
|
||
 | ||
|
||
--- | ||
|
||
## Requirements | ||
|
||
- macOS 12+ | ||
- Xcode 8+ | ||
- A GitHub Copilot subscription. To learn more, visit [https://github.com/features/copilot](https://github.com/features/copilot). | ||
- macOS 12 or higher | ||
- Xcode 8 or higher | ||
- A [GitHub Copilot subscription](https://github.com/features/copilot) | ||
|
||
--- | ||
|
||
## Quick Start | ||
|
||
1. **Install via Homebrew:** | ||
```sh | ||
brew install --cask github-copilot-for-xcode | ||
``` | ||
*Or* download the `.dmg` from the [latest release](https://github.com/github/CopilotForXcode/releases/latest/download/GitHubCopilotForXcode.dmg) and drag **GitHub Copilot for Xcode** into your **Applications** folder. | ||
|
||
2. **Open the app** and accept any security warnings. | ||
|
||
3. **Grant permissions** (Background, Accessibility, and Xcode Source Editor Extension) when prompted. | ||
|
||
4. **Enable the extension** in System Preferences > Extensions > Xcode Source Editor. | ||
|
||
5. **Open Xcode** and verify the **GitHub Copilot** menu under the Xcode **Editor** menu. | ||
|
||
6. **Sign in to GitHub Copilot** via the app settings. | ||
|
||
--- | ||
|
||
## Getting Started | ||
|
||
1. Install via [Homebrew](https://brew.sh/): | ||
### 1. Installation | ||
|
||
- Install via [Homebrew](https://brew.sh/), or | ||
- Download the `.dmg` from [the latest release](https://github.com/github/CopilotForXcode/releases/latest/download/GitHubCopilotForXcode.dmg) and drag it into your Applications folder. | ||
|
||
Comment on lines
+46
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The document currently has both a “Quick Start” and a “Getting Started” section covering setup steps. Consider consolidating or clearly differentiating these sections to avoid redundancy and user confusion. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
 | ||
|
||
- Updates can be downloaded and installed by the app. | ||
|
||
### 2. Running the Application | ||
|
||
- Open **GitHub Copilot for Xcode** from Applications. | ||
- Accept the security warning. | ||
 | ||
|
||
- A background item will be added automatically. | ||
 | ||
|
||
```sh | ||
brew install --cask github-copilot-for-xcode | ||
``` | ||
### 3. Permissions | ||
|
||
Or download the `dmg` from | ||
[the latest release](https://github.com/github/CopilotForXcode/releases/latest/download/GitHubCopilotForXcode.dmg). | ||
Drag `GitHub Copilot for Xcode` into the `Applications` folder: | ||
- **Three permissions** are required: Background, Accessibility, and Xcode Source Editor Extension. | ||
- The first time the app runs, you will be prompted for Accessibility permission: | ||
 | ||
|
||
<p align="center"> | ||
<img alt="Screenshot of opened dmg" src="./Docs/dmg-open.png" width="512" /> | ||
</p> | ||
- Enable the Xcode Source Editor Extension manually: | ||
- Click **Extension Permission** from the app settings. | ||
- Go to System Preferences > Extensions > Xcode Source Editor, and enable **GitHub Copilot**. | ||
 | ||
|
||
Updates can be downloaded and installed by the app. | ||
### 4. Enabling in Xcode | ||
|
||
1. Open the `GitHub Copilot for Xcode` application (from the `Applications` folder). Accept the security warning. | ||
<p align="center"> | ||
<img alt="Screenshot of MacOS download permission request" src="./Docs/macos-download-open-confirm.png" width="350" /> | ||
</p> | ||
- Open Xcode and make sure the **GitHub Copilot** menu is available and enabled under the Xcode **Editor** menu. | ||
 | ||
|
||
- Keyboard shortcuts can be set for all menu items in Xcode preferences under **Key Bindings**. | ||
|
||
1. A background item will be added to enable the GitHub Copilot for Xcode extension app to connect to the host app. This permission is usually automatically added when first launching the app. | ||
<p align="center"> | ||
<img alt="Screenshot of background item" src="./Docs/background-item.png" width="370" /> | ||
</p> | ||
### 5. Signing In | ||
|
||
1. Three permissions are required for GitHub Copilot for Xcode to function properly: `Background`, `Accessibility`, and `Xcode Source Editor Extension`. For more details on why these permissions are required see [TROUBLESHOOTING.md](./TROUBLESHOOTING.md). | ||
- Click **Sign in** in the app settings. | ||
- A browser window will open and a code will be copied to your clipboard. Paste the code into the GitHub login page. | ||
 | ||
|
||
The first time the application is run the `Accessibility` permission should be requested: | ||
### 6. Updating | ||
|
||
<p align="center"> | ||
<img alt="Screenshot of accessibility permission request" src="./Docs/accessibility-permission-request.png" width="529" /> | ||
</p> | ||
- To install updates, click **Check for Updates** in the menu or app settings. | ||
- After updating, restart Xcode for the changes to take effect. | ||
- New versions can also be installed via `.dmg` from the releases page. | ||
|
||
The `Xcode Source Editor Extension` permission needs to be enabled manually. Click | ||
`Extension Permission` from the `GitHub Copilot for Xcode` application settings to open the | ||
System Preferences to the `Extensions` panel. Select `Xcode Source Editor` | ||
and enable `GitHub Copilot`: | ||
### 7. Xcode Preferences | ||
|
||
<p align="center"> | ||
<img alt="Screenshot of extension permission" src="./Docs/extension-permission.png" width="582" /> | ||
</p> | ||
> **Note:** To avoid conflicts, disable **Predictive code completion**: | ||
> Xcode > Preferences > Text Editing > Editing | ||
|
||
1. After granting the extension permission, open Xcode. Verify that the | ||
`Github Copilot` menu is available and enabled under the Xcode `Editor` | ||
menu. | ||
<br> | ||
<p align="center"> | ||
<img alt="Screenshot of Xcode Editor GitHub Copilot menu item" src="./Docs/xcode-menu.png" width="648" /> | ||
</p> | ||
### 8. Using Suggestions | ||
|
||
Keyboard shortcuts can be set for all menu items in the `Key Bindings` | ||
section of Xcode preferences. | ||
- Press `Tab` to accept the first line of a suggestion. | ||
- Hold `Option` to view the full suggestion. | ||
- Press `Option + Tab` to accept the full suggestion. | ||
 | ||
|
||
1. To sign into GitHub Copilot, click the `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. | ||
<p align="center"> | ||
<img alt="Screenshot of sign-in popup" src="./Docs/device-code.png" width="372" /> | ||
</p> | ||
--- | ||
|
||
1. To install updates, click `Check for Updates` from the menu item or in the | ||
settings application. | ||
## How to Use Chat | ||
|
||
After installing a new version, Xcode must be restarted to use the new | ||
version correctly. | ||
- Open Copilot Chat in Xcode via: | ||
- **Xcode → Editor → GitHub Copilot → Open Chat** | ||
 | ||
- Or via the **GitHub Copilot app menu → Open Chat** | ||
 | ||
|
||
New versions can also be installed from `dmg` files downloaded from the | ||
releases page. When installing a new version via `dmg`, the application must | ||
be run manually the first time to accept the downloaded from the internet | ||
warning. | ||
--- | ||
|
||
1. To avoid confusion, we recommend disabling `Predictive code completion` under | ||
`Xcode` > `Preferences` > `Text Editing` > `Editing`. | ||
## How to Use Code Completion | ||
|
||
1. Press `tab` to accept the first line of a suggestion, hold `option` to view | ||
the full suggestion, and press `option` + `tab` to accept the full suggestion. | ||
- Press `Tab` to accept the first line of a suggestion. | ||
- Hold `Option` to view the full suggestion. | ||
- Press `Option + Tab` to accept the full suggestion. | ||
|
||
<p align="center"> | ||
<img alt="Screenshot of welcome screen" src="./Docs/welcome.png" width="450" /> | ||
</p> | ||
--- | ||
|
||
## How to use Chat | ||
## Keyboard Shortcuts | ||
|
||
Open Copilot Chat in GitHub Copilot. | ||
- Open via the Xcode menu `Xcode -> Editor -> GitHub Copilot -> Open Chat`. | ||
<p align="center"> | ||
<img alt="Screenshot of Xcode Editor GitHub Copilot menu item" src="./Docs/xcode-menu_dark.png" width="648" /> | ||
</p> | ||
| Action | Shortcut | | ||
|-------------------------------------- |--------------------| | ||
| Accept first line of suggestion | `Tab` | | ||
| View full suggestion | `Option` | | ||
| Accept full suggestion | `Option + Tab` | | ||
| Open Copilot Chat | Customize in Xcode | | ||
|
||
- Open via GitHub Copilot app menu `Open Chat`. | ||
Set your own shortcuts in **Xcode > Preferences > Key Bindings**. | ||
|
||
<p align="center"> | ||
<img alt="Screenshot of GitHub Copilot menu item" src="./Docs/copilot-menu_dark.png" width="244" /> | ||
</p> | ||
--- | ||
|
||
## How to use Code Completion | ||
## Troubleshooting | ||
|
||
Press `tab` to accept the first line of a suggestion, hold `option` to view | ||
the full suggestion, and press `option` + `tab` to accept the full suggestion. | ||
- **Copilot menu not showing in Xcode?** | ||
- Make sure the Source Editor Extension is enabled in System Preferences > Extensions. | ||
- Restart Xcode after enabling the extension. | ||
|
||
- **Permission issues?** | ||
- Confirm that Accessibility and Background permissions are enabled in System Preferences. | ||
|
||
- **Problems signing in?** | ||
- Ensure you’re using the latest version of the app. | ||
- Try re-signing in via the app settings. | ||
|
||
For more help, visit our [Feedback forum](https://github.com/orgs/community/discussions/categories/copilot). | ||
|
||
--- | ||
|
||
## License | ||
|
||
This project is licensed under the terms of the MIT open source license. Please | ||
refer to [LICENSE.txt](./LICENSE.txt) for the full terms. | ||
This project is licensed under the MIT open source license. See [LICENSE.txt](./LICENSE.txt) for details. | ||
|
||
--- | ||
|
||
## Privacy | ||
|
||
We follow responsible practices in accordance with our | ||
[Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement). | ||
We follow responsible practices in accordance with our [Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement). | ||
|
||
To get the latest security fixes, please use the latest version of GitHub Copilot for Xcode. | ||
|
||
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](https://github.com/orgs/community/discussions/categories/copilot). | ||
We welcome your feedback to make GitHub Copilot better! If you have feedback or encounter problems, please reach out on our [Feedback forum](https://github.com/orgs/community/discussions/categories/copilot). | ||
|
||
--- | ||
|
||
## Acknowledgements | ||
|
||
Thank you to @intitni for creating the original project that this is based on. | ||
Thank you to @intitni for creating the original project this is based on. | ||
|
||
Attributions can be found under About when running the app or in | ||
[Credits.rtf](./Copilot%20for%20Xcode/Credits.rtf). | ||
Attributions can be found under "About" in the app or in [Credits.rtf](./Copilot%20for%20Xcode/Credits.rtf). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.