fix(cli): improve whisper-cpp install guidance and add doctor check (#1681)

- Platform-specific install instructions for Linux (apt) and Windows
  (releases page / cmake) instead of a generic "see GitHub" fallback
- Export getInstallInstructions so doctor can reuse it
- Add whisper-cpp check to `hyperframes doctor` after the Environment
  check — reports path when found, shows install hint when missing
This commit is contained in:
Miguel Ángel
2026-06-23 19:51:39 -04:00
committed by GitHub
parent f622e5a7ba
commit 344618e22a
2 changed files with 21 additions and 1 deletions
+14
View File
@@ -145,6 +145,19 @@ function checkEnvironment(): CheckResult {
return { ok: true, detail: parts.join(" \u00B7 ") };
}
async function checkWhisper(): Promise<CheckResult> {
const { findWhisper, getInstallInstructions } = await import("../whisper/manager.js");
const result = findWhisper();
if (result) {
return { ok: true, detail: result.executablePath };
}
return {
ok: false,
detail: "Not found (optional \u2014 needed for transcription)",
hint: getInstallInstructions(),
};
}
export interface CheckOutcome {
name: string;
ok: boolean;
@@ -213,6 +226,7 @@ export default defineCommand({
}
checks.push({ name: "Environment", run: checkEnvironment });
checks.push({ name: "whisper-cpp", run: checkWhisper });
const outcomes: CheckOutcome[] = [];
for (const check of checks) {
+7 -1
View File
@@ -151,10 +151,16 @@ export function findWhisper(): WhisperResult | undefined {
return findFromEnv() ?? findFromSystem() ?? findBuiltBinary();
}
function getInstallInstructions(): string {
export function getInstallInstructions(): string {
if (platform() === "darwin") {
return "brew install whisper-cpp";
}
if (platform() === "linux") {
return "Build from source: https://github.com/ggml-org/whisper.cpp#building (requires cmake and a C compiler)";
}
if (platform() === "win32") {
return "Build with cmake: https://github.com/ggml-org/whisper.cpp#building";
}
return "See https://github.com/ggml-org/whisper.cpp#building";
}