DEV Community

lguaregua
lguaregua

Posted on

PaceTrace โณ: A Lightweight Progress Bar CLI Library

Hey there, fellow code enthusiasts! ๐Ÿ–๏ธ

Ever found yourself staring at the screen, waiting for an endless script to finish or a gigantic file to upload? ๐Ÿ˜“ Well, I've been there, done that. After some sleepless nights of coding and tons of coffee โ˜•, I'm proud to present: PaceTrace, a progress bar library for Node.js that's as customizable as it is user-friendly!

๐ŸŒŸ Here's What PaceTrace Can Do ๐ŸŒŸ

So, why should PaceTrace be your new darling in the vast sea of progress bar libraries? ๐ŸŒŠ Let's dive in:

  • Make it your own: With PaceTrace, you choose your progress bar's length and appearance. Stick with the trusty '=' or '#', go for a sleek 'โ–ˆ', or add some fun with 'โฃฟ', 'โ˜…', 'โ™ฅ', or even a character of your own choosing! ๐ŸŒˆ

  • Pick a side... or the middle: Left? Right? Center? Your progress bar, your call! ๐ŸŽฏ

  • Show or hide the progress percentage: It's your choice whether to display the progress percentage or keep it hidden. ๐Ÿ•ต๏ธ

  • Play with the format: PaceTrace lets you set your progress bar format. You can use placeholders for the bar, percentage, current value, and total value. ๐Ÿ› ๏ธ

  • Automatic stop and clear: Configure PaceTrace to pause the progress bar automatically when it's done, or even wipe the console clean. ๐Ÿงน

  • Cursor visibility: If you prefer not having the console cursor showing while the progress bar is active, simply hide it. ๐Ÿญ

๐Ÿ“ฆ Installation: A Walk in the Park ๐ŸŒณ

Getting PaceTrace on your system is a breeze. All it takes is a simple npm command:

npm install pace-trace
Enter fullscreen mode Exit fullscreen mode

For those of you using yarn, fear not! We've got you covered:

npm install pace-trace
Enter fullscreen mode Exit fullscreen mode

๐Ÿš€ How Do You Use PaceTrace? ๐Ÿš€

Getting PaceTrace up and running is as easy as pie ๐Ÿฅง. Just import it, create a new instance, and you're off to the races:

import PaceTrace from 'pacetrace';

const progress = new PaceTrace(100, { barStyle: 'star' });
Enter fullscreen mode Exit fullscreen mode

Then, increment or decrement the progress to your heart's content:

progress.increment(10);
progress.decrement(5);
Enter fullscreen mode Exit fullscreen mode

When you're ready to show off the progress bar, simply call the log method:

progress.log();
Enter fullscreen mode Exit fullscreen mode

๐Ÿ‘จโ€๐Ÿ’ป Behind the Scenes ๐Ÿ‘ฉโ€๐Ÿ’ป

PaceTrace is brought to life with TypeScript, promising type safety and providing Visual Studio Code users with top-notch IntelliSense support. And of course, we've got a suite of tests to ensure the library is as reliable as it gets, covering both main functionalities and those tricky edge cases. ๐Ÿ’ช

๐ŸŽˆ Wrapping Up ๐ŸŽˆ

In a nutshell, PaceTrace is here to jazz up your console output with a customizable progress bar. It's open-source and just an npm install away. So, what are you waiting for? Give it a whirl and drop a line to let me know your thoughts. Happy coding! ๐Ÿš€๐ŸŽ‰

๐Ÿค Let's Collaborate and Innovate Together ๐Ÿš€

PaceTrace is more than just a library; it's a testament to the power of open-source collaboration. Your insights, your creativity, and your passion can take it to new heights.

So, don't be a stranger! If you've got a great idea or a constructive critique, we're all ears. Feel free to open issues, submit pull requests, or just drop a ๐ŸŒŸ if you like what you see. After all, it's the thoughts and contributions from you, the amazing coding community, that keep the wheels of innovation turning.

Here's where the magic happens: PaceTrace on GitHub

Together, we can make PaceTrace an even more powerful tool for Node.js developers worldwide. Ready to jump in? Let's code a better tomorrow, one progress bar at a time! ๐Ÿ› ๏ธ๐ŸŒ๐ŸŽ‰

Top comments (1)

Collapse
 
manuelcv1 profile image
Manuel

Cool !