lantext
v1.0.0
Published
A local area network chat application for WiFi devices
Maintainers
Readme
LanText
A lightweight local area network chat application that enables real-time communication between WiFi-connected devices.
Why LanText Exists
Sending a quick message from your phone to your laptop or to a colleague’s device is surprisingly frustrating. Most solutions require WhatsApp, Telegram, or cloud apps, which is overkill for a single text. LanText solves this by providing direct, local, real-time messaging with minimal setup.
Features
- Auto-discovery: Automatically finds the chat server on the network
- Multiple clients: Support for multiple simultaneous connections
- Hotspot mode: WiFi hotspot devices can both host and participate in chat
- Real-time messaging: Instant message delivery across the network
- Global CLI: Install once, run anywhere with
lantextcommand
Installation
Global Installation (Recommended)
npm install -g lantextLocal Installation
npm install lantextUsage
Interactive Mode (Recommended)
Simply run lantext and choose your mode:
lantextThe CLI will ask you whether you want to be a WiFi client (connect to existing network) or hotspot (create server).
Direct Mode
You can also specify the mode directly:
# Connect as WiFi client
lantext client
# or
lantext wifi
# Start as hotspot server
lantext hotspot
# or
lantext serverMulti-line Messages
LanText supports sending multiple lines of text as a single message. To send a multi-line message:
- Type your first line and press Enter
- Continue typing additional lines, pressing Enter after each line
- When done, press Enter again on an empty line to send the entire message
Example:
> Line 1 of my message
Line 2 of my message
Line 3 of my message
[SENT]:
Line 1 of my message
Line 2 of my message
Line 3 of my message
>Debug Mode
DEBUG=true lantext clientConnect to Specific Server
SERVER=192.168.1.5 lantext clientArchitecture
- Client (
src/client.js): Discovers and connects to a server on the network - Hotspot (
src/hotspot.js): Runs both server and client for hotspot devices - Main (
src/main.js): CLI entry point with interactive mode
Configuration
Environment variables:
DEBUG=true- Enable debug loggingSERVER=<ip>- Specify server IP address (skips discovery)
License
MIT
