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

inkr-core

v0.1.4

Published

CLI colorizing tool for styled terminal output

Readme

inkr-core

inkr-core is a zero-dependency, TypeScript-first library for richly stylized, colourized terminal output. Designed for clarity, flexibility, and performance.

Features

  • Advanced colour support: 16-colour, 256-colour (ANSI), and true RGB.
  • Foreground and background styling, including custom RGB arrays.
  • Text weights (bold, dim) and underline styles (single, double).
  • Intuitive, chainable API for style composition.
  • Automatic terminal colour detection.
  • Reusable, themeable style definitions.
  • Pure TypeScript with no external dependencies.

Installation

npm install inkr-core

Usage

import inkr from "inkr";

// Simple usage
console.log(inkr.style().colour("red").text("Red text"));

// Background and combined styles
console.log(
  inkr
    .style()
    .colour("white")
    .bgColour("blue")
    .weight("bold")
    .underline("single")
    .text("Styled text")
);

// RGB colours
console.log(inkr.style().colour([255, 128, 0]).text("Orange RGB text"));

Reusable Theme-Based Styles

const error = inkr.style().colour("red").weight("bold");
console.log(error.text("Error: Operation failed"));

// another way
const success = inkr
  .configure({
    colour: "green",
    weight: "bold",
  })
  .style();
console.log(success.text("Server is running on port:8000"));

Chained Outputs

console.log(
  inkr.style().colour("red").text("Error: ") +
    inkr.style().colour("yellow").text("Details here.")
);

API Summary

| Method | Function | | :----------------- | :------------------------------------------------ | | style() | Start a new style chain | | colour(value) | Set text colour (name or [r,g,b] array) | | bgColour(value) | Set background colour (name or [r,g,b] array) | | weight(value) | Set text weight: 'bold', 'dim', 'normal' | | underline(value) | Apply underline: 'single', 'double', 'none' | | text(content) | Apply styles to a string |

inkr-core ensures beautiful output, adapts to your terminal, and keeps your CLI code elegant.

Supportibility

  • node >= 18
  • Compatible with terminal colours & Browser Developer Console(ANSI)

License: MIT