Skip to main content
Version: master

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.

FlagEnvDefaultDescription
--user, -uPVR_USERNAMEUsername used for authentication with core services
--password, -pPVR_PASSWORDPassword used for authentication with core services
--access-token, -aPVR_ACCESSTOKENUse ACCESS_TOKEN for authorization with core services
--baseurl, -bPVR_BASEURLhttps://api.pantahub.comUse BASEURL for resolving prn URIs to core service endpoints
--http-proxyPVR_HTTP_PROXYsystemUse PVR_HTTP_PROXY to configure the proxy mode. Values 'no' (disable), '' (use proxy by url), 'system' (use system settings - default)
--repo-baseurl, -rPVR_REPO_BASEURLhttps://pvr.pantahub.comUse PVR_REPO_BASEURL for resolving PVR repositories like docker through user/name syntax.
--config-dir, -cPVR_CONFIG_DIR~/.pvrUse PVR_CONFIG_DIR for using a custom global config directory (used to store auth.json etc.).
--debug, -dPVR_DEBUGenable debugging output for rest calls
--disable-self-upgradePVR_DISABLE_SELF_UPGRADEdisable self-upgrades
--insecure, -iPVR_INSECUREskip tls verify

Command Reference

CategoryCommands
Repoinit, add, status, diff, commit, json, inspect, reset / checkout
Clone / Get / Mergeclone, get, merge
Pushput, post, export, import, putobjects
Applicationsapp add, app ls, app info, app rm, app install, app update
Devicesdevice 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
Signaturessig add, sig update, sig ls, sig download
Wi-Fi Provisioningwifi device-scan, wifi provision, wifi identify, wifi device-info, wifi hostname, wifi wifi-scan, wifi claim-info
Authlogin, whoami, register, curl, claim
Low-Leveldm-apply, dm-convert, fakeroot, fastcopy, deploy, global-config
Utilitiesversion, completion, self-upgrade, remoteinfo, stepinfo
Deprecatedscan, ps, logs