instabox 0.6.2 → 0.6.3
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/bin/instabox.mjs
CHANGED
|
@@ -497,10 +497,7 @@ async function onboard(wantBox) {
|
|
|
497
497
|
});
|
|
498
498
|
if (kg.status !== 0 || !existsSync(key + '.pub')) die('could not create an SSH key (ssh-keygen failed)');
|
|
499
499
|
const m = await client.call('GET', '/v1/machines/' + enc(box.id));
|
|
500
|
-
const ttlSeconds =
|
|
501
|
-
60,
|
|
502
|
-
Math.floor((new Date(m.timeoutAt || Date.now() + CERT_MIN * 60_000) - Date.now()) / 1000),
|
|
503
|
-
);
|
|
500
|
+
const ttlSeconds = CERT_MIN * 60;
|
|
504
501
|
const c = await client.call('POST', `/v1/machines/${enc(box.id)}/connections`, {
|
|
505
502
|
publicKey: readFileSync(key + '.pub', 'utf8').trim(),
|
|
506
503
|
ttlSeconds,
|
|
@@ -508,8 +505,7 @@ async function onboard(wantBox) {
|
|
|
508
505
|
writeFileSync(key + '-cert.pub', c.certificate.trim() + '\n');
|
|
509
506
|
writeFileSync(join(dir, 'known_hosts'), `@cert-authority [${c.host}]:${c.port} ${c.hostTrust.publicKey}\n`);
|
|
510
507
|
|
|
511
|
-
|
|
512
|
-
process.stdout.write(`\r ${green('✓')} box ${bold(m.name)} ${ready}${pauses}\n`);
|
|
508
|
+
process.stdout.write(`\r ${green('✓')} box ${bold(m.name)} ${ready}\n`);
|
|
513
509
|
const note = guestUserNote(box.user, m.name, m.guestUser);
|
|
514
510
|
if (note) console.log(dim(` ${note}`));
|
|
515
511
|
await reportInstalls(cli);
|
package/package.json
CHANGED
package/skills/instabox/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: instabox
|
|
3
|
-
description: Use when the user wants a cloud Linux box (instabox sandbox) from the terminal with the `instabox` CLI — create one, SSH in, run a command in it, read its files, set its
|
|
3
|
+
description: Use when the user wants a cloud Linux box (instabox sandbox) from the terminal with the `instabox` CLI — create one, SSH in, run a command in it, read its files, set its idle auto-pause, or delete it, or to report a problem with instabox itself (`instabox feedback`). For saving or restoring a box's disks, see instabox-snapshots.
|
|
4
4
|
metadata:
|
|
5
5
|
installed-by: instabox
|
|
6
6
|
---
|
|
@@ -34,13 +34,13 @@ For CI or an agent without a browser, use an API key instead: `export INSTABOX_A
|
|
|
34
34
|
|
|
35
35
|
A box is 4 vCPU / 8 GB of memory unless `create` names another size of the account's plan with both `--vcpus` and `--mem-mib`:
|
|
36
36
|
|
|
37
|
-
| Plan | Sizes (`--vcpus` / `--mem-mib`)
|
|
38
|
-
| ---- |
|
|
39
|
-
| Free | 4 / 8192 (default)
|
|
40
|
-
| Pro | 2 / 4096, 4 / 8192 (default), 8 / 16384
|
|
41
|
-
| Team | 4 / 8192 (default) up to 32 / 65536
|
|
37
|
+
| Plan | Sizes (`--vcpus` / `--mem-mib`) |
|
|
38
|
+
| ---- | --------------------------------------------- |
|
|
39
|
+
| Free | 4 / 8192 (default) |
|
|
40
|
+
| Pro | 2 / 4096, 4 / 8192 (default), 8 / 16384 |
|
|
41
|
+
| Team | 2 / 4096, 4 / 8192 (default) up to 32 / 65536 |
|
|
42
42
|
|
|
43
|
-
`instabox whoami --json` lists the sizes this account may create as `allowedSpecs` (the default first, then the plan's others and any an admin granted); check it rather than assuming the plan. Another size is refused with `400 spec_not_allowed`, whose message names the account's sizes. Pick a size for the work: 2 vCPU for light editing or a single agent, the default for most builds, 8 vCPU (
|
|
43
|
+
`instabox whoami --json` lists the sizes this account may create as `allowedSpecs` (the default first, then the plan's others and any an admin granted); check it rather than assuming the plan. Another size is refused with `400 spec_not_allowed`, whose message names the account's sizes. Pick a size for the work: 2 vCPU (paid plans) for light editing or a single agent, the default for most builds, 8 vCPU (paid plans) for heavy builds or many processes. `--snapshot` takes the same flags. The size is fixed once the box exists; for another size, save a snapshot and create a new box from it with the size flags.
|
|
44
44
|
|
|
45
45
|
## Everyday commands
|
|
46
46
|
|
|
@@ -53,7 +53,6 @@ instabox exec work -- uname -a # one command, no SSH client nee
|
|
|
53
53
|
instabox exec work --cwd /data/home -- ls -la # exec runs `bash -lc` as the box's user
|
|
54
54
|
instabox files work /data/home # list a directory (or print a text file)
|
|
55
55
|
instabox auto-suspend work 10m # idle time before it pauses (fixed at 30m unless an admin gave the account manual lifecycle)
|
|
56
|
-
instabox timeout work 2h --on-timeout pause # pause (keeps memory) or kill at the deadline
|
|
57
56
|
instabox stop work && instabox start work # stop ends processes, keeps disks
|
|
58
57
|
instabox suspend work && instabox resume work # pause/resume keeps running processes
|
|
59
58
|
instabox rename work api # rename in place, any state; ID and port URLs stay
|
|
@@ -61,8 +60,8 @@ instabox rm work # delete the box
|
|
|
61
60
|
```
|
|
62
61
|
|
|
63
62
|
- Names or IDs (`m_...`) both work wherever `<id-or-name>` is accepted.
|
|
64
|
-
- `create` options: `--template T` or `--snapshot S`, `--vcpus N --mem-mib M` (a size of the plan, see Sizes), `--auto-suspend D|0`, `--
|
|
65
|
-
- A box pauses itself after 30 idle minutes (no agent working, no terminal use, little CPU) and wakes on the next `exec`, `ssh`, `files`, public port request or `instabox wake <box>`; a paused box keeps its memory and processes. The 30 minutes are fixed for every account unless an admin gave it manual lifecycle: only then do `--auto-suspend 0` (always on) and `--auto-suspend 2h` apply, and the CLI prints a note when the server kept 30m.
|
|
63
|
+
- `create` options: `--template T` or `--snapshot S`, `--vcpus N --mem-mib M` (a size of the plan, see Sizes), `--auto-suspend D|0`, `--meta K=V`, `--org O`, `--secrets all|NAME,NAME|none`, `--env-secrets NAME,NAME|none`, `--no-wait`.
|
|
64
|
+
- A box pauses itself after 30 idle minutes (no agent working, no terminal use, little CPU) and wakes on the next `exec`, `ssh`, `files`, public port request or `instabox wake <box>`; a paused box keeps its memory and processes. The 30 minutes are fixed for every account unless an admin gave it manual lifecycle: only then do `--auto-suspend 0` (always on) and `--auto-suspend 2h` apply, and the CLI prints a note when the server kept 30m. Boxes have no other timeout. Do not try to keep a box on by other means; a paused box resumes on the next command.
|
|
66
65
|
- Use `exec` to run a command and read its output, and `ssh` for an interactive shell.
|
|
67
66
|
- `exec` returns the command's exit code and takes `--stdin` to pipe input. It stops the command after `--timeout` seconds: 60 by default, 600 at most. Run anything longer (installs, builds, test suites) over SSH, which has no time limit and also returns the exit code: `instabox ssh work -- 'cd /data/workspace/app && npm ci'`.
|
|
68
67
|
- The box's HOME has `MACHINE.md` (which box it is, its size, what survives a stop, the installed tools) and `AGENTS.md`. Both are worth reading before working in the box; they appear a moment after it starts.
|
|
@@ -121,6 +120,6 @@ instabox feedback --json --type bug --component cli --area exec \
|
|
|
121
120
|
|
|
122
121
|
## Habits
|
|
123
122
|
|
|
124
|
-
- Forgotten boxes pause themselves
|
|
123
|
+
- Forgotten boxes pause themselves after 30 idle minutes. Delete a box with `instabox rm` once its work is done.
|
|
125
124
|
- When the user asks for a new box, create one, with a name `instabox ls` does not already show. Offer an existing box only when they want to continue earlier work in it.
|
|
126
125
|
- `instabox usage` shows storage use and limits. A quota error means delete or stop something; do not retry the same create in a loop.
|
|
@@ -72,7 +72,7 @@ BOX=<box>
|
|
|
72
72
|
instabox create --name "$BOX" --meta repo="$(basename "$DEST")"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Box names are lowercase letters, digits and `-`. The box gets the default size, 4 vCPU / 8 GB (the instabox skill's Sizes lists the others a plan offers). The default template (`agent-browser`, shown as standard in the dashboard) has git, Node.js 22, Python (uv), Go, Rust, a C toolchain, Docker and a desktop with Chromium.
|
|
75
|
+
Box names are lowercase letters, digits and `-`. The box gets the default size, 4 vCPU / 8 GB (the instabox skill's Sizes lists the others a plan offers). The default template (`agent-browser`, shown as standard in the dashboard) has git, Node.js 22, Python (uv), Go, Rust, a C toolchain, Docker and a desktop with Chromium. This box is meant to stay; it pauses itself after 30 idle minutes. The `repo=` label can match existing Vault selectors; it does not select org Secrets. Without Secret selection flags the box keeps the existing Vault behavior. Opt into org Secrets explicitly with `--secrets` or `--env-secrets`; at creation, `--env-secrets` alone also selects all org proxy Secrets. Use `--no-vault --secrets none --env-secrets none` when neither store should deliver credentials.
|
|
76
76
|
|
|
77
77
|
## 3. Copy the repo and its worktrees
|
|
78
78
|
|
|
@@ -68,7 +68,7 @@ Snapshots count toward the account's snapshot and storage limits (`instabox usag
|
|
|
68
68
|
|
|
69
69
|
## Typical agent loop
|
|
70
70
|
|
|
71
|
-
1. `instabox create --name job --snapshot <base>` (it pauses by itself after 30 idle minutes
|
|
71
|
+
1. `instabox create --name job --snapshot <base>` (it pauses by itself after 30 idle minutes)
|
|
72
72
|
2. Work with `instabox exec job -- ...`
|
|
73
73
|
3. When the setup is worth keeping: `instabox snapshot save job --name <base>-v2` (no need to stop it)
|
|
74
74
|
4. `instabox rm job` when done.
|