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

@portosaur/logger

v0.12.2

Published

A lightweight, Docusaurus-compatible logging library similar to Docusaurus, with some extras.

Readme

@portosaur/logger

A lightweight, Docusaurus-compatible logging library enhanced with semantic levels, flexible alignment.

Designed to provide the familiar Docusaurus terminal experience to any CLI project, while adding essential utilities like consola-powered boxes and custom tip/note levels.

Install

bun add @portosaur/logger

# or
npm install @portosaur/logger

Usage

import logger, { colors } from "@portosaur/logger";

// Inline log
logger.info("Starting setup...");
logger.success("Build complete!");
logger.warn("Dependency outdated");
logger.error("Build failed");
logger.tip("Run dev to preview");
logger.note("Remember to commit");

// Debug — only shown when DEBUG=1 or VERBOSE=1
logger.debug("Resolved config: /home/user/config.yml");

// Box — color pre-applied per level, CI-safe
logger.success.box("Build complete!", { title: "Result" });
logger.warn.box("Outdated dependency found", { title: "Warning" });
logger.note.box("Project initialized", { title: "Next Steps" });

// Start — helper that resets view and logs info
logger.start("Bootstrapping project...");

// Semantic colors
console.log(colors.command("porto dev"));
console.log(colors.url("https://example.com"));
console.log(colors.muted("(optional)"));

Log Levels

Every level is a LevelFn:

interface LevelFn {
  (msg: string): void;
  box(msg: string, options?: BoxOptions): void;
}

interface BoxOptions {
  title?: string;
  padding?: number;
  border?: "rounded" | "single" | "double" | "none";
}

| Level | Label | Notes | | :-------- | :---------- | :--------------------------------------- | | info | [INFO] | Standard informational message | | success | [SUCCESS] | Operation completed successfully | | warn | [WARNING] | Non-fatal warning | | error | [ERROR] | Error message | | debug | [INFO] | Only shown when DEBUG=1 or VERBOSE=1 | | tip | [TIP] | Magenta colored label | | note | [NOTE] | Gray colored label |

Utilities

  • logger.start(msg): A specialized helper that calls logger.resetView() and then logger.info(msg). Ideal for initiating a new process.
  • logger.resetView(): Clears the console and resets cursor position.
  • logger.clear(): A standard console clear (no-op in test environments).

.box() on any level automatically degrades to an inline log when CI=true.

Colors

import { colors } from "@portosaur/logger";

colors.bold("text");
colors.command("porto dev"); // cyan bold — shell commands
colors.url("https://..."); // cyan underline
colors.muted("(optional)"); // gray — hints
colors.heading("Result"); // yellow — titles
colors.label("Name"); // white bold — field labels

Standard chalk colors (red, green, blue, etc.) and modifiers (bold, dim, italic, etc.) are also available.

License

GPL-3.0-only