πŸ” IPFS install manager
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test/unit
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json

README.md

iim

Build Status dependencies Status JavaScript Style Guide

IPFS install manager

https://youtu.be/C7A3-ycCRWU

screenshot 2019-02-03 at 22 35 58

Install

npm install -g iim

Note: Windows not yet supported!

Usage

# Use the latest version of JS IPFS
$ iim use js
βœ” selected js-ipfs version 0.34.4
βœ” installed js-ipfs 0.34.4
βœ” installed binary at /Users/alan/.iim/dists/js-ipfs@0.34.4/ipfs
βœ” initialized IPFS at /Users/alan/.iim/js-ipfs@0.34.4
βœ” configured IPFS
βœ” symlinked /Users/alan/.iim/dists/js-ipfs@0.34.4/ipfs -> /Users/alan/.iim/dists/current
βœ” symlinked /Users/alan/.iim/dists/js-ipfs@0.34.4/ipfs -> /usr/local/bin/ipfs
πŸš€ IPFS is ready to use

$ ipfs version
js-ipfs version: 0.34.4

# Use JS IPFS at version 0.33
$ iim use js 0.33
βœ” selected js-ipfs version 0.33.1
βœ” installed js-ipfs 0.33.1
βœ” installed binary at /Users/alan/.iim/dists/js-ipfs@0.33.1/ipfs
βœ” initialized IPFS at /Users/alan/.iim/js-ipfs@0.33.1
βœ” configured IPFS
βœ” symlinked /Users/alan/.iim/dists/js-ipfs@0.33.1/ipfs -> /Users/alan/.iim/dists/current
βœ” symlinked /Users/alan/.iim/dists/js-ipfs@0.33.1/ipfs -> /usr/local/bin/ipfs
πŸš€ IPFS is ready to use

$ ipfs version
js-ipfs version: 0.33.1

# Use the latest version of Go IPFS
$ iim use go
βœ” selected go-ipfs version 0.4.18
βœ” installed go-ipfs 0.4.18
βœ” installed binary at /Users/alan/.iim/dists/go-ipfs@0.4.18/ipfs
βœ” initialized IPFS at /Users/alan/.iim/go-ipfs@0.4.18
βœ” symlinked /Users/alan/.iim/dists/go-ipfs@0.4.18/ipfs -> /Users/alan/.iim/dists/current
βœ” symlinked /Users/alan/.iim/dists/go-ipfs@0.4.18/ipfs -> /usr/local/bin/ipfs
πŸš€ IPFS is ready to use

$ ipfs version
ipfs version 0.4.18

# Use Go IPFS at version 0.4.18
$ iim use go 0.4.17
βœ” selected go-ipfs version 0.4.17
βœ” installed go-ipfs 0.4.17
βœ” installed binary at /Users/alan/.iim/dists/go-ipfs@0.4.17/ipfs
βœ” initialized IPFS at /Users/alan/.iim/go-ipfs@0.4.17
βœ” symlinked /Users/alan/.iim/dists/go-ipfs@0.4.17/ipfs -> /Users/alan/.iim/dists/current
βœ” symlinked /Users/alan/.iim/dists/go-ipfs@0.4.17/ipfs -> /usr/local/bin/ipfs
πŸš€ IPFS is ready to use

$ ipfs version
ipfs version 0.4.17

How does it work?

A new repo is created and used for each implementation/version combination at ~/.iim/js-ipfs@0.34.4, for example.

Adds a symlink at /usr/local/bin/ipfs that points to a script that runs IPFS with IPFS_PATH set to ~/.iim/js-ipfs@0.34.4.

IPFS is installed to ~/.iim/dists/js-ipfs@0.34.4/node_modules/ipfs or ~/.iim/dists/go-ipfs@0.4.18/node_modules/go-ipfs-dep for example.

Common issues

Failed to symlink

Looks like this:

$ iim use go
βœ” selected go-ipfs version 0.4.18
βœ” installed go-ipfs 0.4.18
βœ” installed binary at /home/dave/.iim/dists/go-ipfs@0.4.18/ipfs
βœ” initialized IPFS at /home/dave/.iim/go-ipfs@0.4.18
βœ” symlinked /home/dave/.iim/dists/go-ipfs@0.4.18/ipfs -> /home/dave/.iim/dists/current
βœ– failed to symlink /home/dave/.iim/dists/go-ipfs@0.4.18/ipfs -> /usr/local/bin/ipfs
πŸ’₯ failed to link binary at /usr/local/bin/ipfs, try running sudo iim link

Don't worry! Mostly everything worked fine - you just don't have permission to write to /usr/local/bin! Just run sudo iim link and it'll try again to create that symlink.

How to debug?

You can get some debug output using the DEBUG environment variable e.g.

$ DEBUG=iim* iim use js

Contribute

Feel free to dive in! Open an issue or submit PRs.

License

MIT Β© Alan Shaw