Visual Studio Code

Securing Visual Studio Code with Lima

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.

  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:
limactl start --mount-none
  1. Add the following line to ~/.ssh/config:
Include ~/.lima/*/ssh.config
  1. Open the Remote Explorer in the Visual Studio Code sidebar and select lima-<INSTANCE> from the SSH remote list.

  1. Set up the workspace by clicking Clone Git Repository... on the Welcome screen, or copy the project directory with limactl cp:
limactl cp -r DIR default:~/
Last modified October 3, 2025: docs: add examples/vscode (8ea7c498)