New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

localchat-byr

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localchat-byr

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

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

💬 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
  • Discovery: mDNS/Bonjour broadcasts presence on network
  • Connection: Direct Socket.io P2P connections
  • Messaging: Real-time chat between users
  • 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:

TimestampFromToMessage
2025-10-01 10:30:15RamyaJohnHey! How are you?
2025-10-01 10:30:18JohnRamyaGreat! And you?

Setup (Optional)

See SETUP.md for complete instructions.

Quick version:

  • Get OAuth credentials from Google Cloud Console
  • Save as credentials.json
  • Create a Google Sheet
  • Add Sheet ID to .env
  • 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:

  • QUICKSTART.md - Fast setup
  • SETUP.md - Detailed instructions
  • TESTING.md - Testing & troubleshooting

Ready to chat?

npm start

Made with ❤️ for local communication

⭐ Star this repo if you find it useful!

Keywords

cli

FAQs

Package last updated on 01 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts