# doctor

> Run shoplazza doctor check to diagnose the Shoplazza CLI environment — configuration, credential directories, API metadata, and Agent Skills — before you report a problem.

Run diagnostic checks on the CLI environment.

## check

Verify the health of your CLI installation. The checks read local files only (no network calls) and don't check your login — use `shoplazza auth status` for that.

```shell
shoplazza doctor check
```

| Check | What it reports |
|-------|-----------------|
| `config_version` | Whether the config file is on the v2 layout |
| `auth_locks_dirs` | Whether the credential (`auth/`) and lock (`locks/`) directories are writable |
| `metadata` | Where the active API metadata comes from (`embedded` or `cached`), its revision, and the last update check |
| `skills` | Whether the Agent Skills are installed |

Each check has a `status` of `ok`, `warn`, or `fail`; the top-level `ok` is `true` only when every check is `ok`.

### Output

```json
{
  "checks": [
    { "name": "config_version", "status": "ok", "message": "config is v2" },
    { "name": "auth_locks_dirs", "status": "ok", "message": "auth/ and locks/ are writable" },
    { "name": "metadata", "status": "ok", "message": "source=embedded revision=2026-10-09T07:59:22Z last_check=never" },
    { "name": "skills", "status": "ok", "message": "not installed" }
  ],
  "ok": true
}
```

### Examples

```shell
# Run a health check
shoplazza doctor check

# Verify authentication state
shoplazza auth status
```
