Giter Club home page Giter Club logo

ipld-explorer-cli's Introduction

ipld-explorer-cli

Build Status dependencies Status JavaScript Style Guide

Explore the IPLD directed acyclic graph with your keyboard

screen shot 2018-04-18 at 16 30 40

Install

Ensure you have at least:

Install the explorer:

npm install --global ipld-explorer-cli

Start your Go/JS IPFS daemon:

ipfs daemon
# or
jsipfs daemon

Usage

$ ipld-explorer

Welcome to the IPLD explorer REPL!
Type "help" then <Enter> for a list of commands

? >

If you use JS-IPFS, make sure you set the apiAddr accordingly:

? > config set apiAddr /ip4/127.0.0.1/tcp/5002

Commands

cd [path] (alias get)

Change DAG. Changes the current working DAG node to the specified path. If the path is starts with /ipfs or is a CID then change to that path otherwise path is taken to be relative to the current working DAG path.

pwd

Print working DAG. Prints the path of the current working DAG.

resolve [path]

Walk down the provided path and print the object found there. path defaults to CWD (current working DAG) if not specified.

ls [path]

List the entries at a path. path defaults to CWD (current working DAG) if not specified.

config set <key> <value>

Set a config value.

Configuration

The following configuration keys are valid:

  • apiAddr - The multiaddr of the IPFS node to use (default: /ip4/127.0.0.1/tcp/5001)

config get [key]

Get a config value or get all config if no key is provided.

help

Print the help information.

version

Prints the version of the ipld-explorer.

exit

Quit the explorer.

Contribute

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

License

MIT ยฉ Alan Shaw

ipld-explorer-cli's People

Contributors

alanshaw avatar olizilla avatar vmx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ipld-explorer-cli's Issues

Add units to small file sizes in resolve

The ls and resolve commands shows my .pinset entry as having a size of 60. Let's force it to add units in all cases.

? > ls
.       2.4G  QmSc9pcnm4N1QC1u2oSNL6eRgFjxDq2Aex6cGhTkvw91xc
.pinset 60    QmYJmoKWDFh1wmZLATh3fiVzMuhhTyNm9NLGuLEJM7HdNZ
dapps   17.5M QmQN6bA5YEPEaPDUDLq6o9fm24Ye2bbnA4YUT2rBeAR5cm
foo     2.4G  QmPkNdFzNFZfM9QixL3ZowBNvveFmufbnRuM36K1SrnmB1

Current DAG is not updated if MFS root changes

When you start the explorer, it gets the CID of your MFS root and uses it as your "current working DAG". However if you change things in your MFS then that root CID will change and you'll be looking at out of date data.

I think the explorer should detect this by default and auto switch to the new CID, with a config option to turn it off.

Support large DAGs

There are CIDs out there that are too large for ipld-explorer to work with

$ ipld-explorer
? > cd zdpuAqN6LUsggXfSWDhAzmnLAkWFztsR1w1QhKr7mBp2wfBMK
โœ– Source is too large

but ipfs dag get works on them, so we could show some info about them

$ ipfs dag get zdpuAqN6LUsggXfSWDhAzmnLAkWFztsR1w1QhKr7mBp2wfBMK
{"0":{"/":"zdpuAmom34jdkZ8cYWowodaA9Lx7NTKbFkDXaQjhdhDaSCm8L"},"1":{"/":"zdpuB1Eb3qmesCB1pnFf5mgtuy9TXenov8dBHJCK2SdugAsWd"},"10":{"/":"zdpuAriYPSrxsxFFeiJ8egm9Esaica12AQBssX1S3aSmqRkh3"},"100":...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.