Skip to content

Commit e93d8d6

Browse files
Merge branch 'ArmDeveloperEcosystem:main' into tensor
2 parents a2a8f5f + 98773b3 commit e93d8d6

36 files changed

Lines changed: 2184 additions & 13 deletions

.github/workflows/resize-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
id: changed-files
2121
run: |
2222
# Find all image files that changed since last Monday
23-
CHANGED_IMAGES=$(git log --since="7 days ago" --name-only --pretty="" \
23+
CHANGED_IMAGES=$(git log --since="10 days ago" --name-only --pretty="" \
2424
-- '*.jpg' '*.jpeg' '*.png' '*.JPG' '*.JPEG' '*.PNG' | sort -u | tr '\n' ' ')
2525
2626
echo "changed_images=$CHANGED_IMAGES" >> $GITHUB_OUTPUT
271 KB
Loading
Lines changed: 322 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,322 @@
1+
---
2+
title: GitHub Copilot
3+
4+
author: Pareena Verma
5+
minutes_to_complete: 10
6+
official_docs: https://docs.github.com/en/copilot
7+
8+
test_maintenance: true
9+
test_images:
10+
- ubuntu:latest
11+
12+
layout: installtoolsall
13+
multi_install: false
14+
multitool_install_part: false
15+
tool_install: true
16+
weight: 1
17+
---
18+
19+
GitHub Copilot is an AI coding assistant that helps you write code faster and with less effort. It suggests whole lines or entire functions based on your comments and code context.
20+
21+
GitHub Copilot works seamlessly on Arm-based systems, including Linux distributions running on Arm servers, macOS on Apple Silicon, and Windows on Arm devices.
22+
23+
This guide focuses on installing GitHub Copilot in Visual Studio Code. GitHub Copilot also supports other editors including JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm), Neovim, and others. Visit the [official GitHub Copilot documentation](https://docs.github.com/en/copilot) for installation instructions for other editors.
24+
25+
## What should I do before installing GitHub Copilot?
26+
27+
You need a GitHub account with an active GitHub Copilot subscription to use GitHub Copilot.
28+
29+
If you don't have a GitHub account, visit [GitHub](https://github.com/) and sign up.
30+
31+
To subscribe to GitHub Copilot, visit [GitHub Copilot pricing](https://github.com/features/copilot/plans) and choose a plan that fits your needs. GitHub Copilot offers individual, business, and enterprise plans, plus a free tier for verified students, teachers, and maintainers of popular open source projects.
32+
33+
## How do I install GitHub Copilot in Visual Studio Code?
34+
35+
Visual Studio Code is one of the most popular editors for using GitHub Copilot, and it works natively on Arm systems.
36+
37+
### Install Visual Studio Code
38+
39+
If you don't have Visual Studio Code installed, download and install it for your operating system:
40+
41+
- macOS (Apple Silicon): Download from [Visual Studio Code for macOS](https://code.visualstudio.com/download) and select the Apple Silicon version
42+
- Linux (Arm): Download the Arm64 `.deb` or `.rpm` package from the same download page
43+
- Windows on Arm: Download the Arm64 installer from the download page
44+
45+
For Linux, you can install VS Code using the package manager. On Ubuntu and Debian-based distributions:
46+
47+
```bash { target="ubuntu:latest" }
48+
curl -L "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-arm64" -o vscode-arm64.deb
49+
sudo dpkg -i vscode-arm64.deb
50+
sudo apt-get install -f
51+
```
52+
53+
### Install the GitHub Copilot extension
54+
55+
Open Visual Studio Code and install the GitHub Copilot extension:
56+
57+
1. Open VS Code
58+
2. Select the Extensions view by selecting the Extensions icon in the Activity Bar on the left side or pressing `Ctrl+Shift+X` (Windows/Linux) or `Cmd+Shift+X` (macOS)
59+
3. Search for "GitHub Copilot"
60+
4. Select **Install** on the "GitHub Copilot" extension by GitHub
61+
62+
Alternatively, install from the command line:
63+
64+
```console
65+
code --install-extension GitHub.copilot
66+
```
67+
68+
### Install the GitHub Copilot Chat extension
69+
70+
For an enhanced experience with conversational AI assistance, install the GitHub Copilot Chat extension:
71+
72+
```console
73+
code --install-extension GitHub.copilot-chat
74+
```
75+
76+
Or search for "GitHub Copilot Chat" in the Extensions view and install it.
77+
78+
### Sign in to GitHub Copilot
79+
80+
After installing the extension, you need to authorize it:
81+
82+
1. In VS Code, select the GitHub Copilot icon in the status bar (bottom right)
83+
2. Select **Sign in to GitHub**
84+
3. Follow the prompts to authorize the extension in your browser
85+
4. Return to VS Code to complete the setup
86+
87+
## How do I confirm GitHub Copilot is working?
88+
89+
You now have GitHub Copilot installed in Visual Studio Code.
90+
91+
Confirm it's working by testing code suggestions:
92+
93+
1. In VSCode, create a new file by selecting **File****New File** or pressing `Ctrl+N` (Windows/Linux) or `Cmd+N` (macOS)
94+
2. Save the file with a programming language extension by selecting **File****Save As** (for example, `test.py` for Python, `test.js` for JavaScript, or `test.go` for Go)
95+
3. In the VS Code editor window, type a comment describing a function:
96+
- For Python: `# Function to calculate fibonacci numbers`
97+
- For JavaScript: `// Function to calculate fibonacci numbers`
98+
- For Go: `// Function to calculate fibonacci numbers`
99+
4. Press Enter to start a new line
100+
101+
GitHub Copilot analyzes your comment and suggests code. The suggestion appears as gray text in the editor.
102+
103+
5. Press Tab to accept the suggestion, or press Esc to dismiss it
104+
6. Continue typing to see more suggestions as you work
105+
106+
If you don't see suggestions, check that:
107+
- You're working in the Visual Studio Code editor window (not a terminal)
108+
- The GitHub Copilot icon in the status bar (bottom right) shows it's active
109+
- You're signed in to your GitHub account
110+
- Your subscription is active
111+
112+
## What are the different GitHub Copilot modes?
113+
114+
GitHub Copilot Chat in Visual Studio Code offers three modes to help you work with code in different ways: Agent, Edit, and Ask modes. Each mode is designed for specific tasks.
115+
116+
### Agent Mode
117+
118+
Agent Mode enables GitHub Copilot to take autonomous actions in your workspace. In this mode, Copilot can:
119+
120+
- Read and analyze multiple files in your project
121+
- Make changes across different files
122+
- Create new files and directories
123+
- Execute tasks that require understanding your entire codebase
124+
125+
To use Agent Mode:
126+
127+
1. Open the GitHub Copilot Chat panel by selecting the chat icon in the Activity Bar or pressing `Ctrl+Enter` (Windows/Linux) or `Cmd+Ctrl+I` (macOS)
128+
2. Type `@workspace` followed by your request or prompt to engage Agent Mode
129+
3. Copilot analyzes your workspace and takes appropriate actions
130+
131+
Example prompts for Agent Mode:
132+
- `Create a python application to calculate fibonacci numbers on my arm machine`
133+
- `@workspace add error handling throughout the application`
134+
135+
### Edit Mode
136+
137+
Edit Mode focuses on making targeted changes to your current file or selected code. This mode is useful when you want Copilot to modify existing code without creating new files.
138+
139+
To use Edit Mode:
140+
141+
1. Select the code you want to modify in your editor
142+
2. Open the Copilot Chat panel
143+
3. Type your request describing the changes you want
144+
145+
Alternatively, use the inline chat:
146+
147+
1. Select the code you want to modify
148+
2. Press `Ctrl+I` (Windows/Linux) or `Cmd+I` (macOS) to open inline chat
149+
3. Describe the changes you want to make
150+
4. Copilot shows a preview of the changes before applying them
151+
152+
Example prompts for Edit Mode:
153+
- Select a function and ask: `Add input validation and error handling`
154+
- Select a code block and ask: `Optimize this code for better performance on my arm machine`
155+
156+
### Ask Mode
157+
158+
Ask Mode is designed for questions and explanations. Use this mode when you want to understand code, learn about concepts, or get guidance without making changes to your files.
159+
160+
To use Ask Mode:
161+
162+
1. Open the GitHub Copilot Chat panel
163+
2. Type your question directly without any special prefixes
164+
165+
Example prompts for Ask Mode:
166+
- `How does this function work?` (with code selected)
167+
- `What are the best practices for error handling in Python?`
168+
169+
## How do I use MCP Servers with GitHub Copilot?
170+
171+
Model Context Protocol (MCP) Servers extend GitHub Copilot's capabilities by providing specialized tools and knowledge bases. GitHub Copilot can connect to MCP servers to access domain-specific expertise and functionality.
172+
173+
The Arm MCP Server provides AI assistants with tools and knowledge for Arm architecture development, migration, and optimization. This is particularly useful when working on Arm-based systems.
174+
175+
### What tools does the Arm MCP Server provide?
176+
177+
The Arm MCP Server includes several tools designed for Arm development:
178+
179+
- migrate-ease scan: Analyzes codebases for x86-specific code that needs updating for Arm compatibility
180+
- skopeo: Inspects container images to check for ARM64 architecture support
181+
- knowledge_base_search: Searches Arm documentation and learning resources
182+
- mca (Machine Code Analyzer): Analyzes assembly code for performance on Arm architectures
183+
- check_image: Verifies Docker image architecture compatibility
184+
185+
### How do I configure the Arm MCP Server with GitHub Copilot?
186+
187+
You need Docker running on your system to use the Arm MCP Server. See the [Docker install guide](/install-guides/docker/) for instructions.
188+
189+
First, pull the Arm MCP Server image:
190+
191+
```console
192+
docker pull armlimited/arm-mcp:latest
193+
```
194+
195+
Configure the Arm MCP Server manually by creating a configuration file in your workspace. You can configure MCP servers in two locations:
196+
197+
- For a specific repository: Create a `.vscode/mcp.json` file in the root of your repository. This enables you to share MCP server configuration with anyone who opens the project.
198+
- For your personal VS Code instance: Add the configuration to your `settings.json` file. This makes the server available in all workspaces.
199+
200+
{{% notice Note %}}
201+
Use only one location per server to avoid conflicts and unexpected behavior.
202+
{{% /notice %}}
203+
204+
You can configure the MCP server using one of these methods:
205+
206+
Method 1: Workspace configuration (recommended for sharing)
207+
208+
Create a `.vscode` directory in your project root if it doesn't exist, then create an `mcp.json` file:
209+
210+
```console
211+
mkdir -p .vscode
212+
```
213+
214+
Add the following configuration to `.vscode/mcp.json`:
215+
216+
```json
217+
{
218+
"servers": {
219+
"arm-mcp": {
220+
"type": "stdio",
221+
"command": "docker",
222+
"args": [
223+
"run",
224+
"--rm",
225+
"-i",
226+
"-v", "/path/to/your/codebase:/workspace",
227+
"armlimited/arm-mcp:latest"
228+
]
229+
}
230+
}
231+
}
232+
```
233+
234+
Method 2: User configuration (available in all workspaces)
235+
236+
Open the Command Palette (`Ctrl+Shift+P` on Windows/Linux or `Cmd+Shift+P` on macOS) and select **MCP: Open User Configuration**. This opens your user-level `mcp.json` file located at `~/Library/Application Support/Code/User/mcp.json` (macOS) or `%APPDATA%\Code\User\mcp.json` (Windows).
237+
238+
Add the following configuration to the user-level `mcp.json` file:
239+
240+
```json
241+
{
242+
"servers": {
243+
"arm-mcp": {
244+
"type": "stdio",
245+
"command": "docker",
246+
"args": [
247+
"run",
248+
"--rm",
249+
"-i",
250+
"-v", "/path/to/your/codebase:/workspace",
251+
"armlimited/arm-mcp:latest"
252+
]
253+
}
254+
}
255+
}
256+
```
257+
258+
Save the file. A **Start** button appears at the top of the servers list in your `mcp.json` file. Select **Start** to start the Arm MCP Server.
259+
260+
### How do I analyze a local codebase with the Arm MCP Server?
261+
262+
To analyze code in your workspace, mount your local directory to the MCP server's `/workspace` folder using a volume mount.
263+
264+
Update your `.vscode/mcp.json` configuration to include the volume mount. Replace `/path/to/your/codebase` with the actual path to your project
265+
266+
For example, if your project is at `/Users/username/myproject`, the volume mount args in your `mcp.json` would be:
267+
268+
```json
269+
"-v",
270+
"/Users/username/myproject:/workspace",
271+
```
272+
273+
### How do I verify the Arm MCP Server is working?
274+
275+
After saving the `.vscode/mcp.json` file, the **Start** button appears at the top of the servers list. Select **Start** to start the MCP server.
276+
277+
To confirm the server is running:
278+
279+
1. Open the Command Palette (`Ctrl+Shift+P` on Windows/Linux or `Cmd+Shift+P` on macOS)
280+
2. Type and select **MCP: List Servers**
281+
3. You should see `arm-mcp` listed as a Running configured server
282+
283+
Open the GitHub Copilot Chat panel by selecting the chat icon in the Activity Bar. In the chat box, select **Agent** from the mode dropdown.
284+
285+
To view available MCP tools, select the tools icon in the top left corner of the chat box. This opens the MCP server list showing all available tools from the Arm MCP Server.
286+
287+
![MCP Server Tools](/install-guides/_images/new-mcp-server-tools.png "Figure 1. Tools loaded from the Arm MCP Server")
288+
289+
You can also ask Copilot to use specific Arm MCP tools:
290+
291+
```
292+
Use the Arm MCP Server to scan my codebase for x86-specific code
293+
```
294+
295+
or
296+
297+
```
298+
Check if the nginx:latest Docker image supports Arm64
299+
```
300+
301+
### Example prompts using the Arm MCP Server
302+
303+
Here are some example prompts that use the Arm MCP Server tools:
304+
305+
- `Scan my workspace for code that needs updating for Arm compatibility`
306+
- `Check if the postgres:latest container image supports Arm64 architecture`
307+
- `Search the Arm knowledge base for NEON intrinsics examples`
308+
- `Find learning resources about migrating from x86 to Arm`
309+
310+
### Troubleshooting MCP Server connections
311+
312+
If the Arm MCP Server doesn't connect:
313+
314+
- Verify Docker is running: `docker ps`
315+
- Check that the image was pulled successfully: `docker images | grep arm-mcp`
316+
- Ensure the timeout value (60000ms) is sufficient for your system
317+
- Check VS Code Output panel (select **Output****GitHub Copilot Chat**) for error messages
318+
- Restart VS Code after making configuration changes
319+
320+
If you encounter issues or have questions, reach out to mcpserver@arm.com.
321+
322+
You're ready to use GitHub Copilot with the Arm MCP Server to enhance your Arm development workflow.

0 commit comments

Comments
 (0)