verdictan doctor
verdictan doctor runs four checks on your local setup and the API, and reports ok, warn, or fail for each. Run it after you install the CLI, after you change the API URL or profile, or when a managed gateway does not start.
Usage
verdictan doctor [--config <path>] [--api-url <url>] [--profile <name>] [--state-dir <path>] [--json]Options
| Flag | Description |
|---|---|
--config <path> | File for the config_file check. The default is policy-config.yaml in the working directory. The command also reads this file as the CLI config file for the api_connectivity check. |
--api-url <url> | API base URL for the api_connectivity check. |
--profile <name> | Profile that supplies the API URL and the stored session. The default is default. |
--state-dir <path> | Directory for the state_directory and proxy_liveness checks. The default is ~/.verdictan/supervisor. |
--json | Print the results as a JSON array. Each item has name, status, and message. |
Run a diagnostic check
Run the command in the directory that contains your policy-config.yaml:
verdictan doctorThe command always runs all four checks, in the same order, and then prints a summary. The example uses the default API URL, https://api.verdictan.com, which goes to the EU region; a US organization sets VERDICTAN_API_URL=https://api.us.verdictan.com:
✓ api_connectivity: API reachable at https://api.verdictan.com
✓ config_file: valid YAML at policy-config.yaml
✓ state_directory: state directory writable at /home/user/.verdictan/supervisor
! proxy_liveness: no proxy instances registered
All checks passed.Each line starts with ✓ for ok, ! for warn, or ✗ for fail. A warning does not make the command fail. Read each warning and decide if it applies to your setup. For example, no proxy instances registered is expected when you run a gateway without the local supervisor. It does not mean that your gateway listener is stopped.
A clean result does not prove that a model request can complete. Send a test request, as in the quickstart, to check the full path.
Checks
| Check | What it does | warn when | fail when |
|---|---|---|---|
api_connectivity | Calls GET /v1 on the resolved API URL. | No API credential is configured. The command skips the request. | The CLI config does not resolve, or the request fails. |
config_file | Reads the file and parses it as YAML. | The file does not exist. | The file cannot be read, or it is not valid YAML. |
state_directory | Writes a .doctor-probe file in the state directory, then deletes it. | HOME is not set, or the directory does not exist. | The path is not a directory, or the command cannot write to it. |
proxy_liveness | Reads the local supervisor state and counts instances with the running lifecycle. | There is no supervisor state, no registered instance, or no running instance. | Never. |
The api_connectivity check looks for a credential in VERDICTAN_API_TOKEN, the CLI config file, and the stored profile session. It does not check that the credential is valid. The API serves /v1/health without authentication, so ok only shows that the API is reachable. Run verdictan auth whoami to check the credential.
The config_file check parses YAML syntax only. It does not check the policy schema. Use verdictan policy lint for schema checks. verdictan config validate checks configuration loading and supported ranges.
The proxy_liveness check reads supervisor records. It does not send a request to a gateway listener. Its message has the form <running>/<total> proxy instances running.
Examples
# Run the checks for the default profile
verdictan doctor
# Check a config file in another directory and print JSON
verdictan doctor --config ./configs/policy-config.yaml --json
# Check a different supervisor state directory
verdictan doctor --state-dir /srv/verdictan/supervisorJSON output for the first example, without a credential and without a supervisor state directory:
[
{
"name": "api_connectivity",
"status": "warn",
"message": "no API token configured; skipping connectivity check"
},
{
"name": "config_file",
"status": "ok",
"message": "valid YAML at policy-config.yaml"
},
{
"name": "state_directory",
"status": "warn",
"message": "state directory does not exist: /home/user/.verdictan/supervisor"
},
{
"name": "proxy_liveness",
"status": "warn",
"message": "no proxy instances registered"
}
]Limits and failure behavior
- In text mode, when one or more checks have the
failstatus, the command printsSome checks failed. Review the output above.It then stops withError: one or more required checks failedand exit code2. - Warnings do not change the exit code.
- With
--json, the command exits with0even when a check fails. Read thestatusfield of each item in your automation. --confighas two uses. A path that does not exist giveswarnforconfig_file, andfailforapi_connectivitywithfailed to resolve config: ... failed to read config file <path>. A file with invalid YAML fails both checks.- The command does not accept
--api-token. SetVERDICTAN_API_TOKEN, or sign in withverdictan auth login.
Complete command reference
Select a command for its complete input table. Default input means the value used when that option is omitted.
A value marked Not set can still come from configuration or the environment, as described above.
Set uppercase variables in example templates to your own resource IDs and paths before use.
See CLI scripting for quoting, output streams, confirmation, and exit codes.
verdictan doctor [OPTIONS]| Input | Required | Default input | Meaning and accepted values |
|---|---|---|---|
--config <CONFIG> | No | Not set | CLI connection file. Use VERDICTAN_CONFIG or the standard profile file when omitted. |
--api-url <API_URL> | No | Not set | Control-plane API base URL. Overrides the environment, connection file, and stored session URL. |
--profile <PROFILE> | No | default | Profile to read or write. Use the same profile for related commands. |
--state-dir <STATE_DIR> | No | Not set | Local supervisor state directory. Defaults to ~/.verdictan/supervisor. |
--json | No | false | Print structured JSON. See Result for this command's output and success conditions. This is a switch without a value. |
--help (-h) prints help. The global --lang and --region options follow the shared input rules.
JSON mode returns exit 0 after completed checks, including failed checks. Read each status. A warning does not change the exit code.
Result: Text reports checks and a summary. JSON is an array of objects with name, status, and message.
Example template:
verdictan doctorNext steps
- Troubleshooting: find the cause of a failed check.
- verdictan auth: sign in, and check the identity when
api_connectivitywarns. - verdictan config validate: check configuration loading and ranges after the YAML check passes.
- verdictan gateway run: start a local gateway.