interplanetary package manager

Overview

Interplanetary Package Manager

An NPM compatible distributed package manager tool for Javascript dependencies.

WIP: this is not production ready... see TODO for progress towards removing WIP tag

Table of Contents

Background

IPFS

ippm packages are distributed with IPFS which content addresses files via a DHT. More information on the libp2p network stack and IPFS content addressing can be found here. Currently ippm uses a set of servers with @diasdavid npm-registry mirror to help seed the packages until a more robust system of distributed payment (filecoin) is implemented.

For now this will require a running go-ipfs daemon to download packages. See the js-ipfs branch for full js implementation.

TODO: Work on routing blocks in js-ipfs

//This is built with js-ipfs and no prior installation will be required to have a node boot up and access the network. //Optionally I would like to build a switch to run js-ipfs-api to a local go-ipfs node.

Ethereum

Ethereum (ETH) is the blockchain chosen for ippm. This maintains that permissions over packages are distributed as well as act as a pointer to published packages. ippm uses the ippm-registry to accomplish this.

Motivation

Package managers like npm are great tools for developers. ippm is an attempt to improve a system like npm with distribution of data, registry, and control. The need for such improvements is as follows:

Legal

Left pad is an example case of one developer put under legal pressures to remove a package thus inspiring him to remove another dependency of many popular javascript modules. The removal of the package caused damage to many dependent systems which caused the central authority of npm to controversially reinstate the removed package without permission. With ippm upgrades to npm, the permission to packages is attached to the private key of the owner and not a large corporation.

more information

Data Availability

Rather than stored in a data center, ippm hopes to achieve data redundancy with p2p protocols. This raises questions about how to incentivise nodes to seed packages that filecoin hopes to answer.

Distributed Registry

The modules are stored in IPFS and retrievable by their hash stored in a distributed blockchain, the hash can then be cryptographically tied to an identity. You automatically get signed and verified software packages as a default behavior.

Costs

Free as in freedom, there are still going to be financial costs to running this. Currently there is a miner fee for publishing packages, public or private cost the same. There is also a need to support the nodes seeding packages on ipfs. The metrics for that have not been worked out yet.

ippm private repositories can be created by encrypting the data before hashing with ipfs. In the future an encryption option will be provided in a private repository function. This feature is free for individual and production use cases.

Install

Requirements

  • Node v4.x (LTS) or higher
  • npm (but not for long)
  • go-ipfs daemon (but not for long)

Install via npm

NPM published version of ippm requires a running go-ipfs daemon to work atm, see usage for more info.

Option 1: Git clone

git clone https://github.com/nginnever/ippm.git
cd ippm
sudo npm i -g

Option 2: npm

npm i interplanetary-package-manager

install ippm globally to use ippm from any location

npm i interplanetary-package-manager -g

or run from the project bin

cd /src/cli/bin.js
node bin.js 

Option 3: IPFS (coming soon!)

Run a local go or js-ipfs node and cli

ipfs get 
   
    
cd 
    
     
./install

    
   

Usage

Master Branch

The master branch currently requires that you run a local go-ipfs daemon in order to download packages from peers. See js-ipfs branch for the full javascript implementation.

  1. Install go-ipfs - See ipfs install

  2. Init a repository ipfs init

  3. Start ipfs daemon ipfs daemon (may need cors origin)

  4. Use ippm commands

example

cd YourNewPackage
ippm init
ippm install acorn-test

js-ipfs Branch

The libp2p and js-ipfs branchs are a complete js implementation that are close to being ready. See TODO for more information.

Commands

Init

ippm init

OPTIONS:

 -f, --force

DESCRIPTION

nppm init will create the package.json file in the same format as npm packages
so that installing with ippm will remain compatible.

Install

ippm install 
    
    
     

ARGUMENTS:

 -name 
     
       'the name of the package to be installed'

OPTIONS:

 -p, --repo 'the path to an ipfs repo'

DESCRIPTION

ippm install will create a js-ipfs node (optionally supply a repo location) and 
connect via web3 RPC to a geth client test net. Install checks a smart contract
for the latest ipfs hash of the module to be installed. All modules are currently
installed under 'node_modules'


     
    
   

Publish

ippm publish 
   
    

ARGUMENTS:

 -folder 
    
      'location of a folder with a package.json file'

DESCRIPTION

