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

# Config Commands

> Analyze real messages to detect vendor patterns, manage named profiles, and compare configurations.

## pidgeon config analyze

Analyze sample messages to detect vendor-specific patterns and save as a named profile.

```bash theme={null}
pidgeon config analyze --samples <dir> --save <name>
```

| Flag              | Type   | Description                             |
| ----------------- | ------ | --------------------------------------- |
| `--samples <dir>` | string | Directory of sample messages to analyze |
| `--save <name>`   | string | Name to save the profile as             |

```bash theme={null}
pidgeon config analyze --samples ./epic-er-messages --save epic_er
```

## pidgeon config list

List all saved vendor profiles.

```bash theme={null}
pidgeon config list
```

```text theme={null}
Profile          Standard    Message Types         Samples
──────────────────────────────────────────────────────────
epic_er          HL7 v2.3    ADT^A01, ADT^A08      47
cerner_lab       HL7 v2.3    ORU^R01               23
meditech_pharm   HL7 v2.3    RDE^O11               15
```

## pidgeon config show

Display details of a saved profile.

```bash theme={null}
pidgeon config show <name>
```

```bash theme={null}
pidgeon config show epic_er
```

## pidgeon config use

Set a profile as the default for all commands.

```bash theme={null}
pidgeon config use <name>
```

```bash theme={null}
pidgeon config use epic_er
```

## pidgeon config export

Export a profile as JSON for sharing with your team.

```bash theme={null}
pidgeon config export <name>
```

```bash theme={null}
pidgeon config export epic_er > epic_er_profile.json
```

## pidgeon config diff

Compare two vendor profiles side by side.

```bash theme={null}
pidgeon config diff <a> <b>
```

```bash theme={null}
pidgeon config diff epic_er cerner_lab
```

## Workflow Example

<Steps>
  <Step title="Analyze sample messages">
    ```bash theme={null}
    pidgeon config analyze --samples ./epic-messages --save epic_er
    ```
  </Step>

  <Step title="Generate with the profile">
    ```bash theme={null}
    pidgeon generate ADT^A01 --vendor epic_er --count 20
    ```
  </Step>

  <Step title="Validate against the profile">
    ```bash theme={null}
    pidgeon validate --folder ./test-data --profile epic_er
    ```
  </Step>
</Steps>
