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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cli-spinner-litex

v1.0.1

Published

Tiny, dependency-free CLI spinner for Node.js

Downloads

10

Readme

🌀 cli-spinner-litex

npm version npm downloads license

A tiny, dependency-free CLI spinner for Node.js — perfect for showing progress during async tasks, installs, or API calls.


🚀 Installation

npm install cli-spinner-litex

🧠 Usage Example

Use cli-spinner-litex to display a simple, animated spinner during any asynchronous process.

import Spinner from "cli-spinner-litex";

const spin = new Spinner("Fetching data...");
spin.start();

setTimeout(() => {
  spin.updateText("Still working...");
}, 2000);

setTimeout(() => {
  spin.stop("Completed successfully!");
}, 4000);

When you run this script in your terminal, the spinner will animate as your code runs:

○ Fetching data...
○ Still working...
✔ Completed successfully!

That’s it — no dependencies, just a clean visual indicator for your CLI tasks.


⚙️ API Reference

new Spinner(text?, frames?)

Creates a new spinner instance.

| Parameter | Type | Description | | --------- | ---------- | ------------------------------------- | | text | string | Message text shown beside the spinner | | frames | string[] | Custom animation frames (optional) |

.start([text])

Starts the spinner. Optionally updates the message.

.updateText(text)

Updates the displayed message while spinning.

.stop([message])

Stops the spinner and prints a success checkmark ().

.fail([message])

Stops the spinner and prints a failure cross ().

.setStyle(frames.pulse)

Switches the spinner style dynamically.


🎨 Spinner Styles

cli-spinner-litex includes a few built-in animation frame sets you can use:

import Spinner, { spinners } from "cli-spinner-litex";

const spin = new Spinner("Processing...", spinners.line);
spin.start();
setTimeout(() => spin.stop("Done!"), 2000);

Available presets:

export const spinners = {
  dots: ["⠋", "⠙", "⠸", "⠴", "⠦", "⠇"],
  line: ["-", "\\", "|", "/"],
  pulse: ["·", "●", "·", "○"],
};

🪶 Why cli-spinner-litex?

✅ Zero dependencies
✅ Works on macOS, Linux, and Windows
✅ Small (~55 lines of code)
✅ Customizable spinner frames
✅ Perfect for any CLI script or Node.js tool


📦 Example CLI Script

#!/usr/bin/env node
import Spinner from "cli-spinner-litex";

const spinner = new Spinner("Running heavy task...");
spinner.start();

setTimeout(() => {
  spinner.stop("Task completed!");
}, 3000);

Output:

○ Running heavy task...
✔ Task completed!

📄 License

MIT © 2025 Mohammed (DevMasud)


If you like this package

Give it a ⭐ on GitHub!

Connect

Follow me on X (Twitter) for updates and dev tips! 🚀