DEV Community


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:

Enter fullscreen mode Exit fullscreen mode

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

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)

manuelcv1 profile image

Cool !