vlt setup
Usage:
$ vlt setup [<account>]Configure the registry aliases for your vlt.io account so that
vlt install and vlx work out of the box.
The npm registry alias has no built-in URL, so a fresh project can’t
resolve bare specifiers (like vlt install express) until a registry
is configured. vlt setup is the guided way to do that: sign up or
log in at https://www.vlt.io first, then run the
wizard.
What it does
- Prompts for your vlt.io account (or organization) slug if not passed as an argument.
- Stages the two registry aliases every account is provisioned with:
npm→https://registry.vlt.io/<account>/npm/(the default bare-spec alias)main→https://registry.vlt.io/<account>/main/(your account’s primary private registry)
- Optionally authenticates against those registries via the browser
web-login flow. A single token covers every registry on your
account, so the browser opens once and the token it returns is
saved for both the public
npmmirror and your privatemainregistry. - Loops to let you add any additional custom aliases (for partner or team registries), optionally authenticating against each.
- Writes the staged aliases into your user
vlt.json(merging with, not clobbering, existing entries). Aliases that already live in avlt.jsonare left where they are, so a project-local alias does not get copied into your user config (or the reverse). - If your keychain has a token for only one of
npm/main, copies it to the other. Existing tokens are never overwritten, andVLT_TOKEN*environment tokens are never saved. This also runs with--yesor when you skip authentication.
If the project you run this in configures its own registries, the
output says so:
project config takes precedence
for registry selection, so writing your user config would not take
effect there. Re-run with --config=project to configure that
project.
Options
| Flag | Description |
|---|---|
--config=<user|project> | Which config file to write to. Defaults to user; use project for the project. |
--registries=<name=url> | Additional registry aliases to stage non-interactively. Can be set multiple times. |
--yes | Skip interactive prompts. Requires <account>, no browser auth; step 6 still runs. |
Examples
Interactive setup for an account:
$ vlt setup my-accountUnattended setup (for CI or setup scripts):
$ vlt setup my-account --yes --registries team=https://registry.example.com/Write to the project’s vlt.json instead of your user config:
$ vlt setup my-account --config=project