feat: add shared claude binary detection module

Introduces a dedicated module for detecting Claude Code binary installations
with support for multiple sources including NVM, aliased paths, and
version-based selection. This shared module improves the reliability of
finding Claude installations across different environments.

Key features:
- Supports multiple installation sources (NVM, system, homebrew, npm, yarn, bun)
- Handles aliased paths from 'which' command
- Version-aware selection to prefer latest installations
- Database caching of discovered binary paths
- Comprehensive logging for debugging
- Environment variable preservation for NVM compatibility

The implementation is inspired by:
- https://github.com/getAsterisk/claudia/pull/3
- https://github.com/getAsterisk/claudia/pull/4
This commit is contained in:
Mufeed VH
2025-06-24 00:24:52 +05:30
parent 0c732633e7
commit 5a29f9ae01
3 changed files with 362 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ mod commands;
mod sandbox;
mod checkpoint;
mod process;
mod claude_binary;
use tauri::Manager;
use commands::claude::{