ippm publish looks in the current directory (optionally provide a different directory)
for a package.json file. It will hash the directory and publish the version number
with the hash and package name in the smart contract registry

    
   

Version

ippm version 
   
    

ARGUMENTS:

 -name 
    
      'name of the package version you are checking'

DESCRIPTION

ippm version looks at the ethereum block chain to find the associated ipld hash for the 
supplied package name. The latest version is then grabbed from the array of version history
contained in the ipld object.

    
   

Web Interface

http://localhost:8080/ipfs/QmSGXf6KXUZFUspCArTnLeYWm8dRK8cYiahcD8rLcbeY6b

There is a web application to interface with the ippm-registry where you can search, view and publish packages. This currently needs to have the correct json model as detailed below multihashed and supplied to the web client while publishing. More information can be found in ippm-registry

You can download the web client via the ipfs hash or go to the ippm-registry repo and build it from source.

Data Model

Each node in the blockchain list will store a registry for the IPPM packages in IPLD format. Here a "link" is an IPLD link to the content of the module.

Example: ipfs-unixfs-engine module

registered hash: QmbzSwZYjFTLNu2qN8rw4Htkte6wFdjFNTSLJeuWf4rGbV

{
  "name": "ipfs-unixfs-engine",
  "versions": [
    {
      "version": "^0.10.0",
      "link": {"/": "Qmd2Zgzua4atXuqZRTMsMGekDxSftkgNwZxofT9tA6PW47"},
      "owner": "0x87357c51c98ab021708cc769965117efbfdec5f6"
    }
  ]
}

Contribute

Feel free to drop by #ipfs and ping me (voxelot) in irc or file an issue here.

TODO

  • update install algorithm
  • document install algorithm
  • register all of the npm modules in ippm-registry
  • port registry-mirror repo format into the app
  • publish the registry to the main ethereum chain
  • Write js-ipfs-api switch for go-ipfs support
  • Build binaries and install scripts for distribution
  • add all of the nice npm symlink things
  • Make web client publishing/permissions/accounts easy to use
  • js-ipfs to handle both merkledag protobufs and ipld cbor objects

License

MIT

You might also like...

📦🚀 Fast, disk space efficient package manager

📦🚀 Fast, disk space efficient package manager

中文 | Español Fast, disk space efficient package manager: Fast. Up to 2x faster than the alternatives (see benchmark). Efficient. Files inside node_mod

Jan 3, 2023

frontend package manager and build tool for modular web applications

frontend package manager and build tool for modular web applications

THIS PROJECT IS DEPRECATED Component is not maintained anymore. See here #639 for more information. You can still use the component registry on compon

Dec 30, 2022

A next-generation package manager for the front-end

A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Dec 28, 2022

JavaScript package manager - using a browser-focused and RequireJS compatible repository

****NOTE: this project is no longer active and not recommended for use. It is left here for reference. **** Jam was created at a time before Bower and

Dec 10, 2022

Brand new static package manager.

spm Brand new static package manager for browser. spm 从 3.9 开始将不再管理组件的生命周期, 即不再有 spmjs.io. 所以相应的逻辑全部去除. 请使用 npm 来管理组件. Install $ npm install spm -g Us

Sep 24, 2022

Package manager faster than NPM

Pine Script holder that runs faster than NPM and yarn Pine is a npm and yarn run like module, that allows you to organize your scripts and run them FA

Jul 10, 2021

Bitburner-bbpm - An experimental package manager for the game Bitburner.

BPPM - BitBurner Package Manager An experimental package manager for the game Bitburner. Install Instructions Download the latest release of bbpm.js.

Mar 24, 2022

Flight is a universal package manager for your needs, no matter what language you may want to write your code in.

Flight Swift, reliable, multi-language package manager. ⚡ Installation We don't have an official release of Flight yet, however, if you would like to

Dec 25, 2022

Autocomplete, diagnostics, hover info & more for the Wally package manager

Wally Utilities This VSCode extension provides some nice-to-haves when using the Wally package manager. The extension can be downloaded from the Visua

Jul 28, 2022

Detects which package manager (bun, pnpm, yarn, npm) is used.

@skarab/detect-package-manager Detects which package manager (bun, pnpm, yarn, npm) is used based on the current working directory. Features Support p

Sep 3, 2022

A NodeJS package for voice channel interactions on Revolt. This package lets you join voice channels, play music and more!

