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

ts-quick-ref

v0.1.3

Published

Interactive CLI for JavaScript (MDN) and TypeScript documentation reference

Downloads

454

Readme

ts-quick-ref

Interactive CLI for JavaScript (MDN) and TypeScript documentation reference.

Quickly look up JavaScript APIs and TypeScript concepts directly from your terminal with offline caching and a beautiful interactive interface.

Installation

npm install -g ts-quick-ref

Or run directly with npx:

npx ts-quick-ref Array.map

Usage

Quick Lookup

# JavaScript (MDN) documentation
ts-quick-ref Array.map
ts-quick-ref Promise.all
ts-quick-ref Object.keys
ts-quick-ref fetch

# TypeScript documentation
ts-quick-ref generics
ts-quick-ref interfaces
ts-quick-ref utility
ts-quick-ref narrowing

Specify Source

# Force JavaScript/MDN source
ts-quick-ref --source js Array

# Force TypeScript source
ts-quick-ref --source ts generics
ts-quick-ref -s typescript mapped

Search

# Search across all documentation
ts-quick-ref search "array methods"
ts-quick-ref s "promise"

# Search specific source
ts-quick-ref search --source mdn "fetch api"
ts-quick-ref search --source ts "type guards"

# Limit results
ts-quick-ref search --limit 5 "string"

# Offline search (cached docs only)
ts-quick-ref search --offline "array"

Interactive Mode

Launch the interactive TUI for browsing documentation:

ts-quick-ref
ts-quick-ref -i
ts-quick-ref --interactive

Keyboard shortcuts:

  • Enter - Search / Select
  • ↑↓ - Navigate results
  • Esc - Go back
  • q - Quit

Cache Management

# View cache statistics
ts-quick-ref cache stats

# Pre-fetch common documentation for offline use
ts-quick-ref cache update

# Clear the cache
ts-quick-ref cache clear

Commands

| Command | Description | |---------|-------------| | ts-quick-ref <query> | Look up documentation for a topic | | ts-quick-ref search <query> | Search documentation | | ts-quick-ref cache <action> | Manage documentation cache |

Options

| Option | Description | |--------|-------------| | -s, --source <source> | Source to search: mdn, js, ts, typescript | | -r, --raw | Output raw markdown without terminal formatting | | -i, --interactive | Start interactive TUI mode | | -V, --version | Show version number | | -h, --help | Show help |

Supported Topics

JavaScript (MDN)

  • Global objects: Array, Object, String, Number, Promise, Map, Set, Date, RegExp, JSON, Math, Error
  • Array methods: Array.map, Array.filter, Array.reduce, Array.find, Array.forEach
  • Object methods: Object.keys, Object.values, Object.entries, Object.assign
  • Promise methods: Promise.all, Promise.race, Promise.allSettled
  • Statements: for, if, const, let, async, await, class, import, export
  • Operators: ... (spread), ?. (optional chaining), ?? (nullish coalescing)

TypeScript

  • Basics: types, basics, everyday-types
  • Type System: generics, interfaces, type, union, intersection
  • Narrowing: narrowing, type-guards, never
  • Advanced Types: keyof, typeof, conditional, mapped, template
  • Other: classes, modules, functions, objects, tuples

How It Works

  1. Hybrid Caching: Documentation is fetched from MDN and TypeScript sources, then cached locally in SQLite for fast offline access
  2. Smart Lookup: Searches use fuzzy matching to find the best results
  3. Terminal Rendering: Markdown is rendered with syntax highlighting for readability

Cache Location

Documentation is cached at:

  • Linux/macOS: ~/.ts-quick-ref/cache.db
  • Windows: %USERPROFILE%\.ts-quick-ref\cache.db

Cache expires after 7 days and is automatically refreshed on next lookup.

Requirements

  • Node.js >= 18.0.0

Attribution

This tool fetches and caches documentation from the following sources:

This project is not affiliated with Mozilla or Microsoft.

License

MIT