Give your local model its own Linux CLI computer. It gets a real isolated container it can run shell commands in, write and read files, install packages, manage processes, and run background tasks - all without touching your host system.

27 Downloads

README

electric-dreams/computer (fork of dirty-data/computer)

Fork of the LM Studio plugin dirty-data/computer (itself an extended version of khtsly/lms-plugin-computer, MIT). It gives the local model its own isolated Linux container. Changes in this fork:

  • Tool call budget per request. The budget used to be module-global and reset only by the prompt preprocessor, which LM Studio does not run for API calls (POST /api/v1/chat). Over the API it never reset: after 10 calls every tool answered "budget exhausted" and the model looped. The budget now lives in each tools-provider session (one per prediction), with the configured maximum.
  • Global settings. All settings are global plugin settings instead of per-chat settings. The container is one shared resource, and API calls used to get the defaults (10 tool calls, no shared folder if the container had to be recreated).
  • Custom image. New setting "Custom Image (overrides Base Image)": any local or registry image (it must provide bash). An image that already exists locally is never pulled, so a locally built image cannot be replaced by a registry image of the same name.

Install

  • From LM Studio Hub: https://lmstudio.ai/electric-dreams/computer (or lms get electric-dreams/computer).
  • From source: clone this repository, then build.cmd install (Linux/macOS: ./build.sh install): it runs npm install, a type check and lms dev --install -y.
  • Requirements: Docker Desktop (Windows, macOS) or Podman (Linux), running.
  • Uninstall dirty-data/computer and khtsly/computer first: they drive the same container (lms-computer-main).

Settings (global, in the plugin page of LM Studio)

They apply to every chat and to API calls. The most useful ones:

SettingNotes
Custom Imageyour own image, e.g. local/my-sandbox:1 built with docker build; it must provide bash; leave empty to use Base Image
Shared Folderhost folder mounted on /mnt/shared (the only data that survives a rebuild)
Internet Accessoff by default; changing it recreates the container (persistent mode keeps its files)
Persistence Modepersistent keeps the container between LM Studio restarts; ephemeral recreates it at each start
Max tool calls per turnper request (chat message or API call)

After changing Custom Image, rebuild the container (ask the model to "rebuild the computer", or docker rm -f lms-computer-main) so it is recreated from the new image.

Develop and publish

  • Hub artifact. electric-dreams/computer on LM Studio Hub is an official fork of dirty-data/computer, created in the Hub web interface (Fork button). Revision 1 is the unmodified upstream; revision 2 and later carry this repository.
  • Install from source: build.cmd install (Linux/macOS: ./build.sh install): npm install, type check, lms dev --install -y.
  • Type check only: build.cmd check.
  • Publish a new revision: lms login once (opens the browser), then build.cmd publish. It type checks and runs lms push --write-revision -y: the artifact already exists, so a new revision is added to the fork. The new revision number is written to manifest.json: commit it.
  • Hub administration (delete an artifact, fork, visibility) is done in the LM Studio Hub web interface: lms has no delete command. A free LM Studio account can only publish public artifacts.

lms-plugin-computer

Give your local model its own Linux CLI computer. It gets a real isolated container it can run shell commands in, write and read files, install packages, manage processes, and run background tasks - all without touching your host system.

This plugin is still in beta version, it may be not that stable. This plugin is highly-inspired by the Claude's computer.


Before you start

You'll need a container runtime. Install one based on your OS and make sure it's running before using the plugin.

Windows & macOS - Docker Desktop is the easiest option. Just install it and keep it open in the background.

Linux - Podman works great and doesn't require root. After installing, run these once:

# Ubuntu/Debian
sudo apt install uidmap slirp4netns
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER

Then log out and back in. The plugin handles everything else automatically.


Installation

The easiest way:

lms install khtsly/computer

Or from source:

git clone https://github.com/khtsly/lms-plugin-computer
cd lms-plugin-computer
bun run dev   # or: npm run dev

Getting started

  • Open LM Studio and start a new chat with any tool-capable model
  • Enable the khtsly/computer plugin from the plugin panel
  • Say something like "do you have a computer?" or just give it a task

On first use it pulls the Ubuntu image and sets up the container - this takes a minute. After that it's instant.


Settings

Click the gear icon next to the plugin to open settings.

The basics

