vlt registry
Usage:
$ 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:
- A
--registry=<url>on the command line always wins. - An explicit
<alias>(as invlt registry main whoami) is looked up inregistries; an unknown alias is an error. - With no explicit target and a single configured registry, that one is used.
- With multiple configured registries and no explicit target:
- on an interactive terminal you are prompted to pick one (the
--default-registry-aliasis pre-selected); - otherwise (CI, pipes) it falls back to
--default-registry-alias, erroring if that alias is not configured.
- on an interactive terminal you are prompted to pick one (the
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:
$ vlt registry main whoamiList tokens for the npm registry:
$ vlt registry npm token listOmit the alias to choose interactively (or fall back to the default alias when non-interactive):
$ vlt registry whoami