Script vmup
Non-interactive vmup init, VMUP_* env overlays, and --json on stdout for scripts and CI. The spinner still goes to stderr.
vmup is built so a shell script can drive it: flags beat env, env beats config.toml. Spinner and human text go to stderr. Machine output with --json goes to stdout.
Non-interactive init
VMUP_HOST=192.168.1.10 \
VMUP_USER=ubuntu \
VMUP_KEY=~/.ssh/id_ed25519 \
VMUP_PORT=22 \
VMUP_REMOTE_DIR=~/vmup \
VMUP_TTL_MINUTES=5 \
VMUP_PROFILE=default \
vmup init -y --no-sweeper-y without VMUP_HOST exits 1:
Non-interactive init requires VMUP_HOST (and usually VMUP_USER / VMUP_KEY)--no-sweeper skips remote cron. Omit it to install the sweeper after a successful SSH test.
Upload in a script
vmup shot.png notes.pdf --json
echo $?Exit 0 and a JSON object with "ok": true means the remote folder exists. Parse remotePath and prompt. --json does not copy to the clipboard. Full schema: JSON output.
vmup --json shot.png | jq -r '.prompt'The spinner still runs on stderr if stderr is a TTY. Redirect stderr if you need a quiet log:
vmup shot.png --json 2>/dev/nullCheck from CI
vmup check --json{
"ok": true,
"profile": "default",
"remoteDir": "~/vmup",
"sweeper": true
}Non-zero exit: "ok": false and "error" on stdout when you passed --json.
Overlay a host without editing the file
VMUP_HOST=10.0.0.8 VMUP_USER=ubuntu vmup checkUseful on a laptop that already has a profile, when a job should hit a different IP. Environment variables lists every key, including VMUP_CLIPBOARD_COPY (prompt, path, or none).
Disable the update notice
export VMUP_NO_UPDATE_CHECK=1That skips both the stderr banner and the background npm fetch. CI=true or CI=1 does the same.
--json, non-TTY stdout/stderr (pipes), and -V / --version never print the notice. The banner is printed from ~/.cache/vmup/update-check.json at most once per day while the install is behind; the command does not wait on npm.
Colors
NO_COLOR (any value), FORCE_COLOR=0, or TERM=dumb turn off ANSI. Color is off when stdout is not a TTY.
Wipe remote batches
vmup prune --allDeletes every remote agents-* directory, including ones still inside TTL. --id deletes one batch. Default vmup prune still honors TTL. Recipes: Clean up batches.
prune --json
vmup prune accepts --json (including with --all), but it does not print a JSON result body. The flag only suppresses the update notice. Human lines (Pruned N remote batch(es)) still go to stderr. Prefer vmup check --json and vmup … --json for parsers.
Restrict to images
Turn off accept_all_files for images only, then opt into video with --video or extra types with --force on picker and path args.
Clean up batches
TTL, the remote sweeper cron, vmup prune --all to wipe live batches, and leftover local staging under ~/.cache/vmup after a failed or kept upload.