Internet Access - off by default. Turn this on if you want the model to install packages with apt-get, pip, npm, etc. If you change this after the container is already running, just tell the model "rebuild the computer" and it will recreate with the new setting.

Persistence Mode - persistent by default, meaning files and installed packages survive across sessions. Switch to ephemeral if you want a clean slate every time LM Studio opens.

Base Image - Ubuntu 24.04 is recommended. Alpine is available if you want something ultra-lightweight, though some packages behave differently with its musl libc.

Resource limits

SettingDefaultRange
CPU cores20–8 (0 = unlimited)
Memory1024 MB256–8192 MB
Disk4096 MB512–32768 MB

Other options

Auto-Install Packages - choose what gets pre-installed when the container is first created. Options range from nothing to a full set including Python, Node.js, build tools, and networking utilities. Requires Internet Access to be on.

Shared Folder - mount a folder from your computer into the container at /mnt/shared. Useful for giving the model access to your files without going through the upload tool every time.

Port Forwards - expose ports from the container to your host. For example 8080:80 lets you open localhost:8080 in your browser to see whatever the model is running inside.

Command Timeout - how long a single command can run before it gets killed. Default is 30 seconds. Bump this up if you're doing long installs or builds.


What the model can do

The model has access to these tools automatically - no need to ask it to use them, it figures out what's needed on its own.

Shell

ToolDescription
ExecuteRun shell commands in a persistent session - cd, export, source, nvm use, conda activate all carry over between calls, just like a real terminal
ExecuteBackgroundStart a long-running process in the background (servers, watchers, builds) and get a handle to check on it later
ReadProcessLogsRead buffered stdout/stderr from a background process

Files

ToolDescription
WriteFileCreate or overwrite a complete file
ReadFileRead a file, optionally a specific line range to keep context short
StrReplaceReplace an exact unique string in a file - the preferred way to edit code without rewriting the whole thing
InsertLinesInsert lines at a specific position in a file
ListDirectoryBrowse the filesystem
UploadFileCopy a file from your computer into the container
DownloadFileCopy a file from the container to your computer

Container management

ToolPreserves dataSpeedUse when
ComputerStatus-InstantCheck system info, resource usage, running processes
ResetShellVInstantShell env is broken, want clean variables without touching files
RestartComputerVFastContainer is sluggish, runaway process, want a fresh start
RebuildComputerXSlowNetwork setting changed, environment is fully broken

Examples

Run some code

"Write a Python script that generates a Fibonacci sequence up to 1000 and save it as fib.py"

Edit a file surgically

"Fix the bug in the handle_request function in server.py"

The model reads just that section of the file and replaces only the broken part instead of rewriting everything.

Set up an environment

"Set up a Node.js project with Express, create a basic REST API, and start the server"

Run a web server you can actually open Set Port Forwards to 8080:8080 in settings, then:

"Build a simple dashboard and serve it on port 8080"

Work with your files Attach a CSV and say:

"Analyse this data and give me a summary with the key trends"


Troubleshooting

"No container found" error on startup Your runtime isn't running. On Windows and Mac, make sure Docker Desktop is open. On Linux, check that docker or podman is installed.

Internet doesn't work inside the container Check that Internet Access is set to On in settings. If the container was already created before you toggled it, tell the model:

"Rebuild the computer"

It will recreate the container with internet enabled.

Container keeps failing on Linux Make sure you ran the setup commands from the requirements section. Then clear the old container and let it recreate:

podman rm -f lms-computer-main

Commands are timing out Increase Command Timeout in settings. The default 30 seconds isn't always enough for large package installs or slow builds.

Files disappeared after reopening LM Studio Check that Persistence Mode is set to Persistent. Ephemeral mode wipes the container on close - that's expected.


A few things worth knowing

The shell session is persistent within a conversation - cd, export, nvm use, conda activate all carry over between commands, just like a real terminal.

When something goes wrong, every tool returns a short error and an actionable hint telling the model exactly what to do next - no wasted tool calls investigating the failure.

The container is fully isolated and can't access anything on your host unless you configure a shared folder or port forward.

The disk limit is only hard-enforced on XFS filesystems. On ext4 (most Linux installs) usage is tracked and reported correctly but not enforced at the OS level.

Changing the base image only takes effect on a fresh container - tell the model to rebuild after switching.


License

MIT