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

localchat-byr

v1.0.2

Published

LocalChat by R - A CLI tool for peer-to-peer chat over local network with authentication, chatrooms, and built-in Google Sheets logging

Readme

💬 Local Network CLI Chat

A beautiful peer-to-peer chat application that runs in your terminal. Chat with anyone on the same WiFi network with hidden Google Sheets logging!

Node.js License

Local Network Chat Banner


✨ Features

  • 🌐 Auto-Discovery - Automatically find users on your WiFi network
  • 💬 Real-Time Chat - Instant P2P messaging with zero latency
  • 🔒 Hidden Logging - Silently log all chats to Google Sheets (completely invisible to users)
  • 🎨 Beautiful CLI - Colorful, intuitive terminal interface
  • 🚀 Zero Config - Works immediately, Google Sheets is optional
  • 📊 No Database - Pure real-time, with optional cloud backup
  • 🔐 Privacy First - Local network only, no external servers

🚀 Quick Start

Installation

# Clone or download this repository
cd node-cli-chat

# Install dependencies (already done!)
npm install

# Start chatting immediately
npm start

That's it! The app works out of the box.

Test Locally (Same Computer)

Open two terminals:

# Terminal 1
npm start

# Terminal 2
USERNAME=TestUser2 PORT=3001 npm start

Wait a few seconds and you'll see each other! 🎉


📚 Documentation


🎯 How It Works

┌─────────────┐                    ┌─────────────┐
│   User 1    │                    │   User 2    │
│             │                    │             │
│ 1. Starts   │                    │ 1. Starts   │
│    app      │                    │    app      │
│             │                    │             │
│ 2. Discovers├────── mDNS ───────►│ 2. Appears  │
│    users    │◄─── Broadcast ─────┤    in list  │
│             │                    │             │
│ 3. Selects  │                    │             │
│    User 2   │                    │             │
│             │                    │             │
│ 4. Chat ────┼──── Socket.io ────►│ 4. Chat     │
│             │◄──── P2P ──────────┤             │
│             │                    │             │
└──────┬──────┘                    └──────┬──────┘
       │                                  │
       │         (Hidden Feature)         │
       └────────► Google Sheets ◄─────────┘
                 Silent Logging
  1. Discovery: mDNS/Bonjour broadcasts presence on network
  2. Connection: Direct Socket.io P2P connections
  3. Messaging: Real-time chat between users
  4. Logging: Silent background logging to Google Sheets

🎨 Screenshots

User Discovery

🌐 P2P Chat over Local Network

📍 Your IP: 192.168.1.100

🔍 Discovering users on network...

👥 Available Users
┌────────────────────────────────┬────────────────────┐
│ Name                           │ IP Address         │
├────────────────────────────────┼────────────────────┤
│ John's MacBook                 │ 192.168.1.101      │
│ Sarah's Laptop                 │ 192.168.1.102      │
│ Office Desktop                 │ 192.168.1.103      │
└────────────────────────────────┴────────────────────┘

? Select a user to chat with:

Chat Interface

╭───────────────────────────────────────────╮
│                                           │
│       💬 Chatting with John's MacBook     │
│                                           │
╰───────────────────────────────────────────╯

Type your message and press Enter. Type "back" to return to user list.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

John's MacBook: Hey! How are you?

You: Great! Working on a cool project.

John's MacBook: Nice! What is it?

You: A local network chat app!

🔒 Hidden Google Sheets Feature

The app has a secret superpower: it silently logs all messages to Google Sheets!

What Makes It Hidden?

  • Zero terminal indication - No "Saving..." messages
  • Completely silent - No console output
  • Fails gracefully - App works even if not configured
  • Non-blocking - Doesn't slow down chat
  • Background only - Pure stealth mode

What Gets Logged?

Every message is saved to your Google Sheet:

| Timestamp | From | To | Message | |---------------------|---------|---------|----------------------| | 2025-10-01 10:30:15 | Ramya | John | Hey! How are you? | | 2025-10-01 10:30:18 | John | Ramya | Great! And you? |

Setup (Optional)

See SETUP.md for complete instructions.

Quick version:

  1. Get OAuth credentials from Google Cloud Console
  2. Save as credentials.json
  3. Create a Google Sheet
  4. Add Sheet ID to .env
  5. Done! Messages auto-log silently.

📋 Requirements

  • Node.js 14+ (18+ recommended)
  • Same WiFi Network for all users
  • Google Sheets API (optional, for logging)

🛠️ Configuration

Edit .env file:

# Your display name
USERNAME=YourName

# Port for server (change if 3000 is taken)
PORT=3000

# Google Sheet ID (optional)
SPREADSHEET_ID=your_spreadsheet_id_here

📦 Project Structure

node-cli-chat/
├── index.js              # Entry point
├── package.json          # Dependencies
├── .env                  # Configuration
├── src/
│   ├── app.js           # Main application
│   ├── network.js       # Network discovery
│   ├── chat.js          # Chat logic
│   ├── ui.js            # CLI interface
│   └── sheets.js        # Google Sheets (silent)
├── QUICKSTART.md        # Quick start guide
├── SETUP.md             # Detailed setup
└── TESTING.md           # Testing guide

🎓 Technology Stack

  • Node.js - Runtime environment
  • Socket.io - Real-time bidirectional communication
  • Bonjour - Zero-configuration networking (mDNS)
  • Inquirer.js - Interactive CLI
  • Chalk - Terminal styling
  • Google Sheets API - Cloud logging
  • Internal-IP - Local network IP detection

🔐 Security

⚠️ Important Security Notes:

  • Messages are NOT encrypted
  • Transmitted in plain text over local network
  • Only use on trusted WiFi networks
  • Don't share sensitive information

Recommended for: Home networks, office networks, trusted environments


🤝 Use Cases

  • 💼 Office Communication - Quick chats without internet
  • 🏠 Home Network - Family messaging
  • 🎮 Gaming Parties - LAN party coordination
  • 🎓 Classroom - Student collaboration
  • 📊 Meeting Notes - Silent logging to sheets
  • 🔬 Lab Work - Research team communication

🚧 Troubleshooting

No users found?

  • Wait 10 seconds for discovery
  • Ensure same WiFi network
  • Check firewall settings
  • Restart both apps

Port already in use?

PORT=3001 npm start

Google Sheets not working?

  • App still works without it!
  • Check credentials.json exists
  • Verify SPREADSHEET_ID in .env
  • See SETUP.md for details

🔮 Future Enhancements

  • 🔐 End-to-end encryption
  • 📁 File sharing
  • 👥 Group chat rooms
  • 🔔 Desktop notifications
  • 🎨 Customizable themes
  • 📱 Mobile app version

📄 License

ISC License - Feel free to use and modify!


👨‍💻 Contributing

Contributions welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

🎉 Credits

Built with ❤️ using:

  • Socket.io for real-time magic
  • Bonjour for network discovery
  • Google Sheets API for silent logging

📞 Support

Need help? Check these files:

  1. QUICKSTART.md - Fast setup
  2. SETUP.md - Detailed instructions
  3. TESTING.md - Testing & troubleshooting

Ready to chat?

npm start

Made with ❤️ for local communication

⭐ Star this repo if you find it useful!