---
title: diagnose
---

import VersionLabel from '@site/src/components/Docs/VersionLabel';

<VersionLabel version="0.37.0" header />

The `proto diagnose` command will diagnose your proto installation for any potential issues. Issues
are categorized into errors and warnings, with the former being a must fix, and the latter being a
maybe fix (depending on your usage of proto).

```
$ proto diagnose

Shell: zsh
Shell profile: /Users/name/.zshrc

Errors ────────────────────────────────────────────────────────────────────

  - Issue: Bin directory /Users/name/.proto/bin was found BEFORE the shims directory /Users/name/.proto/shims on PATH
    Resolution: Ensure the shims path comes before the bin path in your shell
    Comment: Runtime version detection will not work correctly unless shims are used
```

Among other checks, proto inspects your `PATH` ordering and shell setup, and looks for executable
name collisions — multiple configured tools that resolve to the same shim and bin name (for example,
the same identifier provided by two different backends). Since only one can be linked, the others
are silently shadowed, so these are reported as warnings. <VersionLabel version="0.58.0" />

If [lockfiles](../lockfile) are in use, proto will also audit their health, and
report warnings for records that are missing a resolved version, duplicate records for the same
specification, and stale records that no longer match a configured version. <VersionLabel version="0.60.0" />

### Options

- `--shell` - The shell to diagnose (will detect automatically).
- `--json` - Print the diagnosis in JSON format.
