1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-25 15:08:45 +08:00

feat(init) display peer id in init command

use case:

Just configured and installed a node.

benefits:

1) reduces friction when setting up a new node

2) reveals useful details about the workings of the system. It's the
user's first encounter with her node's identity. The tour can build on
the user's knowledge.

```
ipfs (maybebtc-november) λ. ipfs init -f
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair
peer identity: QmcRbn41Vc2CvbpLYfN36mAWusErKWvAAHbq92LPra2gFT
```
This commit is contained in:
Brian Tiger Chow
2014-11-03 22:44:31 -08:00
parent e6ee19ed92
commit 67bc9cc89d

View File

@ -125,6 +125,7 @@ func initCmd(c *commander.Command, inp []string) error {
return err
}
cfg.Identity.PeerID = id.Pretty()
u.POut("peer identity: %s\n", id.Pretty())
// Use these hardcoded bootstrap peers for now.
cfg.Bootstrap = []*config.BootstrapPeer{