explaingit

ipfs/js-ipfs

7,409JavaScriptAudience · developerComplexity · 4/5Setup · moderate

TLDR

A deprecated JavaScript implementation of IPFS for storing and sharing files on a distributed network using content addresses instead of central server locations.

Mindmap

mindmap
  root((js-ipfs))
    What it does
      Content-addressed storage
      Distributed file sharing
      No central server
    Usage Modes
      CLI daemon
      Node.js library
      Browser library
    Status
      Deprecated
      Migrate to Helia
    Architecture
      Core implementation
      HTTP server
      CLI interface
      Client library
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add files to a distributed IPFS network from a Node.js script and get back a content address to share with others.

USE CASE 2

Run a local IPFS daemon from the command line to connect your machine to the decentralized network.

USE CASE 3

Build a browser app that reads and writes files to IPFS without needing a central server.

Tech stack

JavaScriptNode.jsIPFS

Getting it running

Difficulty · moderate Time to first run · 30min

Project is deprecated with no further security fixes, migrate to Helia instead.

In plain English

js-ipfs was a JavaScript implementation of IPFS, a protocol for storing and sharing files across a distributed network of computers rather than on a central server. With IPFS, when you add a file it gets a unique content address based on what the file contains, not where it is stored. Anyone with that address can retrieve the file from the network, and the file cannot be silently changed because its address would change too. Important note from the README: this project is deprecated. It has been superseded by a newer project called Helia. The README states that security fixes will no longer be provided here, and links to migration instructions for anyone still using js-ipfs. When it was active, js-ipfs could be used in two ways. The first was as a command-line tool: after installing it globally with npm, running jsipfs daemon started a background process that connected your machine to the IPFS network. You could then add files and receive a content address back. The second way was as a library inside a JavaScript application, where you would import it and create a node programmatically, adding content and reading back its address directly in code. It also worked inside web browsers, not just server-side Node.js environments. The repository is organized as a collection of related packages within one repository, each handling a distinct part of the system: a core implementation, a command-line interface, an HTTP server, an HTTP gateway for serving content over standard web requests, a client library for connecting to a running node, and several protocol and communication layers. This structure allowed developers to use only the parts they needed. For anyone encountering this project today, the README directs users to the replacement project Helia for current development, documentation, and community support.

Copy-paste prompts

Prompt 1
I'm migrating from js-ipfs to Helia. Show me the equivalent of the js-ipfs node.add and node.cat calls in the new Helia API.
Prompt 2
Using js-ipfs as a Node.js library, how do I add a text file and retrieve it back using the content address it returns?
Prompt 3
How does content addressing in IPFS guarantee that a file has not been changed since it was added to the network?
Open on GitHub → Explain another repo

← ipfs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.