vmsan 0.1.0-alpha.23 → 0.1.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -46
- package/dist/_chunks/connect.mjs +1 -2
- package/dist/_chunks/context.mjs +716 -203
- package/dist/_chunks/create.mjs +111 -116
- package/dist/_chunks/download.mjs +2 -3
- package/dist/_chunks/errors.mjs +30 -3
- package/dist/_chunks/exec.mjs +2 -3
- package/dist/_chunks/firecracker.mjs +1 -1
- package/dist/_chunks/list.mjs +6 -3
- package/dist/_chunks/network.mjs +4 -4
- package/dist/_chunks/remove.mjs +2 -1
- package/dist/_chunks/start.mjs +3 -2
- package/dist/_chunks/stop.mjs +2 -1
- package/dist/_chunks/summary.mjs +4 -5
- package/dist/_chunks/timeout-extender.mjs +1 -1
- package/dist/_chunks/upload.mjs +2 -3
- package/dist/_chunks/vm-context.mjs +242 -3
- package/dist/index.d.mts +89 -9
- package/dist/index.mjs +4 -32
- package/package.json +10 -8
- package/dist/_chunks/validation.mjs +0 -125
- package/dist/_chunks/vm-state.mjs +0 -238
package/README.md
CHANGED
|
@@ -29,26 +29,30 @@ Create, manage, and connect to isolated [Firecracker](https://github.com/firecra
|
|
|
29
29
|
- 📂 **File transfer** — upload and download without SSH
|
|
30
30
|
- 🐳 **Docker images** — build rootfs from any OCI image with `--from-image`
|
|
31
31
|
- 🏃 **Command execution** — run commands with streaming output, env injection, and sudo
|
|
32
|
-
- 🧩 **Multiple runtimes** — `base`, `node22`, `python3.13`
|
|
32
|
+
- 🧩 **Multiple runtimes** — `base`, `node22`, `node24`, `python3.13`
|
|
33
33
|
- 📸 **VM snapshots** — save and restore VM state
|
|
34
34
|
- 📊 **JSON output** — `--json` flag for scripting and automation
|
|
35
35
|
|
|
36
36
|
## 📋 Prerequisites
|
|
37
37
|
|
|
38
38
|
- Linux (x86_64 or aarch64) with KVM support
|
|
39
|
-
- [Bun](https://bun.sh) >= 1.2
|
|
40
|
-
- [Go](https://go.dev) >= 1.22 (to build the in-VM agent)
|
|
41
39
|
- Root/sudo access (required for TAP device networking and jailer)
|
|
42
|
-
-
|
|
40
|
+
- Docker (for building runtime images and `--from-image`)
|
|
43
41
|
|
|
44
42
|
## 🚀 Install
|
|
45
43
|
|
|
46
|
-
### 1. Install Firecracker, kernel, and rootfs
|
|
47
|
-
|
|
48
44
|
```bash
|
|
49
45
|
curl -fsSL https://vmsan.dev/install | bash
|
|
50
46
|
```
|
|
51
47
|
|
|
48
|
+
This downloads and installs everything into `~/.vmsan/`:
|
|
49
|
+
|
|
50
|
+
- Firecracker + Jailer (latest release)
|
|
51
|
+
- Linux kernel (vmlinux 6.1)
|
|
52
|
+
- Ubuntu 24.04 rootfs (converted from squashfs to ext4)
|
|
53
|
+
- vmsan CLI + in-VM agent
|
|
54
|
+
- Runtime images (node22, node24, python3.13)
|
|
55
|
+
|
|
52
56
|
<details>
|
|
53
57
|
<summary>Uninstall</summary>
|
|
54
58
|
|
|
@@ -58,53 +62,27 @@ curl -fsSL https://vmsan.dev/install | bash -s -- --uninstall
|
|
|
58
62
|
|
|
59
63
|
</details>
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- Firecracker + Jailer (latest release)
|
|
64
|
-
- Linux kernel (vmlinux 6.1)
|
|
65
|
-
- Ubuntu 24.04 rootfs (converted from squashfs to ext4)
|
|
66
|
-
|
|
67
|
-
### 2. Install vmsan CLI
|
|
68
|
-
|
|
69
|
-
<!-- automd:pm-install -->
|
|
70
|
-
|
|
71
|
-
```sh
|
|
72
|
-
# ✨ Auto-detect
|
|
73
|
-
npx nypm install vmsan
|
|
74
|
-
|
|
75
|
-
# npm
|
|
76
|
-
npm install vmsan
|
|
77
|
-
|
|
78
|
-
# yarn
|
|
79
|
-
yarn add vmsan
|
|
80
|
-
|
|
81
|
-
# pnpm
|
|
82
|
-
pnpm add vmsan
|
|
83
|
-
|
|
84
|
-
# bun
|
|
85
|
-
bun install vmsan
|
|
86
|
-
|
|
87
|
-
# deno
|
|
88
|
-
deno install npm:vmsan
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
<!-- /automd -->
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Development setup</summary>
|
|
92
67
|
|
|
93
|
-
|
|
68
|
+
If you want to build from source:
|
|
94
69
|
|
|
95
70
|
```bash
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cd ..
|
|
99
|
-
```
|
|
71
|
+
# Install dependencies
|
|
72
|
+
bun install
|
|
100
73
|
|
|
101
|
-
|
|
74
|
+
# Build the in-VM agent
|
|
75
|
+
cd agent && make install && cd ..
|
|
102
76
|
|
|
103
|
-
|
|
104
|
-
bun
|
|
77
|
+
# Build the CLI
|
|
78
|
+
bun run build
|
|
79
|
+
|
|
80
|
+
# Link local build
|
|
81
|
+
mkdir -p ~/.vmsan/bin
|
|
82
|
+
ln -sf "$(pwd)/dist/bin/cli.mjs" ~/.vmsan/bin/vmsan
|
|
105
83
|
```
|
|
106
84
|
|
|
107
|
-
|
|
85
|
+
</details>
|
|
108
86
|
|
|
109
87
|
## 📖 Usage
|
|
110
88
|
|
package/dist/_chunks/connect.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as vmsanPaths } from "./paths.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { l as handleCommandError } from "./errors.mjs";
|
|
3
3
|
import { t as createCommandLogger } from "./logger.mjs";
|
|
4
|
-
import "./vm-state.mjs";
|
|
5
4
|
import { n as waitForAgent, t as resolveVmState } from "./vm-context.mjs";
|
|
6
5
|
import { t as ShellSession } from "./shell.mjs";
|
|
7
6
|
import { consola } from "consola";
|