Registry stack documentation: machine-readable Markdown.
Index of all pages: https://docs.registrystack.org/dev/llms.txt
Full corpus: https://docs.registrystack.org/dev/llms-full.txt

# messagingctl connection add command reference

> Generated syntax and options for messagingctl connection add.

{/* Generated from crates/registry-cli-docs/catalog.json and the workspace version in Cargo.toml by scripts/generate-cli-reference.mjs. Run npm run generate. */}

Save one product-scoped remote connection.

## Contract status

This page is generated from the public Clap command tree for Registry Stack source version `0.45.0` and catalog SHA-256 `18546dbdf436972522108829ab0f8c804142a7474cfe3841e0b8ff10e061c842`. Hidden implementation commands are omitted.

## Usage

```text
messagingctl connection add [OPTIONS] <NAME>
```

## Constraints

| Condition | Requirement |
| --- | --- |
| `--token-endpoint <TOKEN_ENDPOINT>` is present | `--private-key-jwt` is required. |
| `--client-id <CLIENT_ID>` is present | `--private-key-jwt` is required. |
| `--private-key-file <PRIVATE_KEY_FILE>` is present | `--private-key-jwt` is required. |
| `--scope <SCOPE>` is present | `--private-key-jwt` is required. |
| `--resource <RESOURCE>` is present | `--private-key-jwt` is required. |
| `--assertion-audience <ASSERTION_AUDIENCE>` is present | `--private-key-jwt` is required. |
| Command invocation | `--anonymous` and `--private-key-jwt` cannot be used together. |
| Command invocation | `--anonymous` and `--token-env <TOKEN_ENV>` cannot be used together. |
| Command invocation | `--anonymous` and `--token-file <TOKEN_FILE>` cannot be used together. |
| Command invocation | `--private-key-jwt` and `--token-env <TOKEN_ENV>` cannot be used together. |
| Command invocation | `--private-key-jwt` and `--token-file <TOKEN_FILE>` cannot be used together. |
| Command invocation | `--token-env <TOKEN_ENV>` and `--token-file <TOKEN_FILE>` cannot be used together. |

## Arguments

| Argument | Always required | Default | Values | Environment | Description |
| --- | --- | --- | --- | --- | --- |
| `<NAME>` | Yes | n/a | n/a | n/a | Local connection name used by `--connection` and project selections |

## Options

| Option | Always required | Repeatable | Default | Values | Environment | Description |
| --- | --- | --- | --- | --- | --- | --- |
| `--url <URL>` | No | No | n/a | n/a | n/a | API service base URL. Prompted when omitted in an interactive terminal |
| `--ca-file <CA_FILE>` | No | No | n/a | n/a | n/a | PEM certificate authority bundle for a private-institution endpoint |
| `--access-profile <ACCESS_PROFILE>` | No | No | n/a | n/a | n/a | Casework only: stable caller access profile applied to its profile headers |
| `--anonymous` | No | No | n/a | n/a | n/a | Save a connection that sends no Authorization header |
| `--token-file <TOKEN_FILE>` | No | No | n/a | n/a | n/a | File holding a bearer token. The configuration stores only a secret reference |
| `--token-env <TOKEN_ENV>` | No | No | n/a | n/a | n/a | Environment variable holding a bearer token. The configuration stores only a secret reference |
| `--private-key-jwt` | No | No | n/a | n/a | n/a | Acquire renewable bearer tokens with OAuth private_key_jwt |
| `--token-endpoint <TOKEN_ENDPOINT>` | No | No | n/a | n/a | n/a | OAuth token endpoint used for private_key_jwt authentication |
| `--client-id <CLIENT_ID>` | No | No | n/a | n/a | n/a | OAuth client identifier registered at the token endpoint |
| `--private-key-file <PRIVATE_KEY_FILE>` | No | No | n/a | n/a | n/a | Owner-only file containing the private client JWK |
| `--scope <SCOPE>` | No | Yes | n/a | n/a | n/a | OAuth scope to request; repeat the option for multiple scopes |
| `--resource <RESOURCE>` | No | No | n/a | n/a | n/a | Optional RFC 8707 resource indicator for the requested token |
| `--assertion-audience <ASSERTION_AUDIENCE>` | No | No | n/a | n/a | n/a | Optional assertion audience; defaults to the token endpoint |
| `--format <FORMAT>` | No | No | `human` | `human`, `json` | n/a | Emit the selected command's report in this format |
| `-h, --help` | No | No | n/a | n/a | n/a | Print help |

## Generation contract

After changing a public command, argument, option, default, environment binding, or help description, run `cargo run --locked -p registry-cli-docs -- --write`, commit `crates/registry-cli-docs/catalog.json`, then run `npm run generate` from `docs/site`.