<!-- source: https://cli.dreamlake.ai/lakeshore-connections @ 0.134.0 99837ab -->

# Lakeshore connections

The unified connection commands are available in **CLI 0.107.0 and later**.
Queue connections also require a compatible DreamLake server; the CLI checks
server capabilities before creation.

A connection records a server URL, remote Lakeshore namespace, name and allowed
uses. The CLI and web **Connect a Lakeshore** form create the same record through
`POST /namespaces/:slug/lakeshores` for management and
`POST /namespaces/:slug/lakeshores/connect-v1` for queues. New connections keep their token encrypted in
the connection record. They do not create a shared Vault entry or return the token.

| Access mode | Allowed uses |
| --- | --- |
| `management` (default) | Queue operations, host enrollment, execution, terminals and management, subject to DreamLake authorization and the server token's permissions |
| `queues` | The existing namespace-scoped queue, worker and invocation management routes; no enrollment, tracked execution, terminal or producer-submit route |

A mode does not grant Lakeshore permissions. Management mode does not require an
admin token; operations that the supplied token cannot authorize still fail.
Queue mode requires a namespace access token, a public HTTPS origin and a
successful namespace identity check; admin tokens and open servers are rejected.
Both modes support personal and organization DreamLake namespaces. Organization
connection creation and updates still require OWNER authority.

## Connect

```bash cli-help="lakeshore connect"
# Prompts for a Lakeshore token without displaying it.
dl lakeshore connect --name lab --server https://lakeshore.example.com \
  --namespace my-team --lakeshore-namespace training --access management
```

Use `--access queues` for restricted queue management. In scripts pass
`--token-stdin` and supply the token on stdin; there is no token command-line
argument or automatic reuse of local Lakeshore credentials. Use `--open` only
for an intentionally unauthenticated management connection. `--skip-validation`
is available only for management mode.

`--namespace` selects the DreamLake owner. `--lakeshore-namespace` selects the
remote namespace; it defaults to `default` in both CLI and web. Name defaults to
the server hostname in both CLI and web.

Queue creation checks server capabilities first. An older server is rejected,
never silently treated as a management connection. Deploy the supporting backend
before using queue mode from these clients.

## Inspect and maintain

```bash cli-help="lakeshore"
dl lakeshore list --namespace my-team
dl lakeshore show lab --namespace my-team
dl lakeshore test lab --namespace my-team
dl queues list lab --namespace my-team
```

Use `lakeshore update lab --token-stdin` to replace a token. Omitting the token
keeps it; `--clear-token` explicitly clears it for management connections.
Management connections also accept `--name`, `--server`, `--lakeshore-namespace`,
`--description` and `--skip-validation`. Queue connections accept only verified
token replacement, preserving their identity and access restrictions. The web
editor follows the same contracts. Access mode cannot be changed in place.

`lakeshore disconnect lab --yes` soft-deletes the connection, not its remote
server or enrolled hosts. It can interrupt features that depend on the connection.
It does not revoke the remote token or delete retained Vault entries.

## Compatibility with queues mount

Existing `queues mount`, `mounts`, `inspect`, `token`, `unmount` and resource
commands continue to work. The old mount command and `/lakeshores/mount` API keep
their personal-namespace-only, Vault-backed creation contract. Existing records
retain their ID, slug, Vault reference, token rotation behavior and queue-only
restrictions. There is no credential migration or automatic permission upgrade.

Use `lakeshore connect` for new connections through the unified API. Both old and
new connections appear in `lakeshore list`; queue commands can use either kind.
The compatibility `connectionType` response field remains for older clients;
`accessMode` now identifies the allowed uses independently of credential storage.

`dl launch` remains a separate direct-to-Lakeshore submission flow. These
commands do not change its token resolution, upload or execution behavior.

Queue creation uses a versioned write endpoint after capability discovery, with no fallback to legacy management creation. The standard production EKS workflow automatically enables encrypted queue creation after verifying the upgraded reader fleet and old-Pod drain; no manual flag change is required. Other deployments must establish the same condition before setting `LAKESHORE_ENCRYPTED_QUEUES_ENABLED=true`. Until then, existing management connections and `queues mount` continue to work.
