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

@indiekitai/glamour

v0.1.0

Published

Stylesheet-based markdown rendering for terminals - port of charmbracelet/glamour

Readme

@indiekitai/glamour

Stylesheet-based markdown rendering for terminals. A TypeScript port of charmbracelet/glamour.

Features

  • 🎨 Built-in themes — Dark, Light, ASCII, Pink, Dracula, Tokyo Night, NoTTY
  • 📝 Markdown rendering — Headings, bold, italic, code, lists, tables, links, images, blockquotes
  • 📏 Word wrapping — Automatic word wrap to terminal width
  • 🎭 Custom styles — Full stylesheet-based customization via JSON or objects
  • 🔧 MCP Server — Model Context Protocol integration
  • 🖥️ CLInpx @indiekitai/glamour README.md
  • 📦 Zero native deps — Pure TypeScript, uses marked for parsing

Installation

npm install @indiekitai/glamour

Quick Start

import { render } from '@indiekitai/glamour';

// Render with auto-detected style
console.log(render('# Hello World\n\nThis is **glamour**!'));

// Render with a specific style
console.log(render('# Hello', 'dark'));
console.log(render('# Hello', 'dracula'));
console.log(render('# Hello', 'ascii'));

API

render(markdown, style?)

Quick render function. Style can be a name ('dark', 'light', 'ascii', etc.) or a StyleConfig object.

import { render } from '@indiekitai/glamour';
console.log(render('**bold** and *italic*', 'dark'));

new TermRenderer(options?)

Create a reusable renderer with full configuration.

import { TermRenderer } from '@indiekitai/glamour';

const renderer = new TermRenderer({
  style: 'dark',      // or 'light', 'ascii', 'pink', 'dracula', 'tokyo-night', StyleConfig
  wordWrap: 100,       // default: 80
  baseURL: 'https://github.com/user/repo',
  preserveNewLines: true,
});

console.log(renderer.render('# Title\n\nBody text'));

renderWithEnvironmentConfig(markdown)

Renders using the GLAMOUR_STYLE environment variable (falls back to 'auto').

import { renderWithEnvironmentConfig } from '@indiekitai/glamour';
// Set GLAMOUR_STYLE=dark in your environment
console.log(renderWithEnvironmentConfig('# Hello'));

Built-in Styles

| Style | Description | |-------|-------------| | auto | Auto-detect (dark if TTY, notty otherwise) | | dark | Dark terminal theme with colors | | light | Light terminal theme | | ascii | ASCII-only, no ANSI colors | | notty | For non-TTY output (same as ascii) | | pink | Pink accent theme | | dracula | Dracula color scheme | | tokyo-night | Tokyo Night color scheme |

Custom Styles

import { TermRenderer, type StyleConfig } from '@indiekitai/glamour';

const myStyle: StyleConfig = {
  document: { margin: 4, color: '#FFFFFF' },
  heading: { bold: true, color: '#FF6B6B', blockSuffix: '\n' },
  h1: { prefix: '🚀 ' },
  strong: { bold: true, color: '#FFD700' },
  code: { prefix: ' ', suffix: ' ', color: '#50FA7B', backgroundColor: '#282A36' },
  link: { color: '#8BE9FD', underline: true },
};

const r = new TermRenderer({ style: myStyle });
console.log(r.render('# My Doc\n\n**Important** info'));

CLI

# Render a file
npx @indiekitai/glamour README.md

# Pipe from stdin
cat README.md | npx @indiekitai/glamour

# Choose a style
npx @indiekitai/glamour --style dracula README.md

# Set width
npx @indiekitai/glamour --width 60 README.md

# JSON output
npx @indiekitai/glamour --json README.md

MCP Server

Start the MCP server for AI agent integration:

node dist/mcp.js

Available tools:

  • render_markdown — Render markdown with a chosen style
  • render_plain — Render with ASCII-only style
  • list_styles — List available styles

Utilities

import { stripAnsi, visibleWidth, wordwrap, indentText, padText } from '@indiekitai/glamour';

stripAnsi('\x1b[1mBold\x1b[0m');  // 'Bold'
visibleWidth('\x1b[1mHello\x1b[0m');  // 5
wordwrap('long text here', 10);
indentText('line1\nline2', 2);  // '  line1\n  line2'

License

MIT

Credits

TypeScript port of charmbracelet/glamour by IndieKit AI.