vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
  • bugs
  • build
  • cache
  • config
  • create
  • docs
  • exec-cache
  • exec-local
  • exec
  • help
  • init
  • install
  • list
  • login
  • logout
  • pack
  • ping
  • pkg
  • publish
  • query
  • registry
  • repo
  • run-exec
  • run
  • setup
  • token
  • uninstall
  • version
  • whoami
  • Groupable commands
  • Alias resolution
  • Examples
  • See also
  1. Client
  2. /
  3. Commands
  4. /
  5. registry

vlt registry

Usage:

Terminal
$ vlt registry <alias> <command> [<args>]

Run an account command against a specific configured registry, selected by its registries alias instead of a full URL.

vlt has no default registry, so account and authentication commands need to know which registry to act against. vlt registry <alias> <command> scopes any of those commands to the registry configured under <alias> in your vlt.json — handy when you have more than one (for example the npm and main aliases created by vlt setup).

Groupable commands

<command> is any of the account/authentication commands:

whoami, logout, login, token, access, publish, unpublish, deprecate, dist-tag, profile, ping.

Alias resolution

The registry is resolved in this order:

  1. A --registry=<url> on the command line always wins.
  2. An explicit <alias> (as in vlt registry main whoami) is looked up in registries; an unknown alias is an error.
  3. With no explicit target and a single configured registry, that one is used.
  4. With multiple configured registries and no explicit target:
    • on an interactive terminal you are prompted to pick one (the --default-registry-alias is pre-selected);
    • otherwise (CI, pipes) it falls back to --default-registry-alias, erroring if that alias is not configured.

The same resolution applies to the top-level commands, so vlt whoami behaves like vlt registry whoami.

Examples

Check who you are on the main registry:

Terminal
$ vlt registry main whoami

List tokens for the npm registry:

Terminal
$ vlt registry npm token list

Omit the alias to choose interactively (or fall back to the default alias when non-interactive):

Terminal
$ vlt registry whoami

See also

  • Working with Named Registries
  • vlt setup
  • Authentication

PreviousqueryNextrepo

On this page

  • Groupable commands
  • Alias resolution
  • Examples
  • See also
Edit this page

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now