{"id":14956160,"url":"https://github.com/ipfs/npm-kubo","last_synced_at":"2025-04-04T18:07:28.504Z","repository":{"id":30256751,"uuid":"33808076","full_name":"ipfs/npm-kubo","owner":"ipfs","description":"Install Kubo (go-ipfs) from NPM","archived":false,"fork":false,"pushed_at":"2024-10-16T18:48:50.000Z","size":112,"stargazers_count":42,"open_issues_count":9,"forks_count":30,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-29T12:11:37.493Z","etag":null,"topics":["ipfs","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/kubo","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CubeFactory2/cubefactory","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipfs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-12T07:49:01.000Z","updated_at":"2024-10-16T18:48:53.000Z","dependencies_parsed_at":"2023-12-14T17:52:59.607Z","dependency_job_id":"3fcf3c2a-fa47-4621-996f-801ca7822689","html_url":"https://github.com/ipfs/npm-kubo","commit_stats":{"total_commits":186,"total_committers":25,"mean_commits":7.44,"dds":0.7903225806451613,"last_synced_commit":"d7eb4ba1ef56e0b7180d964ec48c1c89aecd620c"},"previous_names":["ipfs/npm-kubo","ipfs/npm-go-ipfs"],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fnpm-kubo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fnpm-kubo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fnpm-kubo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs%2Fnpm-kubo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipfs","download_url":"https://codeload.github.com/ipfs/npm-kubo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235362705,"owners_count":18977890,"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":["ipfs","npm"],"created_at":"2024-09-24T13:12:24.368Z","updated_at":"2025-02-22T22:10:34.455Z","avatar_url":"https://github.com/ipfs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://docs.ipfs.tech/how-to/command-line-quick-start/\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/157609/250148884-d6d12db8-fdcf-4be3-8546-2550b69845d8.png\" alt=\"Kubo logo\" title=\"Kubo logo\" width=\"200\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  Kubo: IPFS Implementation in GO\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eInstall \u003ca href=\"https://github.com/ipfs/kubo\"\u003eKubo\u003c/a\u003e (previously known as \"go-ipfs\") from \u003ca href=\"https://www.npmjs.com/package/kubo\"\u003eNPM\u003c/a\u003e\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ipfs.tech\"\u003e\u003cimg src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" alt=\"Official Part of IPFS Project\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discuss.ipfs.tech\"\u003e\u003cimg alt=\"Discourse Forum\" src=\"https://img.shields.io/discourse/posts?server=https%3A%2F%2Fdiscuss.ipfs.tech\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://matrix.to/#/#ipfs-space:ipfs.io\"\u003e\u003cimg alt=\"Matrix\" src=\"https://img.shields.io/matrix/ipfs-space%3Aipfs.io?server_fqdn=matrix.org\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ipfs/npm-kubo/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/ipfs/npm-kubo/main.yml?branch=master\" alt=\"ci\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/kubo\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/kubo\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/kubo\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/kubo.svg\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Development](#development)\n  - [Publish a new version](#publish-a-new-version)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nInstall the latest [Kubo](https://github.com/ipfs/kubo/) (go-ipfs) binary:\n\n```sh\n# Install globally\n\u003e npm install -g kubo\n\u003e ipfs version\nipfs version v0.23.0\n\n# Install locally\n\u003e npm install kubo\n\u003e ./node_modules/.bin/ipfs\nipfs version v0.23.0\n```\n\n## Usage\n\nThis module downloads Kubo (go-ipfs) binaries from https://dist.ipfs.tech into your project.\n\nIt will download the kubo version that matches the npm version of this module. So depending on `kubo@0.23.0` will install `kubo v0.23.0` for your current system architecture, in to your project at `node_modules/kubo/kubo/ipfs` and additional symlink to it at `node_modules/kubo/bin/ipfs`.\n\nOn Windows, `ipfs.exe` file is used, and if the symlink can't be created under a regular user, a copy of `ipfs.exe` is created instead.\n\nAfter downloading you can find out the path of the installed binary by calling the `path` function exported by this module:\n\n```javascript\nimport { path } from 'kubo'\n\nconsole.info('kubo is installed at', path())\n```\n\nAn error will be thrown if the path to the binary cannot be resolved.\n\n### Caching\n\nDownloaded archives are placed in OS-specific cache directory which can be customized by setting `NPM_KUBO_CACHE` in env.\n\n### Overriding with `KUBO_BINARY` env\n\nIf the `KUBO_BINARY` env variable is set at runtime this will override the path of the binary used.\n\nThis must point to the file, not the directory containing the file.\n\n## Development\n\n**Warning**: the file `bin/ipfs` is a placeholder, when downloading stuff, it gets replaced. so if you run `node install.js` it will then be dirty in the git repo. **Do not commit this file**, as then you would be commiting a big binary and publishing it to npm. A pre-commit hook exists and should protect against this, but better safe than sorry.\n\n### Publish a new version\n\nYou should be able to just run `./publish.sh` for example:\n\n```sh\n\u003e ./publish.sh\nusage ./publish.sh \u003cversion\u003e\npublish a version of kubo to npm\n\n\u003e ./publish.sh 0.3.11\n```\n\nThis will:\n\n- check the version is indeed a tag in https://github.com/ipfs/kubo\n- check the size of `bin/ipfs` is right (must be the checked in file)\n- update the version numbers in `package.json` and `README.md`\n- `git commit` the changes\n- push to https://github.com/ipfs/npm-kubo\n- publish to `kubo@$version` to https://npmjs.com/package/kubo\n\nOpen an issue in the repo if you run into trouble.\n\n### Publish a new version of this module with exact same kubo version\n\nIf some problem happens, and you need to publish a new version of this module targetting _the same_ kubo version, then please follow this convention:\n\n1. **Clean up bad stuff:** unpublish all modules with this exact same `\u003ckubo-version\u003e`\n2. **Add a \"hacky\" version suffix:** use version: `\u003ckubo-version\u003e-hacky\u003cnum\u003e`\n3. **Publish version:** publish the module. Since it's the only one with the kubo version, then it should be installed.\n\n\u003e Why do this?\n\nWell, if you previously published npm module `kubo@0.4.0` and there was a problem, we now must publish a different version, but we want to keep the version number the same. so the strategy is to publish as `kubo@0.4.0-hacky1`, and unpublish `kubo@0.4.0`.\n\n\u003e Why `-hacky\u003cnum\u003e`?\n\nBecause it is unlikely to be a legitimate kubo version, and we want to support kubo versions like `floodsub-1` etc.\n\n\u003e Do i have to say `-hacky\u003cnum\u003e` or can i just use `-\u003cnum\u003e`?\n\n`-\u003cnum\u003e` won't work, as [link-ipfs.js](./link-ipfs.js) expects `-hacky\u003cnum\u003e`. If you want to\nchange the convention, go for it, and update this readme accordingly.\n\n## Contribute\n\nFeel free to join in. All welcome. Open an [issue](https://github.com/ipfs/npm-kubo/issues)!\n\nThis repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs%2Fnpm-kubo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipfs%2Fnpm-kubo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs%2Fnpm-kubo/lists"}