For the complete documentation index, see llms.txt. This page is also available as Markdown.

LLM Support

VSCode Extensions

VSCode has built-in support for using CoPilot to create and edit files, among other VSCode features. If you pay for CoPilot, you can login to your account to use CoPilot from the "Chat" side window.

For users of Anthropic's Claude, Anthropic has their own VSCode extension. Navigate to the Extensions window from the left sidebar, and search "Claude." Make sure to install the verified extension from Anthropic.

After the extension has been installed, you can navigate to the Claude Code window by clicking the sidebar button on the top-right, then switching to the "Claude Code" tab. You can now input instructions into the text box. You will be prompted to login to your Claude account.

After logging in, you can begin sending instructions to Claude. For example, here I have input "Create a new file named "README.md" that includes basic examples for using apptainer." The opened "README.md" file is the one output by Claude.

Sandboxing LLMs

While LLMs can be useful, giving them unfettered access to your files can be dangerous. There have been documented cases of LLMs executing commands that delete people's folder containing all of their projects. To avoid this issue, you should run an LLM inside of a sandbox and scope its access to only the directories where you are doing work.

Below is a script that will create such a sandbox on your behalf. Simply copy the contents of this script to ~/.local/bin/claude-sandbox , then make it executable by running chmod +x ~/.local/bin/claude-sandbox .

To use claude-sandbox, you must first install the Claude Code tool. Please follow these instructions to do so.

You can run claude-sandbox --help to get a description for how to use this tool.

Running claude-sandbox with no arguments will create a sandbox in whatever directory you are currently in, so that Claude will only have access to the contents of that specific directory.

Running claude-sandbox /an/example/path will create the sandbox at whatever directory you specified.

claude-sandbox will not allow you to create a sandbox in your home directory, as that would effectively make the sandbox useless for protecting your files.

You can bind extra directories into the sandbox by passing paths as arguments to --bind or --ro-bind. For example, if there is a reference genome in a separate directory from your project folder that you want to access inside the sandbox, you'd pass the path to that genome to these flags.

Directories passed to --bind will be readable and writable in the sandbox. Directories passed to --ro-bind will only be readable.

Below is an example of the sandbox in action. The sandbox is created in /home/asoberan/projects/training/sandbox. The directory above this contains a couple of files: README.md and notes.txt.

However, Claude Code has no visibility to those files.

Sandboxed LLMs in VSCode

Unfortunately, I was unable to get the Claude Code VSCode extension to connect to a sandboxed Claude running a remote control session. It's still possible to control this remote session from Claude Desktop, your web browser, the Claude app on your phone, or from another Claude Code session, but not from the VSCode Claude Code chat window.

If a workaround is found to this problem, this documentation will be updated with the fix. Until then, use of a sandboxed Claude can be achieved in VSCode the following way.

First, I recommend moving the Terminal tab to the secondary side bar on the right. Do this by right-clicking Terminal > Move To > Secondary Side Bar.

Once the Terminal has moved, you'll see it on the right side bar. In this Terminal window, you can run claude-sandbox in the directory of your choice. In the example below, I'm running the sandbox in the sandbox directory which contains example_file.txt.

The sandboxed Claude Code will now run on the right side bar, mirroring the experience of the official Claude Code VSCode extension. Input instructions as you see fit. Any changes to files will be mirrored in your VSCode window.

That is not Kermit...

Last updated

Was this helpful?