Skip to content

feat: add loom doctor command for config validation #70

@subotic

Description

@subotic

Problem

When config values are invalid or stale (e.g., terminal.command = "ghostty" on macOS where the binary doesn't exist), loom fails at runtime with an unhelpful error. There's no way to proactively validate the config.

Proposal

Add a loom doctor command that validates the config and reports issues with suggested fixes. Checks should include:

  • Binary existence: verify that terminal.command and editor.command resolve to actual executables or valid open -a patterns
  • Scan roots: verify paths in registry.scan_roots exist and contain git repos
  • Workspace root: verify workspace.root exists and is writable
  • Agent config: validate MCP server names, plugin format (name@marketplace), marketplace repos are accessible
  • Sandbox config: check that allowed paths exist
  • Preset references: verify any preset names referenced in workspace manifests still exist in config

Example output

$ loom doctor
Checking config...
  [ok] workspace root /Users/foo/workspaces exists
  [ok] scan root /Users/foo/_github.com exists (found 42 repos)
  [warn] terminal.command "ghostty" not found in PATH
         hint: on macOS, use "open -a Ghostty" instead
  [ok] editor.command "zed" found in PATH
  [ok] 2 agent plugins validated
All checks passed (1 warning).

Context

Came up when an existing config had terminal.command = "ghostty" which doesn't work on macOS (needs open -a Ghostty). The PR #69 fix for detect_terminal() only helps new configs created via loom init. A doctor command would catch stale configs proactively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions