claudewheel v0.15.1 /claudewheel.health
Edit
On this page

Health check utilities for claudewheel.

#claudewheel.health

#claudewheel.health

Pre-launch diagnostics: symlinks, tokens, hooks, permissions, and disk usage.

#HealthResult

Health check result with ok status, label, and detail message.

#check_tmpfs_quota

python
def check_tmpfs_quota() -> HealthResult

Check /tmp usage percentage via df.

#check_tmp_claude_size

python
def check_tmp_claude_size() -> HealthResult

Check size of /tmp/claude-$UID/ directory.

#_discover_profiles

python
def _discover_profiles() -> list[tuple[str, Path]]

Find Claude profile dirs via the shared discovery module.

Returns a sorted list of (profile_name, profile_path) tuples.

python
def check_shared_symlinks() -> HealthResult

Verify each profile's shared dirs are symlinks to ~/.claudewheel/shared/.

#check_hooks_wired

python
def check_hooks_wired() -> HealthResult

Verify each profile's settings.json has required hooks.

Checks:

  • UserPromptSubmit: hook-timestamp
  • PreToolUse: hook-block-worktree (matcher: Agent)

#check_settings_defaults

python
def check_settings_defaults() -> HealthResult

Verify each profile enforces expected defaults in settings.json.

#_diff_json

python
def _diff_json(label: str, canonical: object, actual: object) -> list[str]

Return human-readable lines describing differences between two JSON values.

#check_shared_settings_drift

python
def check_shared_settings_drift() -> HealthResult

Compare each profile's hooks and disallowedTools against shared-settings.json.

#check_token_expiry

python
def check_token_expiry() -> HealthResult

Warn if any token is approaching 1-year expiry (setup-token TTL).

#check_tokens

python
def check_tokens() -> HealthResult

Verify each profile has a matching entry in ~/.claudewheel/tokens.json.

#check_orphan_profiles

python
def check_orphan_profiles() -> HealthResult

Detect profile dirs in ~/.claudewheel/profiles/ that are not registered.

A directory is "orphan" if it: - lives in ~/.claudewheel/profiles/ - is NOT discovered by _discover_profiles() (which checks .credentials.json and tokens.json) - is NOT listed in options.json's profile values

For each orphan, we also flag if it contains broken symlinks (symlinks whose target does not exist).

#check_file_permissions

python
def check_file_permissions() -> HealthResult

Verify sensitive files have restrictive permissions (0600).

#check_inode_renames

python
def check_inode_renames() -> HealthResult

Detect directory renames by comparing inode records against the filesystem.

#run_health_check

python
def run_health_check() -> list[HealthResult]

Run all health checks and return results.

python
def print_health_report(results: list[HealthResult], file=None) -> None

Print health check results. Defaults to stdout; pass file=sys.stderr for non-interactive mode.