# CLI

URL: https://docs.healthcare.dev/guides/cli

```sh
npm i -g @healthcare.dev/cli
hdev login                                  # confirm a code in the browser; saves a key

hdev code icd10 E11.9                       # one code
hdev search icd10 type 2 diabetes --billable
hdev tree icd10 E11.2                       # ancestors and children
hdev drug metformin                         # search by name
hdev drug 0002-0152-01                      # NDC, with linked RxNorm concepts
hdev drug 861007                            # RxCUI
hdev changes icd10cm --since 2026-10-01     # what the latest release changed
hdev npi 1234567893                         # check digit (offline)
hdev datasets                               # versions and freshness
hdev status                                 # works without a key
hdev logout                                 # revoke and forget the saved key
```

Tables by default. Put `--json` before the command for the raw response:

```sh
hdev --json search hcpcs wheelchair | jq '.data[].code'
```

Errors go to stderr with exit code 1. The key comes from `--api-key`, then `HDEV_API_KEY`, then the
key `hdev login` saved (`~/.config/healthcare.dev/credentials.json`, readable only by you). Other
option: `--api-url` (default `HDEV_API_URL`).
