viberun 0.3.7 → 0.4.2
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 +90 -84
- package/package.json +1 -1
- package/vendor/aarch64-apple-darwin/viberun/viberun +0 -0
- package/vendor/aarch64-pc-windows-msvc/viberun/viberun.exe +0 -0
- package/vendor/aarch64-unknown-linux-musl/viberun/viberun +0 -0
- package/vendor/x86_64-apple-darwin/viberun/viberun +0 -0
- package/vendor/x86_64-pc-windows-msvc/viberun/viberun.exe +0 -0
- package/vendor/x86_64-unknown-linux-musl/viberun/viberun +0 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# viberun
|
|
6
6
|
|
|
7
|
-
`viberun` is a
|
|
7
|
+
`viberun` is a shell-first, agent-native app host. Run `viberun` to open the shell, then `vibe <app>` to jump into a persistent Ubuntu container on a remote host. App data is stored under `/home/viberun` and survives container restarts or image updates.
|
|
8
8
|
|
|
9
9
|
## Quick start (end-to-end)
|
|
10
10
|
|
|
@@ -35,30 +35,39 @@ Or with env vars:
|
|
|
35
35
|
curl -fsSL https://viberun.sh | VIBERUN_INSTALL_DIR=~/.local/bin VIBERUN_INSTALL_BIN=viberun bash
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
### 2)
|
|
38
|
+
### 2) Connect a host (once per VM)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Start the shell:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
viberun
|
|
43
|
+
viberun
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
If this is the first time, you'll see a setup banner. Type:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
|
|
49
|
+
setup
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Enter your SSH login (for example, `user@myhost` in `~/.ssh/config`).
|
|
53
|
+
You can also run setup directly from the CLI:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
viberun setup myhost
|
|
50
57
|
```
|
|
51
58
|
|
|
52
59
|
### 3) Start your first app
|
|
53
60
|
|
|
61
|
+
Inside the shell:
|
|
62
|
+
|
|
54
63
|
```bash
|
|
55
|
-
|
|
64
|
+
vibe hello-world
|
|
56
65
|
```
|
|
57
66
|
|
|
58
|
-
If this is the first run, the server will
|
|
67
|
+
If this is the first run, the server will create the container.
|
|
59
68
|
|
|
60
|
-
Detach without stopping the agent: Ctrl-\\ . Reattach later with `
|
|
61
|
-
Paste clipboard images into the session with Ctrl-V;
|
|
69
|
+
Detach without stopping the agent: Ctrl-\\ . Reattach later with `vibe hello-world`.
|
|
70
|
+
Paste clipboard images into the session with Ctrl-V; viberun uploads the image and inserts a `/tmp/viberun-clip-*.png` path.
|
|
62
71
|
|
|
63
72
|
### 4) Hello-world prompt (paste inside the session)
|
|
64
73
|
|
|
@@ -68,35 +77,31 @@ Create a beautiful hello-world web app with a simple, tasteful landing page.
|
|
|
68
77
|
|
|
69
78
|
### 5) Open the app
|
|
70
79
|
|
|
71
|
-
|
|
80
|
+
From the shell:
|
|
72
81
|
|
|
73
|
-
```
|
|
74
|
-
|
|
82
|
+
```bash
|
|
83
|
+
open hello-world
|
|
75
84
|
```
|
|
76
85
|
|
|
77
|
-
|
|
78
|
-
If you've configured app URLs, `viberun <app> url` shows the HTTPS address.
|
|
86
|
+
When the shell starts, viberun forwards app ports automatically. `open` prefers a public URL if configured; otherwise it uses the localhost URL.
|
|
79
87
|
|
|
80
88
|
## Common commands
|
|
81
89
|
|
|
90
|
+
Shell commands (inside `viberun`):
|
|
91
|
+
|
|
82
92
|
```bash
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
viberun
|
|
94
|
-
viberun
|
|
95
|
-
viberun proxy setup
|
|
96
|
-
viberun users list
|
|
97
|
-
viberun wipe
|
|
98
|
-
viberun config --host myhost --agent codex
|
|
99
|
-
viberun version
|
|
93
|
+
vibe myapp
|
|
94
|
+
open myapp
|
|
95
|
+
apps
|
|
96
|
+
app myapp
|
|
97
|
+
rm myapp
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
CLI commands (advanced):
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
viberun setup [<host>]
|
|
104
|
+
viberun wipe [<host>]
|
|
100
105
|
```
|
|
101
106
|
|
|
102
107
|
<details>
|
|
@@ -110,7 +115,7 @@ viberun version
|
|
|
110
115
|
- [High-level flow](#high-level-flow)
|
|
111
116
|
- [Core components](#core-components)
|
|
112
117
|
- [Session lifecycle](#session-lifecycle)
|
|
113
|
-
- [
|
|
118
|
+
- [Setup pipeline](#setup-pipeline)
|
|
114
119
|
- [Networking and ports](#networking-and-ports)
|
|
115
120
|
- [App URLs and proxy](#app-urls-and-proxy)
|
|
116
121
|
- [Snapshots and restore](#snapshots-and-restore)
|
|
@@ -130,10 +135,10 @@ Git, SSH, and the GitHub CLI are installed in containers. viberun seeds `git con
|
|
|
130
135
|
|
|
131
136
|
Choose one of these auth paths:
|
|
132
137
|
|
|
133
|
-
- **SSH (agent forwarding)**:
|
|
138
|
+
- **SSH (agent forwarding)**: Start viberun with `VIBERUN_FORWARD_AGENT=1 viberun`, then `vibe <app>`. For existing apps, run `app <app>` followed by `update` once to recreate the container with the agent socket mounted. Then `ssh -T git@github.com` inside the container to verify access.
|
|
134
139
|
- **HTTPS (GitHub CLI)**: Run `gh auth login` and choose HTTPS, then `gh auth setup-git`. Verify with `gh auth status`.
|
|
135
140
|
|
|
136
|
-
If you update your local Git identity later, restart the app container (or run `
|
|
141
|
+
If you update your local Git identity later, restart the app container (or run `app <app>` then `update`) to re-apply the new values on startup.
|
|
137
142
|
|
|
138
143
|
## Development
|
|
139
144
|
|
|
@@ -182,23 +187,23 @@ bin/viberun-e2e-local
|
|
|
182
187
|
bin/viberun-integration
|
|
183
188
|
```
|
|
184
189
|
|
|
185
|
-
###
|
|
190
|
+
### Setup in development
|
|
186
191
|
|
|
187
|
-
When you run `viberun` via `go run` (or
|
|
192
|
+
When you run `viberun` via `go run` (or set `VIBERUN_DEV=1`), setup defaults to staging the local server binary and building the container image locally. Run:
|
|
188
193
|
|
|
189
194
|
```bash
|
|
190
|
-
viberun
|
|
195
|
+
viberun
|
|
196
|
+
setup
|
|
191
197
|
```
|
|
192
198
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
If you want to explicitly pass a local server binary:
|
|
199
|
+
Or directly:
|
|
196
200
|
|
|
197
201
|
```bash
|
|
198
|
-
|
|
199
|
-
viberun bootstrap --local-path /tmp/viberun-server myhost
|
|
202
|
+
viberun setup myhost
|
|
200
203
|
```
|
|
201
204
|
|
|
205
|
+
Under the hood, it builds a `viberun:dev` image for the host architecture, streams it over `ssh` with `docker save | docker load`, and tags it as `viberun:latest` on the host.
|
|
206
|
+
|
|
202
207
|
For the full build/test/E2E flow, see `DEVELOPMENT.md`.
|
|
203
208
|
|
|
204
209
|
## Architecture
|
|
@@ -206,16 +211,17 @@ For the full build/test/E2E flow, see `DEVELOPMENT.md`.
|
|
|
206
211
|
### High-level flow
|
|
207
212
|
|
|
208
213
|
```
|
|
209
|
-
viberun
|
|
210
|
-
->
|
|
211
|
-
->
|
|
212
|
-
->
|
|
213
|
-
->
|
|
214
|
+
viberun (shell)
|
|
215
|
+
-> vibe <app>
|
|
216
|
+
-> ssh <host>
|
|
217
|
+
-> viberun-server gateway (mux)
|
|
218
|
+
-> viberun-server <app>
|
|
219
|
+
-> docker container viberun-<app>
|
|
220
|
+
-> agent session (tmux)
|
|
214
221
|
|
|
215
222
|
container port 8080
|
|
216
223
|
-> host port (assigned per app)
|
|
217
|
-
->
|
|
218
|
-
-> http://localhost:<port>
|
|
224
|
+
-> mux forward -> http://localhost:<port>
|
|
219
225
|
-> (optional) host proxy (Caddy)
|
|
220
226
|
-> https://<app>.<domain>
|
|
221
227
|
```
|
|
@@ -223,7 +229,7 @@ container port 8080
|
|
|
223
229
|
### Core components
|
|
224
230
|
|
|
225
231
|
- Client: `viberun` CLI on your machine.
|
|
226
|
-
- Server: `viberun-server` executed on the host via SSH (no long-running daemon required).
|
|
232
|
+
- Server: `viberun-server gateway` executed on the host via SSH (no long-running daemon required).
|
|
227
233
|
- Container: `viberun-<app>` Docker container built from the `viberun:latest` image.
|
|
228
234
|
- Agent: runs inside the container in a tmux session (default provider: `codex`).
|
|
229
235
|
- Host RPC: local Unix socket used by the container to request snapshot/restore operations.
|
|
@@ -231,14 +237,14 @@ container port 8080
|
|
|
231
237
|
|
|
232
238
|
### Session lifecycle
|
|
233
239
|
|
|
234
|
-
1. `viberun
|
|
235
|
-
2.
|
|
240
|
+
1. `viberun` connects to the host (from your saved config) and starts the `viberun-server gateway` over SSH.
|
|
241
|
+
2. `vibe <app>` creates the container if needed, or starts it if it already exists.
|
|
236
242
|
3. The agent process is attached via `docker exec` inside a tmux session so it persists across disconnects.
|
|
237
|
-
4. `viberun`
|
|
243
|
+
4. `viberun` forwards app ports when the shell starts so you can open `http://localhost:<port>` immediately.
|
|
238
244
|
|
|
239
|
-
###
|
|
245
|
+
### Setup pipeline
|
|
240
246
|
|
|
241
|
-
The
|
|
247
|
+
The setup script (run on the host) does the following:
|
|
242
248
|
|
|
243
249
|
- Verifies the host is Ubuntu.
|
|
244
250
|
- Installs Docker (if missing) and enables it.
|
|
@@ -246,9 +252,9 @@ The bootstrap script (run on the host) does the following:
|
|
|
246
252
|
- Pulls the `viberun` container image from GHCR (unless using local image mode).
|
|
247
253
|
- Downloads and installs the `viberun-server` binary.
|
|
248
254
|
|
|
249
|
-
If
|
|
255
|
+
If setup is run from a TTY, it will offer to set up a public domain name (same as `proxy setup` in the shell).
|
|
250
256
|
|
|
251
|
-
Useful
|
|
257
|
+
Useful setup overrides:
|
|
252
258
|
|
|
253
259
|
- `VIBERUN_SERVER_REPO`: GitHub repo for releases (default `shayne/viberun`).
|
|
254
260
|
- `VIBERUN_SERVER_VERSION`: release tag or `latest`.
|
|
@@ -263,41 +269,41 @@ Useful bootstrap overrides:
|
|
|
263
269
|
|
|
264
270
|
- Each app container exposes port `8080` internally.
|
|
265
271
|
- The host port is assigned per app (starting at `8080`) and stored in the host server state.
|
|
266
|
-
- `viberun`
|
|
272
|
+
- `viberun` forwards app ports when the shell starts so `http://localhost:<port>` connects to the host port.
|
|
267
273
|
- If the proxy is configured, apps can also be served over HTTPS at `https://<app>.<domain>` (or a custom domain). Access requires login by default and can be made public per app.
|
|
268
274
|
|
|
269
275
|
### App URLs and proxy
|
|
270
276
|
|
|
271
277
|
`viberun` can optionally expose apps via a host-side proxy (Caddy + `viberun-auth`).
|
|
272
|
-
Set it up once per host:
|
|
278
|
+
Set it up once per host (inside the shell):
|
|
273
279
|
|
|
274
280
|
```bash
|
|
275
|
-
|
|
281
|
+
proxy setup [<host>]
|
|
276
282
|
```
|
|
277
283
|
|
|
278
284
|
You'll be prompted for a base domain and public IP (for DNS), plus a primary username/password.
|
|
279
285
|
Create an A record (or wildcard) pointing to the host's public IP.
|
|
280
286
|
|
|
281
|
-
After setup:
|
|
287
|
+
After setup, in the shell:
|
|
282
288
|
|
|
283
|
-
- `
|
|
284
|
-
- `
|
|
285
|
-
- `
|
|
286
|
-
- `
|
|
287
|
-
- `
|
|
288
|
-
- `
|
|
289
|
+
- `app <app>` then `url` shows the current URL and access status.
|
|
290
|
+
- `url public` or `url private` toggles access (default requires login).
|
|
291
|
+
- `url set-domain <domain>` or `url reset-domain` manages custom domains.
|
|
292
|
+
- `url disable` or `url enable` turns the URL off/on.
|
|
293
|
+
- `url open` opens the URL in your browser.
|
|
294
|
+
- `users` manages login accounts; `app <app>` then `users` controls who can access the app.
|
|
289
295
|
|
|
290
|
-
If URL settings change, run `
|
|
296
|
+
If URL settings change, run `app <app>` then `update` to refresh `VIBERUN_PUBLIC_URL` and `VIBERUN_PUBLIC_DOMAIN` inside the container.
|
|
291
297
|
|
|
292
298
|
### Snapshots and restore
|
|
293
299
|
|
|
294
300
|
Snapshots are Btrfs subvolume snapshots of the app's `/home/viberun` volume (auto-incremented versions).
|
|
295
301
|
On the host, each app uses a loop-backed Btrfs file under `/var/lib/viberun/apps/<app>/home.btrfs`.
|
|
296
302
|
|
|
297
|
-
- `
|
|
298
|
-
- `
|
|
299
|
-
- `
|
|
300
|
-
- `
|
|
303
|
+
- `app <app>` then `snapshot` creates the next `vN` snapshot.
|
|
304
|
+
- `app <app>` then `snapshots` lists versions with timestamps.
|
|
305
|
+
- `app <app>` then `restore <vN|latest>` restores from a snapshot (`latest` picks the highest `vN`).
|
|
306
|
+
- `rm <app>` removes the container, the app volume + snapshots, and the host RPC directory.
|
|
301
307
|
|
|
302
308
|
Restore details:
|
|
303
309
|
- The host stops the container (if running) to safely unmount the volume.
|
|
@@ -331,19 +337,19 @@ Supported agent providers:
|
|
|
331
337
|
- `ampcode` (alias: `amp`)
|
|
332
338
|
- `opencode`
|
|
333
339
|
|
|
334
|
-
Custom agents can be run via `npx:<pkg>` or `uvx:<pkg>` (for example, `
|
|
340
|
+
Custom agents can be run via `npx:<pkg>` or `uvx:<pkg>` (for example, set `config set agent npx:@sourcegraph/amp@latest` in the shell).
|
|
335
341
|
|
|
336
|
-
Set
|
|
337
|
-
To forward your local SSH agent into the container,
|
|
342
|
+
Set the default agent with `config set agent <provider>` in the shell.
|
|
343
|
+
To forward your local SSH agent into the container, start viberun with `VIBERUN_FORWARD_AGENT=1 viberun`. For existing apps, run `app <app>` then `update` once to recreate the container with the agent socket mounted.
|
|
338
344
|
|
|
339
345
|
Base skills are shipped in `/opt/viberun/skills` and symlinked into each agent's skills directory. User skills can be added directly to the agent-specific skills directory under `/home/viberun`.
|
|
340
346
|
|
|
341
347
|
### Security model
|
|
342
348
|
|
|
343
|
-
- All control traffic goes over SSH; the server is invoked on demand and does not expose a network port.
|
|
349
|
+
- All control traffic goes over the mux over SSH; the server is invoked on demand and does not expose a network port.
|
|
344
350
|
- The host RPC socket is local-only and protected by filesystem permissions and a per-session token.
|
|
345
351
|
- Containers are isolated by Docker and only the app port is exposed.
|
|
346
|
-
- App URLs are optional: the proxy requires login by default and can be made public per app with `
|
|
352
|
+
- App URLs are optional: the proxy requires login by default and can be made public per app with `app <app>` then `url public`.
|
|
347
353
|
|
|
348
354
|
### Wipe (safety)
|
|
349
355
|
|
|
@@ -372,9 +378,9 @@ Locally, it removes `~/.config/viberun/config.toml` (and legacy config if presen
|
|
|
372
378
|
|
|
373
379
|
### Troubleshooting
|
|
374
380
|
|
|
375
|
-
- `unsupported OS: ... expected ubuntu`:
|
|
376
|
-
- `docker is required but was not found in PATH`: install Docker on the host or
|
|
377
|
-
- `missing btrfs on host`: rerun
|
|
378
|
-
- `no host provided and no default host configured`: run `
|
|
379
|
-
- `container image architecture mismatch`: delete and recreate the app (`
|
|
380
|
-
- `proxy is not configured`: run `
|
|
381
|
+
- `unsupported OS: ... expected ubuntu`: setup currently supports Ubuntu only.
|
|
382
|
+
- `docker is required but was not found in PATH`: install Docker on the host or rerun setup.
|
|
383
|
+
- `missing btrfs on host`: rerun setup to install `btrfs-progs` and ensure sudo access.
|
|
384
|
+
- `no host provided and no default host configured`: run `setup` in the shell or `viberun setup myhost`.
|
|
385
|
+
- `container image architecture mismatch`: delete and recreate the app (`rm <app>`).
|
|
386
|
+
- `proxy is not configured`: run `proxy setup` (then retry `app <app>` and `url`).
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|