SDK Overview
Official SDK libraries for smolvm. Create and manage microVM machinees for secure code execution.
Available SDKs
| SDK | Language | Install |
|---|---|---|
| smolvm-node | TypeScript / JavaScript | npm install smolvm |
| smolvm-python | Python | pip install smolvm |
Features
- Machine Management - Create, start, stop, delete machinees
- Command Execution - Run commands directly in the microVM
- Container Support - Run OCI containers (Docker images) inside machinees
- Volume Mounts - Mount host directories into machinees
- Resource Control - Configure CPU and memory limits
- GPU Acceleration - Vulkan access to host GPU for rendering and ML
- Language Presets - Quick helpers for Python, Node.js
Requirements
- smolvm server running (default:
http://127.0.0.1:8080) - macOS with Apple Silicon (M1/M2/M3), or
- Linux with KVM support (
/dev/kvmaccessible)
Quick Example
typescript
import { Machine } from 'smolvm';
const machine = await Machine.create({ name: 'my-machine' });
const result = await machine.exec(['echo', 'Hello!']);
console.log(result.stdout);
await machine.stop();
await machine.delete();python
from smolvm import Machine, MachineConfig
async with Machine(MachineConfig(name="my-machine")) as machine:
await machine.start()
result = await machine.exec(["echo", "Hello!"])
print(result.stdout)Next Steps
- Installation - Install the SDK
- Quick Start - Run your first machine
- Machine API - Full API reference
- GPU Acceleration - Enable GPU for rendering and ML