fetch-executable (v0.17.1) is a Node.js library for downloading and caching exact versions of CLI executables on a per-project basis. It checks if the correct version is already present locally before downloading, saving bandwidth and ensuring reproducibility. Key differentiators: supports version checks via --version, hash verification, tar extraction, and includes built-in shortcuts for 15 popular tools (kubectl, helm, terraform, etc.). Released under MIT, actively maintained with regular updates.
npm install fetch-executableNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: download an executable if the local version doesn't match, using URL templating and version check.
Use ESM imports (import { fetchExecutable } from 'fetch-executable') or migrate to the previous v0.16.x if you must use CommonJS.Import shortcuts like: import { kubectl } from 'fetch-executable/executables';Set at least one of these options. For example, provide a version string and versionExecArgs.
Use 'hashValueUrl' option with a URL that returns the expected hash.
Change to ESM import: replace const { fetchExecutable } = require('fetch-executable') with import { fetchExecutable } from 'fetch-executable' and ensure your project is configured for ESM.Ensure import path is 'fetch-executable/executables' (not 'fetch-executable').
Add a version string or execIsOk function to the options object.
Ensure version does not contain special characters. Use versionExecPostProcess to clean version output if needed.
No dependency data recorded yet.