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

@peerapat.srs/toc

v1.1.2

Published

OpenShift-assisted local port-forward CLI with a Web UI

Downloads

1,257

Readme

@peerapat.srs/toc

OpenShift-assisted local port-forward CLI with a Web UI.

ช่วย oc login / เลือกโปรเจกต์ / เปิด oc port-forward ผ่าน UI บนเครื่องคุณ

npm: https://www.npmjs.com/package/@peerapat.srs/toc


เริ่มใช้งาน (ไทย)

ติดตั้ง

ต้องมี OpenShift CLI (oc) ใน PATH และ Node.js ≥ 20

oc version
npm i -g @peerapat.srs/toc
toc

macOS: brew install openshift-cli

ทางเลือกโดยไม่ติดตั้ง global:

npx @peerapat.srs/toc

หมายเหตุ: กล่อง Install บน npmjs.com แสดง npm i @peerapat.srs/toc (local) เสมอ — แก้ไม่ได้ผ่าน package.json สำหรับ CLI ให้ใช้ -g ตามด้านบน

รัน

toc
# หรือ
toc start

เปิดเบราว์เซอร์ที่ http://127.0.0.1:3847 อัตโนมัติ → login ด้วย credentials ของ OpenShift cluster

ไม่เปิดเบราว์เซอร์:

toc --no-open

เปลี่ยนพอร์ต:

toc -p 4000

What it is

toc starts a local HTTP server and opens a Web UI so you can:

  • Log in to an OpenShift cluster via real oc login
  • Browse projects / services / routes / secrets / configmaps
  • Start and manage local oc port-forward sessions

No mock auth by default — production path uses your installed oc.

Prerequisites

| Requirement | Notes | |---|---| | Node.js | >= 20 | | OpenShift CLI (oc) | Must be on PATH before install and use |

oc version

Install docs: Getting started with the OpenShift CLI

Skip the postinstall oc check (CI only):

TOC_SKIP_OC_CHECK=1 npm i -g @peerapat.srs/toc

Install

Primary (global — recommended for a CLI):

npm i -g @peerapat.srs/toc
toc

Alternative without a global install:

npx @peerapat.srs/toc

Note: The npmjs.com Install sidebar always shows local npm i @peerapat.srs/toc — that string is hardcoded by npm and cannot be changed via package.json. For this CLI, use -g as above.

Run

Binary name: toc

Default command is start (so plain toc is enough):

toc
toc start

Default bind: http://127.0.0.1:3847 — browser opens automatically.

Common flags

| Flag | Default | Description | |---|---|---| | -p, --port <number> | 3847 | Listen port | | --host <host> | 127.0.0.1 | Bind address | | --no-open | (opens browser) | Do not open the browser | | -V, --version | | Print version | | -h, --help | | Help |

Examples:

toc --no-open
toc -p 4000
toc --host 127.0.0.1 --port 4000 --no-open
toc start -p 3847

Typical flow

  1. Install oc and run npm i -g @peerapat.srs/toc
  2. Run toc
  3. In the UI, log in with cluster URL + username/password (oc login)
  4. Pick a project and start port-forwards as needed

Cluster profiles (URLs you logged into successfully) are stored at ~/.toc/clusters.json — passwords are not stored.

License

UNLICENSED