Lima Manager
A VS Code extension for managing Lima virtual machines directly from the editor. Simplify your workflow by viewing, starting, stopping, and connecting to Lima VMs without leaving VS Code.
Features
- VM List View: View all your Lima VMs in a dedicated sidebar with real-time status indicators
- Status Bar: Quick overview of running VMs in the status bar
- Start/Stop VMs: Start and stop VMs with one click
- Terminal Integration: Open a shell directly in any running VM
- SSH Connection Info: Get SSH configuration for connecting via Remote-SSH
- VM Details: View detailed information about each VM (CPUs, memory, disk, etc.)
- VM Configuration Editor: Edit VM configurations directly in VS Code (change CPUs, memory, disk, etc.)
- VM Creation Wizard: Create new VMs with template selection and size presets
- VM Protection: Protect VMs from accidental deletion
- Workspace Configuration: Store workspace-specific VM preferences in
.lima/ directory
- Template Management: Browse and select from official Lima templates and custom sources
- Auto-Refresh: VM list automatically updates every 30 seconds
- OS Detection: Automatically detects and displays the Linux distribution from VM image names
- Post-Connect Hooks: Execute custom scripts when connecting to VMs via Remote-SSH
- Mount Management: View and manage persistent storage mounts with warnings for ephemeral data
Requirements
- Lima must be installed and
limactl must be in your PATH
- Install Lima on macOS:
brew install lima
Installation
Option 1: Install Script (Recommended)
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/stuffbucket/vscode-lima/main/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/stuffbucket/vscode-lima/main/install.ps1 | iex
Option 2: Homebrew (macOS)
brew tap stuffbucket/tap
brew install lima-manager
Option 3: Manual Installation
- Download the latest
.vsix file from GitHub Releases
- Install via command line:
code --install-extension lima-manager-*.vsix
- Or install via VS Code:
- Open VS Code
- Press
Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
- Type "Install from VSIX"
- Select the downloaded
.vsix file
Development Setup
For contributors and developers:
- Clone this repository
- Run
npm install to install dependencies
- Open in VS Code and press F5 to launch the extension in debug mode
Usage
- Click the Lima icon in the Activity Bar to open the Lima VMs view
- View all your VMs with their current status (Running/Stopped)
- Right-click on any VM to access available actions
Available Commands
All commands are available via the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
- Lima: Refresh VMs - Manually refresh the VM list
- Lima: Start VM - Start a stopped VM
- Lima: Stop VM - Stop a running VM
- Lima: Open Shell - Open a terminal with shell access to a running VM
- Lima: Connect via SSH - Get SSH configuration for Remote-SSH connection
- Lima: Show VM Info - Display detailed VM information
- Lima: Edit VM Configuration - Open and edit a VM's lima.yaml configuration file
- Lima: Create New VM - Launch the VM creation wizard with templates and size selection
- Lima: Protect VM - Mark a VM as protected to prevent accidental deletion
- Lima: Unprotect VM - Remove protection from a VM
- Lima: Delete VM - Delete a stopped, unprotected VM (requires confirmation)
- Lima: Initialize Workspace Configuration - Create a
.lima/ directory for workspace-specific settings
- Lima: Open Settings - Open Lima extension settings
- Lima: Clear Template Cache - Clear the cached template list
Right-click on any VM in the sidebar:
- Running VMs: Stop, Open Shell, Connect via SSH, Show Info
- Stopped VMs: Start, Show Info
Status Bar
The status bar shows the number of running VMs at a glance:
- Format:
Lima: X/Y running (X = running VMs, Y = total VMs)
- Click to refresh the VM list
Connecting to VMs
Option 1: Built-in Terminal
Use the Open Shell command to launch a terminal with Lima shell access. This provides immediate command-line access to the VM.
Option 2: VS Code Remote-SSH
For a full remote development experience:
- Install the Remote-SSH extension
- Right-click on a running VM and select Connect via SSH
- Copy the SSH configuration to your
~/.ssh/config file
- Update the
User field with your VM username
- Use Remote-SSH to connect to the
lima-<vmname> host
This gives you full VS Code functionality inside the VM, including extensions, terminal, and file access.
Editing VM Configurations
You can modify VM settings (CPU count, memory, disk size, etc.) directly from VS Code:
Method 1: From VM Info Panel
- Right-click a VM and select Show VM Info
- In the Configuration section, click the Edit Configuration button
- Make your changes to the
lima.yaml file
- Save the file and restart the VM for changes to take effect
Method 2: From Command Palette
- Run Lima: Edit VM Configuration from the Command Palette
- Select the VM you want to configure
- Edit the
lima.yaml file as needed
- Save and restart the VM
Common Configuration Changes
The VM configuration is stored in ~/.lima/<vm-name>/lima.yaml. Here are some common modifications:
Change CPU count:
cpus: 4
Adjust memory:
memory: "8GiB"
Modify disk size:
disk: "100GiB"
Note: Most changes require restarting the VM. Some changes (like increasing disk size significantly) may require recreating the VM.
Workspace Configuration
Initialize workspace-specific Lima settings with Lima: Initialize Workspace Configuration. This creates a .lima/ directory in your workspace root containing:
config.json: Workspace preferences (preferred VMs, VM mappings)
README.md: Documentation about Lima configuration
- Automatically added to
.gitignore
Workspace configuration is useful for teams working with standardized VM setups or projects that require specific VM configurations.
OS Detection
The extension automatically detects the Linux distribution and version from VM image names. This information is displayed in:
- VM Info Panel: Shows the detected OS, version, and variant with official OS logos
- VM Details: Helps identify which distribution is running
Supported Distributions
The OS detector recognizes:
- Ubuntu (Server, Minimal, LTS variants)
- Debian (including codenames like bookworm, trixie)
- Fedora
- Alpine Linux
- Arch Linux
- CentOS Stream
- AlmaLinux
- Rocky Linux
- openSUSE (Leap and Tumbleweed)
- Oracle Linux
- Gentoo
Example detections:
ubuntu-24.04-server-cloudimg-amd64.img → Ubuntu 24.04 Server
debian-bookworm-genericcloud-amd64.qcow2 → Debian 12
Fedora-Cloud-Base-42-1.14.x86_64.qcow2 → Fedora 42
openSUSE-Tumbleweed-Minimal-VM.x86_64-Cloud.qcow2 → openSUSE Tumbleweed
See OS Detection Documentation for technical details.
Extension Settings
This extension does not currently add any VS Code settings.
Release Notes
See CHANGELOG.md for detailed release notes.
0.0.1
Initial release with VM management, terminal integration, and SSH configuration support.
Distribution
For instructions on packaging and distributing this extension, including release workflows and Homebrew formula updates, see the project's GitHub repository.
Contributing
Issues and pull requests are welcome!
License
MIT