zolt
v1.1.0
Published
The CLI spinner that doesn't suck
Downloads
25
Maintainers
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
- Minimalism at its finest – No need to clutter your project with useless dependencies just to show some spinning dots.
- Compatible with your lifestyle – Whether you’re a CommonJS traditionalist or an ESModule futurist, Zolt doesn’t judge.
- Tiny, but mighty – 1KB of functionality. You’ve probably written longer commit messages.
- 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.