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

# FireSpark Doctor

> Check an already deployed merchant FireSpark from your machine with the firespark doctor CLI.

FireSpark Doctor checks a merchant FireSpark that is **already deployed**. It runs on your machine against the published web, kiosk, POS, app, chat, call center, or dashboard. It does not boot this monorepo, and it does not use Maestro Cloud, paid CI, or a device farm.

Payments in a check are cash or sandbox only. Never run a real charge.

## Install

Install `@fire-spark/cli` from npm. You need Node.js 22 or newer. You do not have to clone this repository.

```bash theme={null}
npm install -g @fire-spark/cli
firespark doctor
```

Or run it once, without a global install:

```bash theme={null}
npx @fire-spark/cli doctor
```

`--help` and `-h` print the commands and flags, then exit. The documentation you are reading is the page that help links to.

## Commands

| Command | What it does |
| - | - |
| `firespark doctor run PAY-01` | Runs one or more checks. Several ids: `firespark doctor run CHK-01 ORD-01 MEN-08`. |
| `firespark doctor list` | Lists the catalog. Accepts the same filters as `run`. |
| `firespark doctor show PAY-01` | Prints the description and acceptance criteria. |
| `firespark doctor init` | Writes the YAML ahead of time. Optional. |
| `firespark doctor docs` | Opens or prints this page. |

If the YAML is missing when `run`, `list`, `show`, or `init` starts, the CLI creates it and asks only for what is missing. You do not have to run `init` first.

## Config

Operational data lives in a YAML file such as `.bembos.doctor.yml`, or in flags. It does **not** belong in `channel-manifest.json`. The channel builder drops unknown keys, and a rebuild would erase them.

The CLI can read identity from `apps/<slug>/src/channel-manifest.json` when that repo is on disk: `channel_id`, `name`, `template`, `templateVersion`, and `sdkVersion`. A channel that was never deployed can stay identity-only.

A channel marked `deployed: true` needs a public URL, dashboard URL, API URL, `store_id`, `fulfillment_id`, payment mode (`cash` or `sandbox`), webhook receiver URL, and evidence path. Test credentials stay in the environment (`FIRESPARK_DOCTOR_CUSTOMER_EMAIL` and `FIRESPARK_DOCTOR_CUSTOMER_PASSWORD`), not in the command and not in the YAML.

If the file already exists and a deployed channel is missing one of those, `firespark doctor run` stops before any check. The error names the field and the channel. The CLI does not invent a URL or an id. `CLI-01` is that preflight, and it is not fixable.

## Test order

`ORD-01` places one test order (`POST /orders`, then place) only when you name that id:

```bash theme={null}
firespark doctor run ORD-01 --payment cash
```

`SDK-06` creates one cash order (`POST /orders`) and does not place it, only when you name `SDK-06`. `PAY-07` and `CHK-01` each place one cash order the same way as `ORD-01`, only when you name that id. A plain `firespark doctor run` does not place an order. Payment has to be `cash` or `sandbox` (`efectivo` counts as cash). If payment, `merchant_id`, or another field the order needs is missing, the check fails and names that field and the channel. It does not call the API and does not join realtime. Before place, a complete order joins the customer realtime channel, then places a cash tender, then waits until `order.changed` has `checkout_state` `released`. `failed` or a wait past `FIRESPARK_DOCTOR_TIMEOUT_MS` fails the check. `--fix` does not create the order, does not subscribe, and does not invent a URL or an id. There is no `--live` or `--groups` flag.

## Flags

Filters: `--channel`, `--platform`, `--required`, `--area`, `--verification` (`Determinística` or `Mezcla`). There is no `--fixable` filter.

`--fix` tries to repair checks whose catalog row says they are fixable. Without `--fix`, the CLI only reports.

Targeting: `--url`, `--dashboard-url`, `--api-url`, `--merchant-id`, `--env`, `--store-id`, `--channel-id`, `--fulfillment-id`, `--payment`, `--receiver`, `--evidence`, `--format`, `--strict`, `--config`.

```bash theme={null}
firespark doctor run SDK-11 --config .bembos.doctor.yml --payment cash
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.