Skip to content

Bulletproof CLI Detection

Latest

Choose a tag to compare

@anth0nylawrence anth0nylawrence released this 26 Jan 07:06

This release completely overhauls how Blaze detects installed CLI tools (Claude Code, Gemini CLI, Codex CLI). Apps launched from Finder now reliably find CLIs regardless of how they were installed.


Bug Fixes

CLI Detection Overhaul

Problem: CLIs installed via nvm, Homebrew, or other package managers weren't detected when Blaze was launched from Finder/Spotlight. Users saw "No CLIs detected" even though claude --version worked in their terminal.

Root Cause: macOS GUI apps don't inherit the user's shell environment (~/.zshrc, ~/.bashrc). The app was using /usr/bin/which directly, which only sees system paths like /usr/bin.

Solution: Implemented multi-strategy detection that works regardless of how the app is launched:

Strategy Description
Direct Path Check Checks 15+ well-known locations instantly
Login Shell Sources user profile via $SHELL -l -c "which ..."
Path Enumeration Scans all version manager directories

Paths Now Checked:

  • /opt/homebrew/bin (Apple Silicon Homebrew)
  • /usr/local/bin (Intel Homebrew)
  • ~/.local/bin (pip, uv, Claude Code default)
  • ~/.nvm/versions/node/*/bin (all nvm versions)
  • ~/.fnm/node-versions/*/installation/bin (fnm)
  • ~/.volta/bin (Volta)
  • ~/.asdf/shims (asdf)
  • ~/.mise/shims (mise)
  • ~/.proto/bin (proto)
  • ~/.bun/bin (Bun)
  • ~/.cargo/bin (Rust/Cargo)
  • ~/.pnpm-home, ~/Library/pnpm (pnpm)

Consistent Detection Across Views

Problem: Onboarding screen and New Session modal showed different CLIs as "detected" - inconsistent and confusing.

Solution: Unified all detection code paths to use CLIAvailabilityChecker.shared. Both views now use identical detection logic and see the same results.

Shell Resolution for GUI Apps

Problem: $SHELL environment variable isn't always available when app launches from Finder.

Solution: Added Directory Services fallback that queries the system for the user's login shell:

dscl . -read /Users/<username> UserShell

Files Changed

File Change
CLIAvailabilityChecker.swift Multi-strategy detection, resolvedBinaryPath() API
OnboardingViewModel.swift Now uses CLIAvailabilityChecker.shared
NewSessionModal.swift Cache invalidation before detection
ClaudeCodeAdapter.swift Uses unified checker
GeminiCliAdapter.swift Uses unified checker
CodexCliAdapter.swift Uses unified checker
CLIAuthService.swift Uses unified checker for codex auth
GitCloneService.swift Uses unified checker for git detection
FormatterService.swift Uses unified checker
CLIInstallationService.swift Dynamic nvm path enumeration

Installation

  1. Download Blaze-macOS-0.2.3-universal.dmg
  2. Open the DMG
  3. Drag Blaze to Applications
  4. Double-click to launch (signed and notarized - no Gatekeeper warnings)

Known Issues

  • Pre-existing test compilation issue in EngineAdapterTests.swift (does not affect app functionality)

Compatibility

  • macOS: 14.0 (Sonoma) or later
  • Architecture: Universal (arm64 + x86_64)
  • Supported CLIs: Claude Code, Gemini CLI, OpenAI Codex CLI

Code Signing

  • Signed by: Developer ID Application: Anthony Lawrence (G9DJB688G6)
  • Notarized: Yes (Apple notary service)
  • Stapled: Yes (works offline)

Checksums (SHA-256)

e993a9b34e87f6b4558927415d5b70f27dce2b8219cf550506d83608f27ef7d4  Blaze-macOS-0.2.3-universal.dmg (32MB)
df9c5884439f741063b36bac91175ec0fa6de8a05fd83b3b4ce30091a232488d  Blaze-macOS-0.2.3-universal.zip (26MB)