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

peek-preview

v1.0.0

Published

Smart file previewer for terminal — JSON pretty, CSV tables, markdown & code with line numbers. Cross-platform cat on steroids.

Readme

peek 👀 — cat on steroids

Smart file previewer for your terminal. JSON pretty • CSV tables • Markdown render • Code with line numbers. Works everywhere — especially on Windows where bat/jq don't exist.

npm node license

Why peek?

On Linux/Mac you have bat, jq, csvlook... On Windows you only have:

| Windows built-in | what it does | missing | |---|---|---| | type file.txt / Get-Content file.txt | dumps raw text | no colors, no truncation, chokes on big files | | more file.txt | paginated dump | no syntax highlight | | Get-Content -Head 20 / -Tail 20 | first/last N lines | manual, no auto-detect |

peek = one tool for all:

peek file.json              # pretty + colored
peek data.csv               # nice table, 20 rows + summary
peek README.md              # markdown rendered
peek app.js --lines 50      # code with line numbers + header
peek data.json --query users.0.name  # jq-lite
cat data.json | peek        # pipe support
peek ./src                  # directory listing

Install

# global (install once, use everywhere)
npm i -g peek-preview
peek README.md

# one-off without install — npx (recommended)
npx peek-preview README.md
npx peek-preview data.json --query users.0.name

# local development
git clone https://github.com/not0kkinex/peek
cd peek
npm install
npm link          # makes `peek` available globally for dev
peek examples/sample.json

Usage

Usage: peek [options] [file]

Options:
  -j, --json          force JSON mode
  -c, --csv           force CSV mode
  -m, --markdown      force markdown mode
  --raw               show raw markdown
  -n, --number        show line numbers
  --no-color          disable colors
  -l, --lines <n>     first N lines
  --head <n>          first N lines
  --tail <n>          last N lines
  -a, --all           disable 300-line truncation
  -q, --quiet         hide header/footer
  --query <path>      JSON dot query (users.0.name)
  --list              list supported types

Examples

JSON

peek examples/sample.json
# {
#   "users": [
#     { "id": 1, "name": "Ali", "role": "admin" }
#   ]
# }
# — object{2 keys} —
peek examples/sample.json --query users.0.name
# "Ali"

CSV

peek examples/sample.csv
# ┌─────────┬─────┬──────────┬───────────┐
# │ name    │ age │ city     │ role      │
# ├─────────┼─────┼──────────┼───────────┤
# │ Ali     │ 24  │ Istanbul │ developer │
# └─────────┴─────┴──────────┴───────────┘
# 4 rows × 4 cols

Markdown & Code

peek README.md
peek src/cli.js --tail 20
peek big.log --lines 100

Features

  • Auto-detect by extension (.json/.csv/.md/.js/.py etc), override with flags
  • Smart truncation: 300 lines max by default, hint to use --all
  • Binary check: skips \0 files
  • Directory mode: peek ./folder lists files with sizes
  • Stdin: cat file | peek, curl ... | peek --json
  • Cross-platform: Windows / macOS / Linux, no native deps

Comparison

| Tool | Windows built-in? | JSON | CSV | Markdown | Line numbers | |---|---|---|---|---|---| | type / Get-Content | ✅ | ❌ | ❌ | ❌ | ❌ | | bat | ❌ (needs install) | ✅ | ❌ | ✅ | ✅ | | jq | ❌ | ✅ | ❌ | ❌ | ❌ | | peek | ✅ (npm) | ✅ | ✅ | ✅ | ✅ |

Development

git clone https://github.com/not0kkinex/peek
cd peek
npm install
node src/cli.js examples/sample.json
npm test
npm pack --dry-run   # inspect package contents

Publish to npm (first time):

npm login
# package name must be available — peek-cli is taken, peek-preview is free
npm publish --access public
# now anyone can run:
npx peek-preview file.json

Run directly from GitHub without publishing:

npx github:not0kkinex/peek README.md

License

MIT