Skip to content

Commit 0321082

Browse files
committed
docs: add examples/vscode
Lima helps securing the development environment by running it inside a VM. Notably, this prevents AI agents, such as GitHub Copilot in VS Code, from directly executing untrusted commands on the host. Signed-off-by: Akihiro Suda <[email protected]>
1 parent 9d5f469 commit 0321082

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Visual Studio Code
3+
weight: 9
4+
---
5+
6+
## Securing Visual Studio Code with Lima
7+
8+
Lima helps securing the development environment by running it inside a VM.
9+
Notably, this prevents AI agents, such as [GitHub Copilot in VS Code](https://code.visualstudio.com/docs/copilot/overview), from directly executing untrusted commands on the host.
10+
11+
1. Start a Lima instance. If you use GitHub Copilot, consider disabling mounts by passing the `--mount-none` flag to prevent Copilot from accessing host files:
12+
13+
```bash
14+
limactl start --mount-none
15+
```
16+
17+
2. Add the following line to `~/.ssh/config`:
18+
19+
```
20+
Include ~/.lima/*/ssh.config
21+
```
22+
23+
3. Open the Remote Explorer in the Visual Studio Code sidebar and select `lima-<INSTANCE>` from the SSH remote list.
24+
25+
![](/images/vscode-remote-explorer.png)
26+
27+
If the Remote Explorer is missing in the sidebar, follow the documentation of Visual Studio Code to enable it: <https://code.visualstudio.com/docs/remote/ssh>.
28+
29+
4. Set up the workspace by clicking `Clone Git Repository...` on the `Welcome` screen, or copy the project directory with `limactl cp`:
30+
31+
```bash
32+
limactl cp -r DIR default:~/
33+
```
214 KB
Loading

0 commit comments

Comments
 (0)