# doctor

> Check the command, PATH, the app, the connection, the license, the phones and the agent skills, and say how to fix what's wrong.

Source: https://zeptap.com/docs/cli/commands/doctor



## Usage [#usage]

```sh
zeptap doctor [--json]
```

## Options [#options]

| Option   | Description                                                                 |
| -------- | --------------------------------------------------------------------------- |
| `--json` | Print the checks as `data`: each one's `name`, `ok`, `warning` and `detail` |

## Details [#details]

Each check prints one line: `ok` passed, `!!` is a warning, `XX` failed.

| Check         | What it looks at                                              |
| ------------- | ------------------------------------------------------------- |
| `command`     | This command's version, variant and location                  |
| `path`        | Whether `zeptap` on `PATH` is this copy                       |
| `app`         | Whether Zeptap is installed                                   |
| `server.json` | Whether Zeptap is running: process id, port, socket           |
| `versions`    | Whether the app and the command are the same version          |
| `connection`  | Whether the command can reach the app, over the socket or TCP |
| `license`     | Whether the license is active                                 |
| `phones`      | Whether at least one phone is ready                           |
| `leases`      | Leases currently held                                         |
| `agent`       | Which agent it's running under                                |
| `skill`       | Whether the agent skill is installed                          |

* The exit code is non-zero when any check fails. Warnings don't count.
* When a sandbox blocks the connection, `doctor` prints the setting that allows it. See [Agent sandboxes](https://zeptap.com/docs/cli/setup#agent-sandboxes).

## Examples [#examples]

```sh
$ zeptap doctor
ok command: zeptap 0.7.0 (production) at /Applications/Zeptap.app/Contents/Helpers/zeptap
ok path: /Users/you/.local/bin/zeptap
ok app: /Applications/Zeptap.app
ok server.json: pid 4242, port 47801, socket /Users/you/Library/Application Support/Zeptap/run/zeptap.sock, app 0.7.0
ok connection: connected over the Unix socket
ok license: active
...
```
