clavis doctor
Check this computer's Clavis setup and say how to fix problems
clavis doctorCheck this computer's Clavis setup from top to bottom and say how to fix each problem: the CLI version and how it was installed, .clavis.yaml, the server address and where it came from, whether the server answers, its certificate, its version compared with the CLI, the clock, your sign-in, and access to the project and environment. It also checks that clavis run can give consoles (rails c, irb, psql) a terminal, and in a git repository whether a pre-commit hook stops secrets from being committed, and whether the environment's own secrets have gone 90 days without a change (names and dates only, never values). A token that cannot read its own profile, such as a CI token, is accepted if it can reach the project.
In a git repository it also checks .env files (and .envrc, *.env) at the repository root, in the current folder and beside .clavis.yaml: ones git would commit, ones it already tracks, and ones that were ever committed, since a committed key stays in the history. Only file names are read. Files you commit on purpose can be listed under committed_env_files in .clavis.yaml. In CI, untracked files are not reported, because they are usually the ones the pipeline just wrote.
Checks stop at the first thing that blocks the rest, so the first ✗ is the one to fix. It changes nothing and never prints secret values. The exit code is 1 when a check fails, so CI can run it too.
Examples
clavis doctorFor another server
clavis doctor --server https://clavis.example.comFor scripts and bug reports
clavis doctor --jsonGlobal flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command