PVR — Pantavisor Repository
PVR is the Pantavisor repository tool. It manages device state as a versioned JSON document with an object store backend, enabling atomic updates, diffs, merges, and OTA-style pushes for Pantavisor-powered devices.
Core Concepts
- State JSON — a single JSON file that unambiguously describes the entire device directory tree. JSON files are inlined; binary blobs are referenced by SHA hash.
- Object Store — flat directory of content-addressed objects (SHA-256). Objects are shared across repos and hardlinked on checkout.
- Repo (
.pvr/) — hidden directory holding the state JSON (json), pristine state (pristine.json), and object store. - Revision — an atomically committed snapshot of the working tree. Revisions are pushed to device trails on Pantahub.
- Trail — a REST endpoint (Pantahub trail) holding a sequence of revisions for a device.
Typical Workflow
# Clone an existing device state
pvr clone https://pvr.pantahub.com/user/device my-device
# Add a container application
pvr app add nginx --from=nginx:alpine
# Stage changes
pvr add .
pvr add --raw large-config.json # keep large JSON as raw object
# Review
pvr status
pvr diff
# Commit
pvr commit -m "add nginx app"
# Deploy to device
pvr post https://api.pantahub.com/trails/<DEVICE_ID>
Command Reference
| Category | Commands |
|---|---|
| Repo | init, add, status, diff, commit, json, inspect, reset / checkout |
| Clone / Get / Merge | clone, get, merge |
| Push | put, post, export, import, putobjects |
| Applications | app add, app ls, app info, app rm, app install, app update |
| Devices | device ps, device logs, device scan, device create, device get, device set, device delete, device status, device steps, device statediff, device tty, device tokens |
| Signatures | sig add, sig update, sig ls, sig download |
| Wi-Fi Provisioning | wifi device-scan, wifi provision, wifi identify, wifi device-info, wifi hostname, wifi wifi-scan, wifi claim-info |
| Auth | login, whoami, register, curl |
| Low-Level | dm-apply, dm-convert, fakeroot, fastcopy, deploy, global-config |
| Utilities | version, completion, self-upgrade, remoteinfo, stepinfo |
| Deprecated | scan, ps, logs |