Skip to content

Latest commit

 

History

History
89 lines (61 loc) · 1.51 KB

README.md

File metadata and controls

89 lines (61 loc) · 1.51 KB

cli-card

Cli card is a node.js project to show yout contact information directly on the cli.

Everyone can get your information just by running npx your-name on the cli!

screenshot

Installation

Clone this repo with

https://github.com/micheledinelli/cli-card.git

Set up

Edit card.js adding your contact information. You'll find a json object; add and modify key-value pairs as you like.

{
  "name": "<your-name>",
  "handle": "<your-handle>",
  "twitter": "https://twitter.com/your-twitter",
  "github": "https://github.com/your-github",
  "labelTwitter": "<twitter-label>",
  "labelGitHub": "<github-label>"
}

Run

  • In package.json modify cli-card with your desired entry command (aka handle)

    "bin": {
        "cli-card": "./card.js"
    },
  • Make card.js executable with

    chmod +x card.js
  • Link package locally with

    npm link

Warning

You may receive a npm error code EACCES.

Just run

sudo npm link
  • Finally run with

    npx command

    where command is your handle

Ship it

  • Login to npm using

    npm login
  • Publish with

    npm publish --access=public

Remember to configure package.json properly before publishing.

Acknowledgments

Thanks to this really simple tutorial for the idea and part of the code.