# registry add

Add or update a registry configuration

Canonical URL: https://docs.paradoc.dev/cli/commands/registry/add/

Add or update a registry configuration.

## Usage

```bash
paradoc registry add <url> [options]
paradoc registry add <namespace> <url> [options]
```

## Arguments

| Argument | Description                                                                          |
| -------- | ------------------------------------------------------------------------------------ |
| `first`  | Registry namespace (e.g., `@acme`), or the registry URL when it is the only argument |
| `second` | Registry base URL (required when the first argument is a namespace)                  |

## Options

| Option              | Description                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------------------- |
| `--header <header>` | Add HTTP header (format: "Name: Value"). Can be used multiple times.                                    |
| `--global`          | Save to global config (\~/.paradoc/config.json)                                                         |
| `--project`         | Save to project config (paradoc.json)                                                                   |
| `-y, --yes`         | Skip confirmation prompts. Uses the registry's suggested namespace and overwrites an existing namespace |

## Description

Adds a registry to your configuration. The `@` prefix on the namespace is optional.

Any namespace can be added except `@paradoc`. It is reserved for the Paradoc registry, which is not available yet, so `paradoc registry add @paradoc <url>` is refused. See [Namespaces](/concepts/registries#namespaces).

With a URL alone, the CLI fetches the registry's `registry.json` and suggests `@<name>` as the namespace. You confirm or change it at the prompt, or `--yes` accepts it.

If the namespace already exists, you are asked to overwrite it, pick a different name, or cancel. `--yes` overwrites.

Passing both `--global` and `--project` is an error. If neither is specified, the CLI prompts for a scope unless `--yes` is set. With `--yes`, it uses project config inside a project and global config elsewhere.

## Examples

Add a public registry:

```bash
paradoc registry add @acme https://registry.acme.com
```

Add by URL and take the namespace from the registry:

```bash
paradoc registry add https://registry.acme.com --yes
```

Add with authentication:

```bash
paradoc registry add @private https://registry.example.com \
  --header 'Authorization: Bearer ${REGISTRY_TOKEN}'
```

Single quotes keep the placeholder in the saved config. The CLI expands it from the environment when making a request.

Add to global config:

```bash
paradoc registry add @company https://registry.company.com --global
```

## See also

* [registry remove](/cli/commands/registry/remove) - Remove a registry
* [registry list](/cli/commands/registry/list) - List configured registries
