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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@santana-org/ui

v0.2.2

Published

Terminal UI primitives for the Santana Org ecosystem — spinners, tables, boxes, badges, and more

Readme

@santana-org/ui

npm license ESM

📦 Install

npm install @santana-org/ui
pnpm add @santana-org/ui

🚀 Quickstart

import { createSpinner, table, box, badge, createProgressBar } from "@santana-org/ui"

const spinner = createSpinner("Fetching data…")
spinner.start()
await fetchData()
spinner.succeed("Done!")

📖 API

Spinner

const spinner = createSpinner(message, options?)
spinner.start(message?)   // begin animating
spinner.update(message)   // update the label while running
spinner.succeed(message?) // ✓ green checkmark
spinner.fail(message?)    // ✗ red cross
spinner.stop()            // · neutral stop

| Option | Type | Default | Description | |---|---|---|---| | colorsEnabled | boolean | true | Force or disable ANSI colors | | stream | WriteStream | process.stderr | Output destination |

Table

table(rows, options?)

rows is string[][]. The first row is treated as a header by default.

| Option | Type | Default | Description | |---|---|---|---| | header | boolean | true | Style first row as a header | | colorsEnabled | boolean | true | Force or disable ANSI colors |

console.log(table([
  ["Name", "Version", "Size"],
  ["colors", "0.2.1", "18 kB"],
  ["logger", "0.2.2", "4 kB"],
]))
// ╭────────┬─────────┬───────╮
// │ Name   │ Version │ Size  │
// ├────────┼─────────┼───────┤
// │ colors │ 0.2.1   │ 18 kB │
// │ logger │ 0.2.2   │ 4 kB  │
// ╰────────┴─────────┴───────╯

Box

box(content, options?)

| Option | Type | Default | Description | |---|---|---|---| | title | string | — | Optional title in the top border | | width | number | 60 | Total box width | | padding | number | 1 | Horizontal inner padding | | colorsEnabled | boolean | true | Force or disable ANSI colors |

console.log(box(["Line one", "Line two"], { title: "Summary" }))
// ╭─ Summary ──────────────────────────────────────────────╮
// │                                                        │
// │ Line one                                               │
// │ Line two                                               │
// │                                                        │
// ╰────────────────────────────────────────────────────────╯

Badge

badge(text, options?)

| Option | Type | Default | Description | |---|---|---|---| | variant | BadgeVariant | "default" | Color scheme | | colorsEnabled | boolean | true | Force or disable ANSI colors |

Available variants: "default" "success" "warn" "error" "info" "muted" "accent"

badge("v1.2.3")              // [v1.2.3]  (cyan)
badge("DONE", { variant: "success" })  // [DONE]    (green)
badge("WARN", { variant: "warn" })     // [WARN]    (yellow)

Progress bar

const bar = createProgressBar(options?)
bar.update(value, total, label?)  // rewrite current line
bar.complete(label?)              // ✓ done line

| Option | Type | Default | Description | |---|---|---|---| | width | number | 30 | Bar fill width in characters | | filled | string | "█" | Filled segment character | | empty | string | "░" | Empty segment character | | colorsEnabled | boolean | true | Force or disable ANSI colors | | stream | WriteStream | process.stderr | Output destination |

const bar = createProgressBar()
for (let i = 0; i <= 100; i++) {
  bar.update(i, 100, "Uploading…")
  await sleep(20)
}
bar.complete("Upload done")

Status lines

statusSuccess("Built in 1.2s")               // ✓ Built in 1.2s
statusError("Build failed", { label: "tsc" }) // ✗ [tsc] Build failed
statusWarn("Peer dep missing")               // ⚠ Peer dep missing
statusInfo("Listening on :3000")             // ◆ Listening on :3000
statusMuted("Skipping unchanged files")      // · Skipping unchanged files
statusStep(2, 5, "Installing deps")          // [2/5] Installing deps

All accept { colorsEnabled?, label? } options.

Divider / section header

divider()                          // ────────────────────────────────────────────────────────────
divider("Results", { width: 40 }) // ────────── Results ──────────
sectionHeader("Configuration")    // ┌ Configuration

Brand banner

brandBanner({
  title: "my-cli",
  version: "1.2.3",
  tagline: "The fast build tool",
  badge: "beta",
})
╭──────────────────────────────────────────────────────────╮
│                                                          │
│  my-cli  v1.2.3                                          │
│  The fast build tool  [ beta ]                           │
│                                                          │
╰──────────────────────────────────────────────────────────╯
inlineBrand("my-cli") // ◆ my-cli

🏗️ Design decisions

  • TTY-aware. All components respect colorsEnabled — pass false or detect process.stdout.isTTY to get clean plain-text output in CI or piped contexts.
  • No global state. Every primitive is created fresh via a factory function — safe to use concurrently.
  • Stream-injectable. Spinners and progress bars write to process.stderr by default and accept any WriteStream — making them easy to test or redirect.
  • ESM-first. CJS interop included, but the package is written for modern runtimes.

📄 License

MIT © santana-org — contributions are welcome, see CONTRIBUTING.