A local area network chat application for WiFi devices
npm install lantext
style="
border-radius: 16px;
"
src='asset/logo-1.jpeg' width='160'>
A lightweight local area network chat application that enables real-time communication between WiFi-connected devices.
- 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 lantext command
``bash`
npm install -g lantext
`bash`
npm install lantext
Simply run lantext and choose your mode:
`bash`
lantext
The CLI will ask you whether you want to be a WiFi client (connect to existing network) or hotspot (create server).
You can also specify the mode directly:
`bashConnect as WiFi client
lantext clientor
lantext wifi
$3
LanText supports sending multiple lines of text as a single message. To send a multi-line message:
1. Type your first line and press Enter
2. Continue typing additional lines, pressing Enter after each line
3. 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
>
`$3
`bash
DEBUG=true lantext client
`$3
`bash
SERVER=192.168.1.5 lantext client
`Architecture
- 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 modeConfiguration
Environment variables:
-
DEBUG=true - Enable debug logging
- SERVER=MIT