{"id":16834693,"url":"https://github.com/mscdex/install-addons","last_synced_at":"2025-06-20T14:36:56.625Z","repository":{"id":57274835,"uuid":"430176739","full_name":"mscdex/install-addons","owner":"mscdex","description":"A program to install precompiled node addons from Github","archived":false,"fork":false,"pushed_at":"2021-11-22T02:22:54.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-26T22:47:56.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mscdex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-20T18:14:33.000Z","updated_at":"2025-04-04T22:17:25.000Z","dependencies_parsed_at":"2022-09-18T09:12:23.172Z","dependency_job_id":null,"html_url":"https://github.com/mscdex/install-addons","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mscdex/install-addons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Finstall-addons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Finstall-addons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Finstall-addons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Finstall-addons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mscdex","download_url":"https://codeload.github.com/mscdex/install-addons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscdex%2Finstall-addons/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260962901,"owners_count":23089503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T12:07:24.837Z","updated_at":"2025-06-20T14:36:51.611Z","avatar_url":"https://github.com/mscdex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Description\n===========\n\n`install-addons` downloads and installs prebuilt node addons (when possible)\nfrom Github. It is the companion node module to the [build-addons][] Github\nAction.\n\nHow to Use\n==========\n\n1. Make sure you have [build-addons][] correctly providing binaries for\n   downloading.\n\n2. Add the following to your **package.json**:\n\n    ```js\n    \"install-addons\": {\n      \"binaryRepo\": \"\u003cuser\u003e/\u003crepoName\u003e\",\n      \"binaryOutPath\": \"build/Release/\u003cbindingName\u003e.node\"\n\n      \"buildCommand\": \"\u003ccommand\u003e\",\n      \"preBuildCommand\": \"\u003ccommand\u003e\",\n      \"buildDependencies\": {\n        \"\u003cpackageName\u003e\": \"\u003cpackageVersion\u003e\"\n      },\n\n      \"usesNapi\": \u003cboolean\u003e,\n    }\n    ```\n\n    * `binaryRepo` - A **required** string containing the user and repository\n      name of where prebuilt versions of this node addon can be found.\n\n    * `binaryOutPath` - A **required** string containing the path where prebuilt\n      binaries should be downloaded to. Typically this will be something like\n      `'build/Release/mybinding.node'`.\n\n    * `buildCommand` - A **required** string that contains the command to\n      build the addon. Typically this will simply be `'node-gyp rebuild'` for\n      most addons.\n\n    * `preBuildCommand` - An optional string containing a command to execute\n      before executing `buildCommand`. This is useful if you have an additional\n      step to configure/prepare things first (e.g. generate .gypi files).\n\n    * `buildDependencies` - An optional object containing dependencies that need\n      to be installed before a local build can take place. For example, you\n      would put `nan` or similar npm packages here.\n\n    * `usesNapi` - An optional boolean that indicates whether this addon\n      utilizes napi/node-api. This is used when checking for compatible prebuilt\n      addons.\n\n\n3. Call `node-install-addons` from an install script:\n\n    ```js\n      \"scripts\": {\n        \"install\": \"node-install-addons\"\n      },\n    ```\n\n4. You're done!\n\n\nCLI Parameters\n==============\n\nThese are parameters that you can specify in your npm install command.\n\n* `--build-from-source[=\u003cstring\u003e]` - If a string value is given, it builds from\n  source only for the specified (comma-separated) packages that use\n  `install-addons`. If the value is `'false'`, the behavior is disabled for all\n  packages that use `install-addons`. If the value `'true'` or no string value\n  is given, then it builds from source for all packages that use\n  `install-addons`.\n\n* `--fallback-to-build[=\u003cstring\u003e]` - Attempts to build the addon locally only if\n  a compatible binary cannot be found. If a string value is given, it falls back\n  to building from source only for the specified (comma-separated) packages that\n  use `install-addons`. If the value is `'false'`, the behavior is disabled for\n  all packages that use `install-addons`. If the value `'true'` or no string\n  value is given, then it falls back to building from source for all packages\n  that use `install-addons`. **Note:** The default behavior is to fallback to\n  building.\n\n* `--override-arch=\u003cstring\u003e` - Overrides the local host architecture with the\n  architecture given in the specified string.\n\n* `--override-libc=\u003cstring\u003e` - Overrides the local host libc with the\n  libc given in the specified string. This string can contain the libc name\n  or be of the format: `{name}_{majorVersion.minorVersion}`.\n\n* `--override-platform=\u003cstring\u003e` - Overrides the local host platform with the\n  platform given in the specified string. This string can contain the platform\n  name or be of the format: `{name}_{majorVersion.minorVersion}`.\n\n* `--silent-build` - When building from source, no compilation output will be\n  logged.\n\n\n[build-addons]: https://github.com/mscdex/build-addons\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscdex%2Finstall-addons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmscdex%2Finstall-addons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscdex%2Finstall-addons/lists"}