Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
CLI reference | pnpm
[go: Go Back, main page]

Skip to main content

CLI reference

pnpr [OPTIONS]

Options

FlagDescription
-c, --config <path>Path to a verdaccio-shaped YAML config. When omitted, the global config.yaml in pnpr's config dir is used if it exists, otherwise the bundled default config.
--listen <addr>Address to bind to. Defaults to 127.0.0.1:7677.
--storage <path>Override the storage directory from the loaded config — the source of truth for hosted packages.
--cache <path>Override the disposable proxy-cache directory (the mirror of upstream registries plus the resolver cache). Defaults to a .pnpr-cache subdirectory of the storage path.
--public-url <url>URL clients should use to reach the server, used when rewriting dist.tarball URLs in served packuments. Defaults to http://<listen>.
--packument-ttl-secs <n>Seconds before a cached packument is considered stale and refetched. When omitted, the loaded config's value wins.
--osvEnable local OSV npm vulnerability checks. Requires a local OSV npm database zip at --osv-db or <cache>/osv/npm/all.zip.
--osv-db <path>Path to the local OSV npm database zip or extracted JSON directory.
--disable-registryDisable the npm registry surface: packument and tarball reads, publish, unpublish, dist-tags, search, and login/token endpoints. Overrides registry.enabled.
--disable-resolverDisable the install-accelerator surface: GET /-/pnpr, POST /-/pnpr/v0/resolve, and POST /-/pnpr/v0/verify-lockfile. Overrides resolver.enabled.
-h, --helpPrint help.
-V, --versionPrint version.

Logging

The log level is controlled with the standard RUST_LOG environment variable, which always wins over the level set in the config file:

RUST_LOG=debug pnpr

The config log.level accepts trace, debug, http, info, warn, and error. http enables one access-log record per request while keeping the rest of the crate quieter.

Examples

Bind to all interfaces and tell clients to reach the server through a public hostname:

pnpr --listen 0.0.0.0:7677 --public-url https://registry.example.com

Run with a custom config and a separate, ephemeral cache volume:

pnpr -c ./pnpr.yaml --cache /mnt/ephemeral/pnpr-cache

Run only the pnpr resolver endpoints, without exposing an npm registry surface:

pnpr --disable-registry