---
title: "vlt registry"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/commands/registry"
image: "https://docs.vlt.io/og/client/commands/registry"
lang: "en"
---

# vlt registry

Usage:

```bash title="Terminal"
$ vlt registry <alias> <command> [<args>]
```

Run an account command against a specific configured registry, selected by its [`registries`](https://docs.vlt.io/client/registries.md) alias instead of a full URL.

vlt's built-in `npm` alias is a read-only public mirror, so account and authentication commands need to know _which_ configured 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`](https://docs.vlt.io/client/commands/setup.md)).

## 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`](https://docs.vlt.io/client/registries.md#bare-specs-and---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:

```bash title="Terminal"
$ vlt registry main whoami
```

List tokens for the `npm` registry:

```bash title="Terminal"
$ vlt registry npm token list
```

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

```bash title="Terminal"
$ vlt registry whoami
```

## See also

- [Working with Named Registries](https://docs.vlt.io/client/registries.md)
- [`vlt setup`](https://docs.vlt.io/client/commands/setup.md)
- [Authentication](https://docs.vlt.io/client/auth.md)
