> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doppels.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Doppels CLI Reference: All Commands and Flags Explained

> Complete reference for every doppels CLI command — spaces init, validate, capabilities list, describe, run, runs show, logs, and telemetry with all flags.

The `doppels` CLI is the primary interface for validating and running your Capabilities locally. You use it to initialize a Space, check your manifests for correctness, inspect Capability contracts, execute Recipes, browse run history, and manage telemetry consent — all from your terminal, all on your own machine. This page lists every command, its purpose, and its available flags.

## Global flags

These flags are available on the root command itself, independent of any subcommand.

| Flag        | Description                                   |
| ----------- | --------------------------------------------- |
| `--version` | Print the installed CLI version and exit.     |
| `--help`    | Show help text for the command or subcommand. |

<Note>
  Most commands also accept `--json` to emit machine-readable JSON output. The flag is documented individually for each command where it is supported.
</Note>

***

## `doppels spaces init`

Initializes a new Space in the current directory. Creates the `capabilities/`, `recipes/`, and `.doppels/` directories that the CLI expects when discovering manifests and storing run history.

Run this once in any project directory before adding your first Capability or Recipe manifests.

```shell theme={null}
doppels spaces init
```

***

## `doppels validate`

Validates all Capability and Recipe manifests discovered under the current Space. The validator checks schema compliance, Capability–Recipe references, expression syntax, step ordering, approval declarations, and return type matching.

Run `validate` before every commit to catch errors early, and after any manual edit to a manifest.

```shell theme={null}
doppels validate
```

<Note>
  `doppels validate` works fully offline — no network connection is required.
</Note>

***

## `doppels capabilities list`

Lists all Capabilities discovered in the current Space. Use `--json` to get a machine-readable list suitable for piping into other tools.

```shell theme={null}
doppels capabilities list
doppels capabilities list --json
```

***

## `doppels describe capability/<name>`

Displays the public contract of a Capability — its inputs, declared outputs, and version. Use this to confirm what a Capability expects before running it, or to review it in scripts and CI pipelines.

```shell theme={null}
doppels describe capability/greet
doppels describe capability/release-build --json
```

Replace `<name>` with the machine-readable `metadata.name` value from the Capability manifest.

***

## `doppels run capability/<name>`

Executes a Capability locally using the Recipe that provides it. Each run is recorded under `.doppels/runs/` with its inputs, outputs, logs, and any captured artifacts.

```shell theme={null}
doppels run capability/greet --input name=Ada --yes
doppels run capability/release-build --input version=1.2.0 --json
```

### Flags

| Flag                | Description                                                                   |
| ------------------- | ----------------------------------------------------------------------------- |
| `--input key=value` | Provide a value for a named input. Repeat the flag for each additional input. |
| `--yes`             | Skip all approval prompts and proceed automatically.                          |
| `--json`            | Emit JSON output including run metadata and returned values.                  |

<Note>
  `doppels run` works fully offline — no network connection is required.
</Note>

***

## `doppels runs list`

Lists the history of local runs recorded under the current Space. Each entry shows the run ID, Capability name, status, and timestamp.

```shell theme={null}
doppels runs list
doppels runs list --json
```

***

## `doppels runs show <run-id>`

Shows the full details of a specific run — inputs provided, outputs returned, step results, and overall status. Use the run ID from `doppels runs list`.

```shell theme={null}
doppels runs show abc123
doppels runs show abc123 --json
```

***

## `doppels runs logs <run-id>`

Streams or displays the captured stdout and stderr logs from a specific run. Useful for debugging a failed step or reviewing what a script actually printed.

```shell theme={null}
doppels runs logs abc123
```

***

## `doppels telemetry`

Manages your telemetry opt-in status. Consent is stored in your local `profile.json` and persists across projects. You can also set the environment variable `DOPPELS_TELEMETRY=0` to disable telemetry regardless of your stored consent setting.

```shell theme={null}
doppels telemetry accept    # opt in
doppels telemetry reject    # opt out
doppels telemetry status    # show current consent
```

| Subcommand | Description                           |
| ---------- | ------------------------------------- |
| `accept`   | Opt in to anonymous telemetry.        |
| `reject`   | Opt out of telemetry.                 |
| `status`   | Display your current consent setting. |
