Skip to content

alanshaw/iim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

iim

https://youtu.be/C7A3-ycCRWU

codecov CI

IPFS install manager

Install

$ npm i -g iim

Note: Windows not yet supported!

Usage

Example - Use the latest version of Kubo

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

$ ipfs version
kubo version: 0.24.0

Example - Use Kubo at version 0.23.0

$ iim use kubo 0.23
βœ” selected kubo version 0.23.0
βœ” installed kubo 0.23.0
βœ” installed binary at /Users/alan/.iim/dists/kubo@0.23.0/ipfs
βœ” initialized IPFS at /Users/alan/.iim/kubo@0.23.0
βœ” configured IPFS
βœ” symlinked /Users/alan/.iim/dists/kubo@0.23.0/ipfs -> /Users/alan/.iim/dists/current
βœ” symlinked /Users/alan/.iim/dists/kubo@0.23.0/ipfs -> /usr/local/bin/ipfs
πŸš€ IPFS is ready to use

$ ipfs version
kubo version: 0.23.0

How does it work?

A new repo is created and used for each implementation/version combination at ~/.iim/kubo@0.24.0, for example.

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

IPFS is installed to ~/.iim/dists/kubo@0.24.0/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 kubo
βœ” selected kubo version 0.4.18
βœ” installed kubo 0.4.18
βœ” installed binary at /home/dave/.iim/dists/kubo@0.4.18/ipfs
βœ” initialized IPFS at /home/dave/.iim/kubo@0.4.18
βœ” symlinked /home/dave/.iim/dists/kubo@0.4.18/ipfs -> /home/dave/.iim/dists/current
βœ– failed to symlink /home/dave/.iim/dists/kubo@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.

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

License

MIT Β© Alan Shaw