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>
Global Flags
These flags are declared on the root pvr command and can be set on any
subcommand invocation, or via their environment variable.
| Flag | Env | Default | Description |
|---|---|---|---|
--user, -u | PVR_USERNAME | — | Username used for authentication with core services |
--password, -p | PVR_PASSWORD | — | Password used for authentication with core services |
--access-token, -a | PVR_ACCESSTOKEN | — | Use ACCESS_TOKEN for authorization with core services |
--baseurl, -b | PVR_BASEURL | https://api.pantahub.com | Use BASEURL for resolving prn URIs to core service endpoints |
--http-proxy | PVR_HTTP_PROXY | system | Use PVR_HTTP_PROXY to configure the proxy mode. Values 'no' (disable), ' |
--repo-baseurl, -r | PVR_REPO_BASEURL | https://pvr.pantahub.com | Use PVR_REPO_BASEURL for resolving PVR repositories like docker through user/name syntax. |
--config-dir, -c | PVR_CONFIG_DIR | ~/.pvr | Use PVR_CONFIG_DIR for using a custom global config directory (used to store auth.json etc.). |
--debug, -d | PVR_DEBUG | — | enable debugging output for rest calls |
--disable-self-upgrade | PVR_DISABLE_SELF_UPGRADE | — | disable self-upgrades |
--insecure, -i | PVR_INSECURE | — | skip tls verify |
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 accept-ownership, 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, claim |
| Low-Level | dm-apply, dm-convert, fakeroot, fastcopy, deploy, global-config |
| Utilities | version, completion, self-upgrade, remoteinfo, stepinfo |
| Deprecated | scan, ps, logs |