Repository navigation
Description
Summary
The prebuilt tools from inference-gateway/binaries (whisper-cli, ffmpeg, llama-tts) are downloaded by four consumers with four separate downloaders: the CLI (internal/audio/binary.go), the Desktop app (backend/src/stt.rs), the gateway's local TTS engine (internal/tts/engine.go) and the opentask extension. Each of them keeps an existing file forever. A v0.3.0 audio-only ffmpeg stayed in ~/.infer/bin/tools after v0.4.0/v0.5.0 added video support, and that is what led to the misdiagnosis in inference-gateway/binaries#35.
inference-gateway/binaries#36 added install.sh, a POSIX sh installer. It picks the host's asset, verifies it against checksums.txt, and downloads through gh when authenticated (curl otherwise). It replaces any binary whose sha256 doesn't match the release and leaves a matching one alone.
The CLI should be the single owner of these tools on a local machine. It installs and upgrades them by running install.sh, and Desktop and opentask ask the CLI instead of downloading the tools themselves.
Today
BinaryStore.EnsureBinaryreturns any existing~/.infer/bin/<name>as-is. That covers the transcriber (whisper-cli), the synthesizer (llama-tts,ffmpeg), the audio recorder (ffmpeg), andRecordStartininternal/computer/recorder.go(ffmpeg).- The CLI installs into
~/.infer/bin, while Desktop and opentask use~/.infer/bin/tools, so one machine can hold two differentwhisper-cli/ffmpegcopies.
Proposal
- One install dir:
~/.infer/bin/tools(install.sh's default).~/.infer/binkeeps onlyinferandinference-gateway. infer binaries install [name...](name open to change;infer toolsis taken by agent tools) runs install.sh, withINSTALL_DIR=~/.infer/bin/toolsandVERSIONfrom--version. No names means all binaries. The script is fetched first and then run, so a failed fetch fails the command instead of piping an empty script intosh.infer binaries status [name...]is read-only. It reports each binary asmissing,staleorcurrent(sha256 against the latestchecksums.txt) and exits non-zero unless all are current. Add it to the default approval-free Bash allowlist, so Desktop and opentask can check without a prompt and ask for approval only when an install is actually needed.EnsureBinaryresolves~/.infer/bin/tools/<name>and goes through the same install path when a binary is missing or stale.- On Windows without
sh, keep the native Go downloader as a fallback, but apply install.sh's rule: replace on sha256 mismatch.
Acceptance Criteria
-
infer binaries install [name...]installs and upgradeswhisper-cli,ffmpegandllama-ttsinto~/.infer/bin/toolsvia install.sh. No names means all;--version vX.Y.Zpins a release. -
infer binaries status [name...]reportsmissing/stale/currentper binary, exits non-zero unless all are current, and is on the default approval-free Bash allowlist. -
EnsureBinaryreplaces a binary whose sha256 differs from the latest release'schecksums.txt, checking at most once per process. A matching binary is not re-downloaded. Ifchecksums.txtcan't be fetched (offline), the existing binary is kept. - Every
EnsureBinarycaller uses~/.infer/bin/tools. Existing~/.infer/bin/{whisper-cli,ffmpeg,llama-tts}copies are removed once the tools dir holds current ones, so there is no second copy. - On Windows without
sh, the native fallback applies the same sha256-mismatch rule. -
speech_to_text.auto_download: falsestill never downloads, andbinary_pathoverrides still win. -
docs/speech-to-text.mdanddocs/text-to-speech.mddescribe the new dir and commands. - Tests cover: a stale binary is replaced, a current one is skipped, a missing one is installed, and an offline check keeps the existing binary.
Related
- [TASK] Refactor install ffmpeg and whisper-cli through the CLI instead of downloading them desktop#352: Desktop installs its tools through these commands
- [TASK] Refactor check and install frame tools through the CLI's binaries commands opentask#207: opentask checks and installs
ffmpegthrough these commands - [BUG] Local TTS engine never upgrades a stale llama-tts binary inference-gateway#745: the gateway's standalone downloader upgrades stale
llama-ttsand looks in~/.infer/bin/tools - inference-gateway/docs#841: docs for
install.sh
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Sep 26, 2026
@infer Can you work on this? use /domain-driven-design /ponytail:ponytail
inference-gateway-maintainer commentedon Sep 26, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1353
✅ Infer Result: Success
All work is complete and verified. Let me finalize the todo list and summarize.
All work is complete. Final state verified: clean tree, pushed, PR ready for review.
Summary
I implemented the feature from issue #1352: the CLI is now the single owner of the prebuilt binaries (
whisper-cli,ffmpeg,llama-tts) on a local machine, installing and upgrading them through the binaries release'sinstall.sh.PR: #1353 (ready for review,
Resolves #1352)What changed (commit
e68399d, 18 files, +704/-126)internal/audio/binary.go-EnsureBinarynow resolves~/.infer/bin/tools/<name>(install.sh's default, the dir Desktop and opentask use) instead of~/.infer/bin. When a binary is missing or its sha256 differs from the latest release'schecksums.txt(checked at most once per process per binary), it fetchesinstall.shfirst (a failed fetch fails the command) and runs it withINSTALL_DIR=~/.infer/bin/toolsandVERSIONpinned; a matching binary is never re-downloaded, and an unreachable release (offline) keeps the existing binary.Install/Statusback the new commands. Windows without a POSIX shell falls back to the native Go downloader applying the same sha256-mismatch rule.cmd/binaries/binaries.go(new) -infer binaries install [name...] --version vX.Y.Z(no names = all tools) and read-onlyinfer binaries status [name...]reportingmissing/stale/current, exiting non-zero unless all current.config/config.go-infer binaries statusadded to the default approval-free Bash allowlist.~/.infer/bin/{whisper-cli,ffmpeg,llama-tts}copies are removed once the tools dir holds current ones;~/.infer/binkeeps onlyinferandinference-gateway.speech_to_text.auto_download: falsestill never downloads (and never checks the release),binary_pathoverrides still win.docs/speech-to-text.md,docs/text-to-speech.md,docs/commands-reference.md,docs/tools-reference.mdand the built-inbugskill updated.Checks
task precommit:runpasses (0 lint issues; the lint gate forced a nestif refactor into a flatneedsInstallhelper with identical semantics), and all affected packages pass (internal/audio,cmd/root,internal/computer,config).Follow-ups
infer binaries status/installinstead of their own downloaders; [BUG] Ollama Cloud GLM 5.2 Context Length is not 200k #745 covers the gateway's downloader.Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 22m 46sTokens: 13,452,238 in · 88,502 out · 13,540,740 total (113 requests)
Tool calls: 161 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Sep 27, 2026
🎉 This issue has been resolved in version 0.211.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
refactor(recording): check and install frame tools through the CLI's …
refactor(recording): check and install frame tools through the CLI's …
chore(release): 🔖 1.17.0 [skip ci]