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!
Clone this repo with
https://github.com/micheledinelli/cli-card.git
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>"
}
-
In
package.json
modifycli-card
with your desired entry command (aka handle)"bin": { "cli-card": "./card.js" },
-
Make
card.js
executable withchmod +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
-
Login to npm using
npm login
-
Publish with
npm publish --access=public
Remember to configure package.json
properly before publishing.
Thanks to this really simple tutorial for the idea and part of the code.