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

console-link

v1.1.1

Published

Development tool that streams client-side console.log messages to your server-side terminal via WebSocket.

Readme

🔗 console-link

Effortlessly stream client-side console.log messages to your server-side terminal via WebSocket. Debugging across environments has never been easier!
This is just a proof of concept and intended only for development purposes. Works only on localhost.

🚀 Features

  • Global override – Redirect all console methods (e.g., console.log, console.error) to the terminal without modifying your code.
  • Multiple integration options – Choose from three simple methods to integrate.
  • Real-time streaming – Logs are instantly sent from the client to the server.
  • Queueing – Ensures no logs are lost, even if the WebSocket connection isn't ready.

🛠️ Installation

npm install -g console-link

📖 Usage

In the terminal:

console-link
# Or run directly without preinstallation
npx console-link

On the client-side (choose one):

1. Node.js (e.g., React)

import 'console-link';

// Now all console messages will be forwarded to the server.

2. HTML

<script src="https://www.unpkg.com/console-link"></script>

3. Paste in DevTools

Simply copy the distributed code (available at https://www.unpkg.com/console-link) and paste it into your browser's DevTools console.

⚙️ Port Customization

Need to configure a specific port for your WebSocket server? Start by specifying the port directly when running the command:

console-link [PORT_NUMBER]

Replace [PORT_NUMBER] with any available port you need. For example:

console-link 2137

This starts the WebSocket server on port 2137. If you'd like to set a custom port interactively on the client side, simply use console-link/prompt instead of console-link. For example:

import 'console-link/prompt';

or include it in your HTML:

<script src="https://www.unpkg.com/console-link/dist/prompt.js"></script>

Note: Make sure to use the full URL (https://www.unpkg.com/console-link/dist/prompt.js) as the shorter link (https://www.unpkg.com/console-link/prompt) doesn't work.

🧠 How It Works

  1. The command in the terminal starts a WebSocket server.
  2. The client-side script establishes a WebSocket connection to the server and overrides window.console using a Proxy.
  3. Logs are serialized using flatted to handle circular references.
  4. The server listens for incoming messages and prints them to the terminal.

✨ Example

Client

console.log('App started');
console.warn('Something might be wrong');
console.error('An error occurred');

Terminal Output

> console-link is running on ws://localhost:5001
> console-link client connected
App started
Something might be wrong
An error occurred
> console-link client disconnected