Follow the steps below to configure the Copilot Extension template for your own personal use.
To test your Copilot extension, you need to make it publicly accessible:
- If using Visual Studio Code (VS Code), enable port forwarding. Note that the port is private by default - a good thing - but for this use case you need to set it to public.
Alternatively, use tools like cloudflared or ngrok to expose a public URL.
The application is set up to run on port 3000, so we'll forward port 3000.
It's worth mentioning that this setup is great for testing, but once you're ready to make your extension public you'll need to deploy the web app (which acts as the GitHub app) to a publicly accessible location.
Head to your settings page on GitHub, and at the bottom, to the left, click on the Developer Settings link. This will bring you to your GitHub apps. (You can also directly navigate to your GitHub apps page at https://github.com/settings/apps. Configure the following:
- Enter a GitHub App name, e.g. my-copilot-extension
- Enter a URL for the homepage. This can be the same as the test URL for now.
- Set the Callback URL (currently required). This can also be the same as the test URL for now. Even if you're not using OAuth, you still need to put a URL here. In the future this may no longer be required.
- Disable webhooks if they're enabled.
- Make sure the app is initially accessible only to you. Later, when you're ready to make your GitHub Copilot extension publicly available, you can enable it for everyone.
- Click the Create GitHub App button to create the GitHub app.
Next, you need to configure permissions. You only need to provide the bare minimum permissions for a Copilot extension to work.
- Expand the Account permissions section and set the Copilot Chat permission to Read-only. The default is No access.
- Click Save changes. Don't be alarmed by the Are you sure you want to update permissions? message.
- Set the App Type to Agent. It's set to Disabled by default.
- Set the URL to the root of the public URL you exposed via tunneling/port forwarding.
- Click Save.
Congratulations! You've configured your first Copilot extension!
Before you can use the extension, it has to be installed.
- Navigate to your [GitHub apps]kv(https://github.com/settings/apps) in your developer settings.
-
Click the Edit button to edit the app.
-
Go to the Install App section of the GitHub Apps' settings.
- Click the Install button to install the application.
You're brought to an intermediary page to confirm the installation of the GitHub app. Click the Install button.
Your Copilot extension is installed for your GitHub account.
You can test your Copilot extension in a few environments:
- GitHub's Copilot chat
- VS Code's Copilot Chat
- Visual Studio's Copilot Chat
For these environments, follow these steps:
-
In the GitHub Copilot chat, type "@" to see available extensions.
-
Your extension should appear as, e.g. "@my-copilot-extension".
-
Select your extension and ask a question or perform an operation.
-
The Copilot extension will return a response of "Welcome your_github_username! It looks like you asked the following question: your_question. This is a GitHub Copilot extension template, so it's up to you to decide what you want to implement to answer prompts."
It won't respond to your specific question, as that functionality has not been implemented. This is where you can explore the preview SDK or integrate with a third-party service to provide more meaningful responses.