npx business card

npx business card
In this article, we'll explore the art of creating a professional business card using NPX, a powerful tool in the Node.js ecosystem. Learn how to showcase your skills and contact details in style, right from the command line. Follow along as we guide you through the process of setting up your own NPX business card, leveraging the magic of Node.js and the convenience of NPX. Elevate your developer identity with a sleek and efficient command-line business card that leaves a lasting impression.

Are you a developer looking to make a memorable impression in the tech world? Imagine having a sleek business card that not only showcases your skills but does so with a touch of command-line magic. In this guide, we'll walk you through the process of creating your very own business card using NPX, a powerful utility in the Node.js ecosystem.

Why NPX?

NPX is a tool that comes bundled with Node.js, allowing you to execute Node.js packages directly from the command line. It provides a convenient way to run packages without the need for global installs. Leveraging NPX for your business card means anyone can easily view your professional information with just a simple command.

Getting Started

we'll use the boxen,chalk library. Install it by running:

npm install boxen
npm install chalk

Let's kick things off by setting up the foundation of our business card. Create a new Node.js project and define your business card details in a JavaScript file. For instance, you might have a file named `business-card.mjs` with the following content:

#!/usr/bin/env node

import boxen from "boxen";
import chalk from "chalk";

const boxenOptions = {
  padding: 1,
  width: 54,
  title: "software engineer",
  titleAlignment: "center",
  borderStyle: "double",
  borderColor: "#ffb626",
};

const intro = chalk.bold(
  "Hello! I am ajay vishwakarma, an experienced Web Application Developer with a passion for crafting high-performance and scalable web applications. With a dedicated focus spanning over 4 years, I have honed my expertise in various technologies, ensuring robust solutions that stand the test of both functionality and efficiency.\n\n",
);

const links = [
  { name: chalk.hex("#fff").bgHex("#582be8")("Website"), url: "   https://www.ajayvishu.in/" },
  { name: chalk.hex("#fff").bgHex("#000")("DEV.to"), url: "    https://dev.to/ajayvishwakarma" },
  { name: chalk.hex("#fff").bgHex("#6e5494")("GitHub"), url: "    https://github.com/ajayvishu" },
];

const linkList = links.map((link) => `${link.name} ${link.url}`).join("\n");

console.log(boxen(intro + linkList, boxenOptions));

NPX Magic

With our business card script ready, it's time to turn it into an NPX executable. Update your `package.json` file to include the following:

// package.json
{
  "name": "ajay-business-card",
  "version": "1.0.4",
  "description": "ajay vishwakarma (@ajay)'s business card",
  "type": "module",
  "bin": {
    "ajay-business-card": "./bin/business-card.js"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/ajayvishu/ajay-business-card.git"
  },
  "keywords": [
    "cli",
    "tool",
    "business card",
    "npx",
  ],
  "author": "ajay vishwakarma",
  "license": "MIT",
  "dependencies": {
    "boxen": "^7.1.1",
    "chalk": "^5.3.0"
  }
}

Testing Your Business Card

Now, navigate to your project directory and run the following command:

npx ajay-business-card

Voila! Your professional business card is displayed right in the terminal. Impress your colleagues and collaborators with this unique and efficient way of sharing your professional information.

Conclusion

In this guide, we've explored the process of creating a professional business card using NPX and Node.js. By leveraging the power of the command line, you can present your skills and contact details in a memorable and efficient manner. Experiment with different designs, colors, and content to make your business card uniquely yours. Elevate your developer identity and leave a lasting impression with this innovative approach to networking in the tech industry.

Remember, your code speaks volumes, but a dash of CLI charm never hurt anyone. So go ahead, flaunt your tech prowess with a touch of NPX brilliance. 🔮✌️ May your bugs be few, and your networking be commandingly cool! 👾👋

Post a Comment

0 Comments