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

Commit b284571

Browse files
author
Alan Shaw
committed
feat: add cid command
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 <[email protected]>
1 parent 08f06b6 commit b284571

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"boom": "^7.2.0",
9393
"bs58": "^4.0.1",
9494
"byteman": "^1.3.5",
95+
"cid-tool": "^0.1.0",
9596
"cids": "~0.5.3",
9697
"debug": "^3.1.0",
9798
"err-code": "^1.1.2",

src/cli/commands/cid.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict'
2+
3+
const path = require('path')
4+
5+
const cidCommandsPath = path.join(
6+
__dirname, '..', '..', '..', 'node_modules', 'cid-tool', 'src', 'cli', 'commands'
7+
)
8+
9+
module.exports = {
10+
command: 'cid <command>',
11+
12+
description: 'Convert, format and discover properties of CIDs.',
13+
14+
builder (yargs) {
15+
return yargs
16+
.commandDir(cidCommandsPath)
17+
},
18+
19+
handler (argv) {
20+
}
21+
}

0 commit comments

Comments
 (0)