Skip to content

Commit bfeb40c

Browse files
authored
Merge pull request #124 from STRRL/fix/compatibility-claude-migrate-installer
fix: support Claude CLI installed via migrate-installer
2 parents 22b7098 + 24ba304 commit bfeb40c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

β€Žsrc/specify_cli/__init__.pyβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
"gemini": "Gemini CLI"
6060
}
6161

62+
# Claude CLI local installation path after migrate-installer
63+
CLAUDE_LOCAL_PATH = Path.home() / ".claude" / "local" / "claude"
64+
6265
# ASCII Art Banner
6366
BANNER = """
6467
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—
@@ -337,6 +340,16 @@ def run_command(cmd: list[str], check_return: bool = True, capture: bool = False
337340

338341
def check_tool(tool: str, install_hint: str) -> bool:
339342
"""Check if a tool is installed."""
343+
344+
# Special handling for Claude CLI after `claude migrate-installer`
345+
# See: https://github.com/github/spec-kit/issues/123
346+
# The migrate-installer command REMOVES the original executable from PATH
347+
# and creates an alias at ~/.claude/local/claude instead
348+
# This path should be prioritized over other claude executables in PATH
349+
if tool == "claude":
350+
if CLAUDE_LOCAL_PATH.exists() and CLAUDE_LOCAL_PATH.is_file():
351+
return True
352+
340353
if shutil.which(tool):
341354
return True
342355
else:

0 commit comments

Comments
Β (0)