Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
feat: add cid command
Browse files Browse the repository at this point in the history
This PR adds a `jsipfs cid` command with tools for formatting, converting and discovering properties of CIDs.

All the docs are here: https://github.com/ipfs-shipyard/js-cid-tool
Will resolve this for JS: ipfs/kubo#5229
go-ipfs counterpart: ipfs/kubo#5385

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
  • Loading branch information
alanshaw committed Sep 13, 2018
1 parent 2790e6d commit af8df88
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"boom": "^7.2.0",
"bs58": "^4.0.1",
"byteman": "^1.3.5",
"cid-tool": "^0.1.0",
"cids": "~0.5.3",
"debug": "^3.1.0",
"err-code": "^1.1.2",
Expand Down
21 changes: 21 additions & 0 deletions src/cli/commands/cid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict'

const path = require('path')

const cidCommandsPath = path.join(
__dirname, '..', '..', '..', 'node_modules', 'cid-tool', 'src', 'cli', 'commands'
)

module.exports = {
command: 'cid <command>',

description: 'Convert, format and discover properties of CIDs.',

builder (yargs) {
return yargs
.commandDir(cidCommandsPath)
},

handler (argv) {
}
}

0 comments on commit af8df88

Please sign in to comment.