---
title: "@vltpkg/cli-sdk: index — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/cli-sdk/module_index"
image: "https://docs.vlt.io/og/client/api-reference/cli-sdk/module_index"
lang: "en"
---

# index

## Type Aliases

### Command\<T>

```ts
type Command<T> = object;
```

Defined in: src/cli-sdk/src/load-command.ts:16

#### Type Parameters

| Type Parameter |
| -------------- |
| `T`            |

#### Type declaration

| Name                | Type                                                                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`           | [`CommandFn`](https://docs.vlt.io/client/api-reference/cli-sdk/module_index.md#commandfnt)<`T`> | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `needsNpmRegistry`? | `boolean`                                                                                       | Set to `true` by commands that install packages (`install`, `update`, `uninstall`, `ci`, `exec`/`vlx`). `outputCommand()` fails early with an `ECONFIG` error when the alias bare specs resolve through (`registries.npm`, built in, or the alias named by `default-registry-alias`) has no URL.                                                                                                                                                                                              |
| `needsRegistry`?    | `"read"` \| `"write"` \| (`conf`) => `"read"` \| `"write"` \| `undefined`                       | Set by commands that hit a registry or resolve registry specs. `'read'` commands only fetch, so the built-in `npm` alias (vlt's public, read-only npm mirror) is enough. `'write'` commands publish or authenticate, so `outputCommand()` fails early with an `ECONFIG` error unless the user configured a registry. `publish`/`unpublish` check in-command instead, since `publishConfig.registry` may suffice. A function decides per invocation, e.g. when only some subcommands need one. |
| `usage`             | [`CommandUsage`](https://docs.vlt.io/client/api-reference/cli-sdk/module_index.md#commandusage) | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `views`             | [`Views`](https://docs.vlt.io/client/api-reference/cli-sdk/view.md#viewst)<`T`>                 | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

---

### CommandFn()\<T>

```ts
type CommandFn<T> = (conf) => Promise<T>;
```

Defined in: src/cli-sdk/src/load-command.ts:12

A command function that may return a result of `T`. If the result is `undefined`, no final output will be displayed by default.

#### Type Parameters

| Type Parameter | Default type |
| -------------- | ------------ |
| `T`            | `unknown`    |

#### Parameters

| Parameter | Type                                                                                      |
| --------- | ----------------------------------------------------------------------------------------- |
| `conf`    | [`LoadedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#loadedconfig) |

#### Returns

`Promise`<`T`>

---

### CommandUsage()

```ts
type CommandUsage = () => Jack;
```

Defined in: src/cli-sdk/src/load-command.ts:6

#### Returns

`Jack`

## Functions

### default()

```ts
function default(): Promise<void>
```

Defined in: src/cli-sdk/src/index.ts:82

#### Returns

`Promise`<`void`>
