LineChat
Chat between code lines. Zero UI.
A VS Code extension that lets you send and receive messages directly in your code editor — no panels, no popups, no context switching. Type a command, hit Enter, it disappears. Messages float beside your code and fade away.

How It Works
\\cl zhangsan ← connect to local server as "zhangsan", hit Enter, line gone
\\t lisi hey there ← send message, line gone, bubble appears: zhangsan>lisi: hey there
Incoming messages appear as inline decorations:
def hello(): 💬 lisi>zhangsan: hey back! ← fades in 5s
pass
Press Enter on an empty line or type \\d to dismiss immediately.
Commands
Connection
| Command |
Description |
\\c addr id |
Connect to server |
\\cl id |
Connect to localhost:9000 |
\\a alias addr |
Save server alias |
\\ca alias id |
Connect using alias |
\\dc |
Disconnect |
Messaging
| Command |
Description |
\\t userId msg |
Send message |
\\r msg |
Reply to last person |
\\g groupId msg |
Group message |
\\ut fromId toId msg |
Send as another identity (no switch) |
Identity
| Command |
Description |
\\u |
List registered identities |
\\u zhangsan |
Switch identity (auto-reconnect if online) |
Friends
| Command |
Description |
\\add id |
Add friend |
\\rm id |
Remove friend |
\\ls |
List friends |
Control
| Command |
Description |
\\d \\x \\h \\e |
Dismiss bubbles |
Empty line + Enter |
Dismiss bubbles |
\\on / \\off |
Enable / pause LineChat |
Click the 💬 icon in the Activity Bar:
- Friends — manage friend IDs (add/remove)
- Chat Log — message history in
user1>user2: msg format, system events as sys: ...
- Toggle ON/OFF and Clear buttons on the Chat Log panel
Server
LineChat uses a lightweight HTTP polling server. No WebSocket, no dependencies.
Start
node server.js 9000
API
| Endpoint |
Method |
Description |
/auth |
POST |
{ id, token } — register or authenticate |
/send |
POST |
{ from, token, to, text } — send message |
/poll?id=x&token=x |
GET |
Pull pending messages |
How It Works
- First connection with an ID auto-registers it (token saved locally)
- Messages are queued on the server, pulled every 1s by clients
- Works across NAT/private networks — only needs HTTP access to the server
- Default test users:
a, b, c, 1, 2, 3 (token = id)
Install from Source
git clone https://github.com/iiangs/linechat.git
cd linechat
npm install
npm run build
Then press F5 in VS Code to launch the Extension Development Host.
Architecture
src/
├── extension.ts # Entry point, command dispatch
├── parser.ts # Detects \\ commands in editor lines
├── bubble.ts # Inline message decorations (auto-fade)
├── client.ts # HTTP polling client with token auth
├── log.ts # Chat log panel (TreeView)
├── friends.ts # Friend ID list (JSON file)
├── friendsView.ts # Friends sidebar panel
└── aliases.ts # Server alias storage
server.js # Standalone HTTP relay server (zero deps)
Design Philosophy
- Zero UI — everything happens in code lines
- Zero deps — client uses Node.js
http, server is plain Node.js
- Zero config — type
\\cl myname and you're in
- Invisible — messages appear and disappear, your code stays clean
Author
李盆儿 · git@iiang.cn
License
MIT