npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wirelineio/registry-cli

v0.1.23

Published

Wireline CLI.

Downloads

5

Readme

registry-cli

Installation

npm install -g @wirelineio/registry-cli

Local installation for development

Local registry-client repo (optional)

cd registry-client
yarn && yarn build
yarn link

Installation

git clone [email protected]:wirelineio/registry-cli.git
cd registry-cli

yarn link "@wirelineio/registry-client" # Optional.

yarn install

Bash Alias

A bash alias can be created to run the CLI from source but appear like a global install.

$ cat ~/.bash_aliases
alias registry-cli='babel-node ~/projects/wireline/registry-cli/src/main.js'
$ source ~/.bash_aliases

Registry operations

Generate key from mnemonic:

registry-cli keys generate --mnemonic="chimney mistake fetch basic secret agent orphan joy game comfort estate current between easy inherit carbon clarify follow duty stomach board father strategy cruise"

Mnemonic:  chimney mistake fetch basic secret agent orphan joy game comfort estate current between easy inherit carbon clarify follow duty stomach board father strategy cruise
Private key:  1dd3de39e732c8347761939b3de723a88caf8d048d55a47bac053899750eb787
Public key:  036a5ec23f82921f2107212922f16e4e99faf190a9e0b1d92e4143fd4f0c0b69a5
Address:  cosmos10cvwtpvr4rydad7wpefd504hrldz346rm55ck4

Generate new key:

registry-cli keys generate

Mnemonic:  traffic noise step remember blush airport uncover patient cloud pencil social ghost
Private key:  31c90b358117ea94bb45f1e6bbef7dc5bb20b6cb39f71790dd510a2190fe222b
Public key:  0212c222e5e40e77ccb20cf8b64ef3f8cf744ac000412673b8f56d0a6eebf40038
Address:  cosmos1sgdt4t6eq6thsewcpe2v9cu6c9ru837w7pj9lm

Fund new account:

./scripts/faucet.sh -a cosmos1sgdt4t6eq6thsewcpe2v9cu6c9ru837w7pj9lm -f alice

Make sure account exists now:

registry-cli registry get-account --address="cosmos1sgdt4t6eq6thsewcpe2v9cu6c9ru837w7pj9lm"

[
    {
        "address": "cosmos1sgdt4t6eq6thsewcpe2v9cu6c9ru837w7pj9lm",
        "pubKey": "61rphyECEsIi5eQOd8yyDPi2TvP4z3RKwABBJnO49W0Kbuv0ADg=",
        "number": "2",
        "sequence": "10",
        "balance": [
            {
                "type": "wire",
                "amount": "995"
            }
        ]
    }
]

Create service.yml:

# service.yml
record:
  id: wrn:record:05013527-30ef-4aee-85d5-a71e1722f255
  type: wrn:registry-type:service
  attributes:
    label: Weather

Publish record:

registry-cli registry publish --payloadKey="31c90b358117ea94bb45f1e6bbef7dc5bb20b6cb39f71790dd510a2190fe222b" --filename="service.yml"

{ submit:
   '41A93FE1875CED5E688FD91867719E25BC76DF61DE66C59E6486D69972D1ADED' }

Delete record:

registry-cli registry delete --payloadKey="31c90b358117ea94bb45f1e6bbef7dc5bb20b6cb39f71790dd510a2190fe222b" --filename="service.yml"

{ submit:
   '71C19ECA5CFE93751509B4C82025025303D1ACEEDFB6EE9B56DCA42D91D94DF7' }

Note: in publish/delete operations both message and transaction would be signed by payloadKey. You could provide separate option --txKey to sign transaction with different key.

Get record:

registry-cli registry get-record --id="wrn:record:05013527-30ef-4aee-85d5-a71e1722f255"

[
    {
        "id": "wrn:record:05013527-30ef-4aee-85d5-a71e1722f255",
        "type": "wrn:registry-type:service",
        "owner": "a357a9a9b966f4939d75c62833583d55a4a845d1",
        "attributes": {
            "label": "Weather"
        }
    }
]

List records:

registry-cli registry list-records

{
        "id": "wrn:record:05013527-30ef-4aee-85d5-a71e1722f255",
        "type": "wrn:registry-type:service",
        "owner": "a357a9a9b966f4939d75c62833583d55a4a845d1",
        "attributes": {
            "label": "Weather"
        }
    }
]

Get bot:

registry-cli registry get-bot --name="TestBot" --tag="edcon-demo"

[
    {
        "name": "TestBot",
        "accessKey": "35292b64121dffa7e290f997392309afdefa81c38104805601a6bee7a796a6aa",
        "record": {
            "id": "wrn:record:wireline.io/bot/test-bot",
            "type": "wrn:registry-type:bot",
            "owner": "ef554582c8203342f86e4b93bc5891ea3b65cb8c",
            "attributes": {
                "name": "TestBot",
                "tag": "edcon-demo",
                "accessKey": "35292b64121dffa7e290f997392309afdefa81c38104805601a6bee7a796a6aa"
            }
        }
    }
]

List bots:

registry-cli registry list-bots
[
    {
        "name": "TestBot",
        "accessKey": "35292b64121dffa7e290f997392309afdefa81c38104805601a6bee7a796a6aa",
        "record": {
            "id": "wrn:record:wireline.io/bot/test-bot",
            "type": "wrn:registry-type:bot",
            "owner": "ef554582c8203342f86e4b93bc5891ea3b65cb8c",
            "attributes": {
                "tag": "edcon-demo",
                "accessKey": "35292b64121dffa7e290f997392309afdefa81c38104805601a6bee7a796a6aa",
                "name": "TestBot"
            }
        }
    }
]