Add Claude Desktop support to nlm setup - #275
Merged
Merged
Conversation
The README documented `nlm setup add claude-desktop` and listed Claude Desktop's config path, but the CLI's CLIENT_REGISTRY never actually defined a `claude-desktop` client — running the documented command failed with "Unknown client 'claude-desktop'", and it was silently absent from `nlm setup list` and `nlm doctor`. Adds a claude-desktop entry across setup.py (config path resolution, registry, setup/detect/remove/list wiring) using the full resolved binary path since Claude Desktop does not inherit the shell PATH, plus matching coverage in doctor.py's client check and the --ai docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The README documents
nlm setup add claude-desktopand lists Claude Desktop's config path, but the CLI'sCLIENT_REGISTRYnever actually defined aclaude-desktopclient:It was also silently absent from
nlm setup listand thenlm doctorclient check.claude-desktopclient toCLIENT_REGISTRYwith a platform-aware config path resolver (~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS,%APPDATA%/Claude/claude_desktop_config.jsonon Windows,~/.config/Claude/claude_desktop_config.jsonelsewhere)_setup_claude_desktop()writes the full resolved path to thenotebooklm-mcpbinary rather than the bare command name, since Claude Desktop doesn't inherit the shellPATH(same caveat already called out in the README's manual setup section)_detect_tool),_is_already_configured,setup add/setup remove/setup list,setup add all,nlm doctor, and the--aidocsnlm skill install— no change needed there, since itsclaude-codeentry already covers "Claude Code CLI and Desktop" via the shared~/.claude/directoryTest plan
uv run pytest -q -m "not e2e"— 1264 passed, 38 skipped (no regressions)tests/cli/test_setup_claude_desktop.pycovering registry, config path (macOS/Windows/Linux), setup (fresh/full-path-fallback/preserve-existing/idempotent), detection,_is_already_configured, and removaluv run ruff check— cleanuv run mypy— confirmed the pre-existing 17 errors insetup.pyare unchanged by this diff (same count/lines onmain)nlm setup listnow shows "Claude Desktop" as a row