Doctor & Audit
Klim includes two complementary health-check features: Doctor for environment diagnostics and Audit for security/compliance analysis. Together they make toolchain risk visible enough to use in local development, CI, and compliance workflows.

Doctor
Section titled “Doctor”The doctor checks your environment for common issues that can cause confusion or break tools.
klim security healthWhat It Checks
Section titled “What It Checks”- Duplicate PATH entries — same directory listed multiple times
- Broken PATH entries — directories that don’t exist, aren’t accessible, or aren’t directories
- Conflicting versions — same tool installed at multiple PATH locations with different versions
- Missing package managers — PMs that could manage your tools but aren’t installed
- Stale cache — scan cache older than 7 days
- Unresolved versions — installed tools where version couldn’t be determined
- Outdated tools — summary of available updates
Press 9 to open the Security tab. Issues are grouped by category with color-coded severity:
- 🔴 Error — something is broken
- 🟡 Warning — potential problem
- 🔵 Info — suggestion or note
The audit analyzes your installed tools for security and compliance concerns.
# Human-readable reportklim security audit
# CycloneDX 1.5 SBOMklim security audit --sbom > sbom.jsonWhat It Checks
Section titled “What It Checks”- Unmanaged installs — tools from unknown sources, not tracked by any PM
- Archived projects — upstream GitHub repo marked as archived
- Stale projects — no upstream activity in 12+ months
- Missing versions — can’t verify security status
- Outdated tools — updates available
It also generates a license inventory showing the distribution of licenses across your toolchain.
In the Security tab, press Tab or → to switch to the Audit sub-tab. It shows the same findings as klim security audit with color-coded severity and a license summary.
SBOM Generation
Section titled “SBOM Generation”The --sbom flag generates a CycloneDX 1.5 JSON document suitable for compliance pipelines:
# Generate and saveklim security audit --sbom > sbom.json
# Pipe to a compliance toolklim security audit --sbom | cyclonedx-cli validate --input-format jsonCompliance
Section titled “Compliance”The compliance check validates your installed tools against a policy file that defines allowed package managers, allowed/blocked licenses, blocked tools, required tools, and an optional vulnerability severity gate.
# Generate a starter policy at ~/.klim/compliance/policy.yamlklim security compliance init
# Validate the toolchain against the policyklim security compliance checkIn the Security tab, press Tab or → twice (or ← from Health) to land on the Compliance sub-tab.
- When no policy is configured, press
ito generate a starter policy at the default location. This is the same templateklim security compliance initwrites; both surfaces share the underlying helper, so the two are guaranteed to stay in sync. - Once a policy is loaded, the sub-tab shows violations grouped by severity. Edit the policy file in your editor and rescan with
rto re-evaluate.
CI Integration
Section titled “CI Integration”Both commands support JSON output and meaningful exit codes:
# GitHub Actions example- name: Environment health check run: klim security health --output json
- name: Security audit run: klim security audit --output json