Skip to main content

Doctor

vagaris doctor
vagaris doctor --api-base https://api.example.com
vagaris doctor --json
vagaris doctor --repair --yes

doctor checks what the CLI's own commands depend on: the server they would talk to, and this machine's credential, node identity and last lease. It needs nothing installed besides the CLI. The target is the same one every client command resolves: --api-base, then the selected context profile (apiBase, then serviceRoot), then VAGARIS_API_URL, then Vagaris Cloud.

Checks​

#CheckWhat passes
1Server reachabilityGET /api/health on the target answers 2xx. An unreachable target fails, with how to change it (vagaris context set --api-base <url>).
2Protocol versionThe server speaks the CLI's protocol version. Runs only when the server is reachable. A newer server fails with the upgrade command.
3CredentialThe server says who the credential acts as (/api/cli-auth/me, the same binding auth whoami reads). No credential is a warning (vagaris auth login); a credential the server refuses fails.
4Node identityOnly when this machine has enrolled (vagary node enroll). The server's record for the enrolled fingerprint is found, not revoked and heartbeating. A node identity file copied from another machine fails. Needs a selected company.
5Lease stateOnly when this CLI has claimed a run. The server's verdict on the last lease. A lease that ended with its run (released, completed, failed) is reported as closed; a revoked or expired one, or one bound to another node, fails.
6Data retentionLocal CLI data (evidence, legacy telemetry state) against its size policy. --repair prunes.

Each result is pass, warn or fail with a message; a failing or warning check prints a hint naming what to run.

doctor exits 1 when any check fails and 0 otherwise, so vagaris doctor && <next step> only continues against a server that answered.

Repair​

With --repair, a check that can repair itself asks Repair "<name>"? after failing; --yes answers yes to all. The check then runs again, so the printed result is the post-repair state. Repairs never run in --json mode.

JSON output​

{
"passed": 3,
"warned": 1,
"failed": 0,
"checks": [
{ "name": "Server reachability", "status": "pass", "message": "Server reachable at https://api.example.com (HTTP 200)" },
{ "name": "Credential", "status": "warn", "message": "No credential for https://api.example.com", "repairHint": "Sign in with `vagaris auth login`" }
]
}

Nothing else is written to stdout in JSON mode, so the output can be parsed directly.

Other doctors​

CommandScope
vagary node doctorThis machine's enrolment, attestation, health, heartbeat recency and platform (Node Enrolment)
vagaris secrets doctor --company-id <id>Secret provider health through the API

vagaris support-bundle runs the same checks as doctor and includes their results in the bundle. See Support.