Revoice.js - A Voice Module for Revolt This package is still in developement and lacks many features. You still are able to play sound to a voice chan

Dec 25, 2022

An NPM package to help frontend developers get started with using SASS and SCSS on your project easily. The Package follows the 7-1 architecture project structure.

Project Title - Create SASS APP Ever wanted to code up a frontend project with SASS & SCSS and you are stuck with building the acclaimed 7-1 architect

Sep 22, 2022

This package is for developers to be able to easily integrate bad word checking into their projects.\r This package can return bad words in array or regular expression (regex) form.

Vietnamese Bad Words This package is for developers to be able to easily integrate bad word checking into their projects. This package can return bad

Nov 3, 2022

Multi-platform node package bundle to a package.json.

dmpc Multi-platform node package bundle to a package.json. install ### npm mode npm i -g @kingsword/dmpc ### yarn mode yarn global add @kingsword/dmp

Oct 16, 2022

A document head manager for React

A document head manager for React

React Helmet This reusable React component will manage all of your changes to the document head. Helmet takes plain HTML tags and outputs plain HTML t

Dec 30, 2022

The state manager ☄️

The state manager ☄️

☄️ effector The state manager Table of Contents Introduction Effector follows five basic principles: Installation Documentation Packages Articles Comm

Jan 9, 2023

Asyncronous JavaScript loader and dependency manager

$script.js - Async JavaScript loader & dependency manager $script.js is an asynchronous JavaScript loader and dependency manager with an astonishingly

Jan 3, 2023

Modular Redis connection and PUBSUB subscription manager for node. Easily extendable. Built for performance, powered by ioredis.

RediBox Redis connection and PUBSUB subscription manager for node. Built for performance, powered by ioredis (for now). Maintained by TeamFA. What is

Dec 15, 2022

WinBox is a professional HTML5 window manager for the web: lightweight, outstanding performance, no dependencies, fully customizable, open source!

WinBox is a professional HTML5 window manager for the web: lightweight, outstanding performance, no dependencies, fully customizable, open source!

WinBox is a professional HTML5 window manager for the web: lightweight, outstanding performance, no dependencies, fully customizable, open source!

Jan 3, 2023
Owner
Nathan Ginnever
Nathan Ginnever
📦🚀 Fast, disk space efficient package manager

中文 | Español Fast, disk space efficient package manager: Fast. Up to 2x faster than the alternatives (see benchmark). Efficient. Files inside node_mod

pnpm 21.2k Jan 3, 2023
frontend package manager and build tool for modular web applications

THIS PROJECT IS DEPRECATED Component is not maintained anymore. See here #639 for more information. You can still use the component registry on compon

Component 4.6k Dec 30, 2022
A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Duo 3.4k Dec 28, 2022
JavaScript package manager - using a browser-focused and RequireJS compatible repository

****NOTE: this project is no longer active and not recommended for use. It is left here for reference. **** Jam was created at a time before Bower and

Caolan McMahon 1.5k Dec 10, 2022
Brand new static package manager.

spm Brand new static package manager for browser. spm 从 3.9 开始将不再管理组件的生命周期, 即不再有 spmjs.io. 所以相应的逻辑全部去除. 请使用 npm 来管理组件. Install $ npm install spm -g Us

Static Package Manager 907 Sep 24, 2022
Interplanetary Database: A Database built on top of IPFS and made immutable using Ethereum blockchain.

IPDB IPDB (Interplanetary Database) is a key/value store database built on top of IPFS (Interplanetary File System). Project is intended to be an MVP

turinglabs 8 Oct 6, 2022
A devtool improve your pakage manager use experience no more care about what package manager is this repo use; one line, try all.

pi A devtool improve your pakage manager use experience no more care about what package manager is this repo use; one line, try all. Stargazers over t

tick 11 Nov 1, 2022
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
Meogic-tab-manager is an extensible, headless JavaScript tab manager framework.

MeogicTabManager English document MeogicTabManager是一个有可拓展性的、headless的JavaScript标签页管理框架。 MeogicTabManager旨在提供可自由组装页面框架、自定义页面组件、甚至覆盖框架自带事件响应的开发体验。 Meogi

meogic-tech 5 Oct 8, 2022
A package manager for the web

Bower - A package manager for the web ..psst! While Bower is maintained, we recommend yarn and webpack or parcel for new front-end projects! Bower off

Bower 15.1k Jan 1, 2023