npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zolt

v1.1.0

Published

The CLI spinner that doesn't suck

Downloads

243

Readme

Zolt - The CLI Spinner That Doesn't Suck

Why Zolt?!

Look, we get it. You've used Ora and a thousand other spinners with a million dependencies. Do you really need half the npm registry installed just to show a couple of spinning dots? Zolt ⚡ is here to save you (and your poor hard drive).

  • 1KB of pure, unadulterated performance. Yep, just 1KB! Smaller than your average tweet.
  • CommonJS AND ESModules. We’re fancy like that.
  • No dependencies. That’s right, Zolt runs without dragging in 500 packages you’ll never care about.

So if you’re tired of bloated spinners that make you question why you even needed one in the first place, give Zolt a spin (pun intended).

Install

Let's face it, if you can't install Zolt, you probably shouldn't be spinning anything anyway. But here you go:

# Install via pnpm, because you're using the best package manager, right?
pnpm install zolt

Usage

It's almost embarrassingly easy to use Zolt. Here’s how:

CommonJS (because not everyone is cool enough for ESM):

const { Zolt } = require('zolt');

Zolt.start('dots', 'cyan', 'Loading...');
setTimeout(() => Zolt.stop(), 5000);

ESModules (because you’re modern and hip):

import { Zolt } from 'zolt';

Zolt.start('dots', 'green', 'Creating awesome stuff 🚀');
setTimeout(() => Zolt.stop(), 5000);

API

Zolt is simple, because you don’t need a PhD to understand a spinner.

Zolt.start([mode], [color], [text])

  • mode ('dots' | 'bars' | 'arrows' | 'bounce'): The style of the spinner. Because we know you want options.
  • color ('black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'brightBlack' | 'brightRed' | 'brightGreen' | 'brightYellow' | 'brightBlue' | 'brightMagenta' | 'brightCyan' | 'brightWhite'): Pick a color, any color! Or just leave it if you're too indecisive.
  • text (string): The optional text you want next to your spinner. Could be “Loading…” or your existential crisis, whatever suits the mood.

Zolt.stop([callback])

  • callback (function): Because we care about your code finishing gracefully, we allow you to run a callback when the spinner stops. Maybe log a "finished" message, or just reflect on how good you are at making spinners stop.

Why You'll Love Zolt

  1. Minimalism at its finest – No need to clutter your project with useless dependencies just to show some spinning dots.
  2. Compatible with your lifestyle – Whether you’re a CommonJS traditionalist or an ESModule futurist, Zolt doesn’t judge.
  3. Tiny, but mighty – 1KB of functionality. You’ve probably written longer commit messages.
  4. Dependability without dependencies – Zolt spins, stops, and keeps your terminal looking clean. That’s it. Simple, reliable, no drama.

Enjoy spinning, and remember, if your spinner has dependencies, it’s not Zolt.

License

This repository is licensed under the MIT License.