# CLI examples

Shell-by-shell walkthroughs of common operator tasks, grouped by what
you're trying to do. Start with the auth page — the rest assume the
shell setup it describes.

| Page | Covers |
| ---- | ------ |
| [Auth + setup](/cli/examples/auth.md) | One-time login, shell environment, `$D` seeding |
| [Providers + discover](/cli/examples/providers-and-discover.md) | Register cloud, SSH, SLURM, Kube targets; the local discovery helpers |
| [Queues + jobs](/cli/examples/queues-and-jobs.md) | Named work queues and inspecting invocations |
| [Daemons + exec/run](/cli/examples/daemons-and-exec.md) | Worker daemons, compose, and one-off command execution |
| [Storage, code, mounts](/cli/examples/storage-code-mounts.md) | S3 storage entries, code archives, mount declarations |
| [Secrets, modes, tunnels, config, nymph](/cli/examples/secrets-modes-tunnels-config-nymph.md) | The long tail of management commands |

If you want a guided narrative instead, see the
[CLI happy paths](/cli/happy-paths.md).

## Conventions used across these pages

- Names for providers, secrets, modes, tunnels, mounts, storage
  entries, and queues all validate against `^[a-z0-9][a-z0-9-]*$`.
- Every action calls `process.exit(rc)`. `2` is the conventional "bad
  usage / not configured" code and `1` is the failure code, so these
  blocks are safe under `set -e`.
- `--json` is available on most read commands and is the intended
  scripting surface; the table output is for humans and not stable.

## What's not on these pages

- **Provider-driven dispatch from Python** — the `@dls.udf` decorator,
  modes, capacity matching — lives on [`/python-sdk`](/python-sdk.md). The
  CLI's role there is to **register** the targets; the Python API runs
  the jobs.
- **Lower-level daemon internals** — capability publishing, hibernate
  semantics, OTA self-replace — are documented at
  [`/nymph/daemons`](/nymph/daemons.md) and
  [`/nymph/protocol`](/nymph/protocol.md).
- **The `dreamlake` group** — a separate data plane with its own
  servers, its own credential store (`~/.dreamlake/`), and its own
  connection flags. It is not covered by this cookbook.

## Read next

- [`/cli`](/cli.md) — the overview and the full command surface.
- [`/cli/tui`](/cli/tui.md) — the interactive dashboard over the same data.
- [`/python-sdk`](/python-sdk.md) — what you can launch from Python.
- [`/nymph/daemon-lifecycle`](/nymph/daemon-lifecycle.md) — install → list → kill → cleanup.
- [`docs.dreamlake.ai/lakeshore/providers`](https://docs.dreamlake.ai/lakeshore/providers) — the EC2 / GCE / SLURM / Kube / SSH launchers.
- [`/cli/completion`](/cli/completion.md) — the full completion installation guide.
