{"id":18711864,"url":"https://github.com/chrisdmacrae/atomic-algolia","last_synced_at":"2026-01-12T05:42:50.839Z","repository":{"id":29021909,"uuid":"120004695","full_name":"chrisdmacrae/atomic-algolia","owner":"chrisdmacrae","description":"An NPM package for running atomic updates to an Algolia indices","archived":false,"fork":false,"pushed_at":"2024-01-09T21:04:58.000Z","size":412,"stargazers_count":69,"open_issues_count":19,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-26T05:26:57.831Z","etag":null,"topics":["algolia","algoliasearch","node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisdmacrae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["chrisdmacrae"]}},"created_at":"2018-02-02T16:30:17.000Z","updated_at":"2025-08-19T16:23:27.000Z","dependencies_parsed_at":"2024-06-18T15:37:40.069Z","dependency_job_id":"2f63d874-8cbc-44fe-8e3e-dd50fafbf580","html_url":"https://github.com/chrisdmacrae/atomic-algolia","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/chrisdmacrae/atomic-algolia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdmacrae%2Fatomic-algolia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdmacrae%2Fatomic-algolia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdmacrae%2Fatomic-algolia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdmacrae%2Fatomic-algolia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisdmacrae","download_url":"https://codeload.github.com/chrisdmacrae/atomic-algolia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdmacrae%2Fatomic-algolia/sbom","scorecard":{"id":279740,"data":{"date":"2025-08-11","repo":{"name":"github.com/chrisdmacrae/atomic-algolia","commit":"971cc24d89540324aa13b493d7484884bdba7056"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/11 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-and-test.yml:1","Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/build-and-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/chrisdmacrae/atomic-algolia/npm-publish.yml/master?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   4 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"37 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp","Warn: Project is vulnerable to: GHSA-mpwj-fcr6-x34c"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T15:26:07.726Z","repository_id":29021909,"created_at":"2025-08-17T15:26:07.726Z","updated_at":"2025-08-17T15:26:07.726Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["algolia","algoliasearch","node","nodejs"],"created_at":"2024-11-07T12:40:42.410Z","updated_at":"2026-01-12T05:42:50.824Z","avatar_url":"https://github.com/chrisdmacrae.png","language":"JavaScript","funding_links":["https://github.com/sponsors/chrisdmacrae"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Algolia Atomic\nAn NPM package for running atomic updates to Algolia indices\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg)](#contributors) \n[![npm](https://img.shields.io/npm/dt/atomic-algolia.svg)](https://www.npmjs.com/package/atomic-algolia) \n\n\n## How it works\nThis package runs *atomic* updates to Algolia Indices. **What does that mean?**\n\nSimply put, this package reads your local index, and updates the *new* or *updated* records, while removing deleted records.\n\nIt does this *all at once*, so your index is never out of sync with your content, and you use the smallest amount of operations possible. \n\n*(Stay on that free plan as long as you can!)*\n\n## Installation\nTo install this script, you must have [Node \u0026 NPM installed](https://nodejs.org/en/download/). Once installed, run the following command in your terminal:\n\n```\nnpm install atomic-algolia\n```\n\n## Usage\nThis package can be used in [NPM \"scripts\"](#npm-scripts) or in [Javascript Files](#javascript-files).\n\nIt reads an array of objects or local JSON file with an array of valid records. For example:\n\n```\n[\n    {\n        \"objectID\": \"1\",\n        \"title\": \"An example record\"\n    }\n]\n```\n\n### NPM Scripts\nTo use this package in your [NPM scripts](https://docs.npmjs.com/misc/scripts), add the command to your script in `package.json`. \n\n\u003e Note, this package can only be used in NPM scripts to update a single index from a local JSON file. To update multiple indices or pass in a Javascript object, create your own script by following the instructions in [Javascript Files](#scripts)\n\n\nE.g:\n\n```\n...\n\"scripts\": {\n    \"algolia\": \"atomic-algolia\"\n}\n...\n```\n\nLastly, run your NPM command. E.g:\n\n```\nALGOLIA_APP_ID={{ YOUR_APP_ID}} ALGOLIA_ADMIN_KEY={{ YOUR_ADMIN_KEY }} ALGOLIA_INDEX_NAME={{ YOUR_INDEX_NAME }} ALGOLIA_INDEX_FILE={{ YOUR_FILE_PATH }} npm run algolia\n```\n\n### Scripts\nTo use this package in your own local script, require it in your file. E.g:\n\n#### Using with a local JSON file\n\n```\nvar atomicalgolia = require(\"atomic-algolia\")\nvar indexName = \"example_index\"\nvar indexPath = \"./index.json\"\nvar cb = function(error, result) {\n    if (err) throw error\n\n    console.log(result)\n}\n\natomicalgolia(indexName, indexPath, cb)\n```\n\nThen call the script from your terminal as follows:\n\n```\nALGOLIA_APP_ID={{ YOUR_APP_ID}} ALGOLIA_ADMIN_KEY={{ YOUR_ADMIN_KEY }} node YOUR_SCRIPT.js\n```\n\n#### Using with an Array of Objects\n\n```\nvar atomicalgolia = require(\"atomic-algolia\")\nvar indexName = \"example_index\"\n\nvar indexData = [\n    {\n        objectID: \"1\",\n        title: \"An example record\"\n    }\n]\n\nvar cb = function(error, result) {\n    if (error) throw error\n\n    console.log(result)\n}\n\natomicalgolia(indexName, indexData, cb)\n```\n\nThen call the script from your terminal as follows:\n\n```\nALGOLIA_APP_ID={{ YOUR_APP_ID}} ALGOLIA_ADMIN_KEY={{ YOUR_ADMIN_KEY }} node YOUR_SCRIPT.js\n```\n\n\n## Using a `.env` file\nA `.env` file can be added to the root of your project with the required environment variables. This way, you don't have to specify them in `package.json` or when running the command.\n\nRun the following command:\n\n```\ntouch .env \u0026\u0026 open .env\n```\n\nThen paste in the following contents, and update the placeholder variable marked with braces `{{ }}`\n\n```\nALGOLIA_APP_ID={{ YOUR_APP_ID }}\nALGOLIA_ADMIN_KEY={{ YOUR_ADMIN_KEY }}\nALGOLIA_INDEX_NAME={{ YOUR_INDEX_NAME }}\nALGOLIA_INDEX_FILE={{ YOUR_INDEX_FILE }}\n```\n\n`ALGOLIA_APP_ID`: the ID of the Algolia app instance that contains your index.\n\n`ALGOLIA_ADMIN_KEY`: the adminstrative key for the Algolia app instance that contains your index.\n\n`ALGOLIA_INDEX_NAME`: the name of the index you're updating.\n\n`ALGOLIA_INDEX_FILE`: the relative path to your index file from the root of your project.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n| [\u003cimg src=\"https://avatars2.githubusercontent.com/u/6855186?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003echrisdmacrae\u003c/b\u003e\u003c/sub\u003e](https://github.com/chrisdmacrae)\u003cbr /\u003e[💬](#question-chrisdmacrae \"Answering Questions\") [💻](https://github.com/algolia/atomic-algolia/commits?author=chrisdmacrae \"Code\") [🎨](#design-chrisdmacrae \"Design\") [📖](https://github.com/algolia/atomic-algolia/commits?author=chrisdmacrae \"Documentation\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/283419?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTim Carry\u003c/b\u003e\u003c/sub\u003e](http://www.pixelastic.com/)\u003cbr /\u003e[💬](#question-pixelastic \"Answering Questions\") [💻](https://github.com/algolia/atomic-algolia/commits?author=pixelastic \"Code\") [📖](https://github.com/algolia/atomic-algolia/commits?author=pixelastic \"Documentation\") |\n| :---: | :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisdmacrae%2Fatomic-algolia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisdmacrae%2Fatomic-algolia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisdmacrae%2Fatomic-algolia/lists"}