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

logluxe

v1.0.3

Published

Tiny, zero-dependency, TypeScript-first logging utility. Drop-in console.* replacement with beautiful colored logs.

Readme

🎨 Logluxe

Tiny, zero-dependency, TypeScript-first logging utility
"Install once, never think about logs again."

npm version bundle size docs TypeScript

A drop-in replacement for console.* with beautiful colored logs, smart defaults, and zero configuration required.

✨ Features

  • 🪶 Zero dependencies - Pure TypeScript
  • 📦 < 2KB minified - Tiny footprint
  • 🌳 Tree-shakable - Import only what you need
  • 🔷 TypeScript-first - Full type safety
  • 📦 ESM + CJS - Works everywhere
  • 🌍 Universal - Node.js, Browser, Deno, Bun
  • 🎨 Beautiful colors - ANSI in terminal, CSS in browser
  • 🔧 Zero config - Works out of the box

� Documentation

📖 Full Documentation: https://logluxe.vercel.app/

�📥 Installation

npm install logluxe
# or
yarn add logluxe
# or
pnpm add logluxe

🚀 Quick Start

Option 1: Drop-in Console Patch (Zero Changes)

// Just import this at the top of your entry file
import "logluxe/patch";

// Now all console methods are enhanced automatically!
console.log("Regular log");
console.info("Info message");    // ℹ Info message
console.warn("Warning!");        // ⚠ Warning!
console.error("Error!");         // ✖ Error!
console.debug("Debug info");     // ● Debug info

Option 2: Semantic Logger API

import log from "logluxe";

log.success("Build complete");   // ✔ Build complete
log.error("DB failed");          // ✖ DB failed
log.warn("Memory high");         // ⚠ Memory high
log.info("Server started");      // ℹ Server started
log.debug("Payload received");   // ● Payload received

📚 Full API

Semantic Logging

log.success("Operation completed");
log.error("Something went wrong");
log.warn("Deprecated feature used");
log.info("Server listening on :3000");
log.debug("Request payload:", data);

Manual Color Control

log.color("Custom text", "red");
log.color("HEX color", "#ff00ff");
log.color("RGB color", "rgb(0,255,0)");

Chainable Style Builder

log.paint("CRITICAL")
  .white()
  .bgRed()
  .bold()
  .underline()
  .print();

log.paint("Muted text")
  .gray()
  .dim()
  .italic()
  .print();

Available styles:

  • Colors: black(), red(), green(), yellow(), blue(), magenta(), cyan(), white(), gray()
  • Bright: brightRed(), brightGreen(), brightYellow(), brightBlue(), brightMagenta(), brightCyan(), brightWhite()
  • Backgrounds: bgBlack(), bgRed(), bgGreen(), bgYellow(), bgBlue(), bgMagenta(), bgCyan(), bgWhite()
  • Styles: bold(), dim(), italic(), underline(), inverse(), strikethrough()

Text Effects

log.gradient("Welcome to the app!");
log.rainbow("Hello World!");
log.neon("Server Online", "#00ff00");

Inline Color Tags

log.inline("[red]ERROR[/red] File not found");
log.inline("Status: [green]RUNNING[/green]");
log.inline("[cyan]User:[/cyan] [yellow]John[/yellow]");

Background & Highlight

log.bg("CRITICAL", "white", "red");
log.bg("SUCCESS", "black", "green");
log.highlight("User John logged in", "John", "cyan");

Environment-Aware Logging

log.dev("Only in development");    // Shows when NODE_ENV === 'development'
log.prod("Only in production");    // Shows when NODE_ENV === 'production'
log.once("key", "Printed once");   // Only prints the first time

Framework Aliases

log.react("Component mounted");    // ⚛️  Component mounted
log.server("API started");         // 🖥️  API started
log.client("Hydrated");            // 🌐 Hydrated

Performance Logger

// Synchronous
const result = log.perf("DB Query", () => runQuery());
// ⏱ DB Query took 42.3ms

// Async
const data = await log.perf("Fetch API", async () => fetchData());
// ⏱ Fetch API took 120.5ms

Log Grouping

log.group("User Signup");
log.info("Validate email");
log.info("Check username");
log.success("User created");
log.end();  // or log.groupEnd()

Smart Error Formatting

try {
  throw new Error("Database connection failed");
} catch (error) {
  log.error("API failed", error);
  // Automatically formats with:
  // - Error name and message
  // - Colored stack trace
  // - Additional error properties
}

Utilities

log.banner("My CLI Tool");     // Creates a boxed banner
log.previewColors();           // Shows all available colors
log.reset();                   // Reset all settings

⚙️ Configuration

import log from "logluxe";

// Disable colors
log.noColor();

// Mute all output
log.mute();
log.unmute();

// Change theme
log.setTheme("dark");     // 'default' | 'dark' | 'minimal' | 'neon'

// Configure options
log.configure({
  colors: true,           // Enable/disable colors
  icons: true,            // Show icons/emojis
  labels: false,          // Show level labels (INFO, WARN, etc.)
  theme: "default",       // Theme name
  level: "debug",         // Minimum log level
  timestamp: false,       // Show timestamps
});

// Add custom presets
log.addPreset("critical", {
  color: "white",
  bg: "red",
  bold: true,
  icon: "🔴"
});

🎨 Themes

Default

Balanced colors with icons, works great in most terminals.

Dark

Optimized for dark terminals with brighter colors.

Minimal

No icons, subtle colors, clean output.

Neon

Vibrant colors with bold styling for maximum visibility.

🌍 Environment Detection

Logluxe automatically detects:

  • Runtime: Node.js, Bun, Deno, Browser
  • TTY: Disables colors when not in a terminal
  • CI: Disables colors in CI environments
  • NO_COLOR: Respects the NO_COLOR environment variable
  • FORCE_COLOR: Forces colors when set

📦 Exports

// Default logger instance
import log from "logluxe";

// Create custom logger
import { createLogger } from "logluxe";
const myLog = createLogger({ theme: "neon" });

// Individual utilities
import {
  colorize,
  stripAnsi,
  formatError,
  gradientText,
  isBrowser,
  isDev,
} from "logluxe";

🔧 Advanced Usage

Create Multiple Logger Instances

import { createLogger } from "logluxe";

const apiLogger = createLogger({ 
  theme: "minimal",
  labels: true 
});

const debugLogger = createLogger({ 
  theme: "neon",
  level: "debug" 
});

Direct Style Functions

import { colorize, quickColor, quickBg } from "logluxe";

const redText = quickColor("Error!", "red");
const highlighted = quickBg("Important", "red", "white");

Restore Original Console

import "logluxe/patch";
import { unpatch } from "logluxe/patch";

// Later, if needed
unpatch();  // Restores original console methods

💡 Package Name Ideas

If logluxe is taken, here are alternatives:

  • @log/luxe
  • logcharm
  • konsole
  • logpaint
  • prettylogs
  • logcandy
  • chromalog
  • logflair
  • snaplog
  • logshine

📄 License

MIT © Your Name


Made with ❤️ for developers who love beautiful logs.