LAN Waifu

An anime desktop pet for VS Code and Cursor, with superpowers. Everyone
picks a character who lives on their screen: she roams your editor, reacts
to what you're doing, and now and then visits teammates on the same
network. She carries your messages and sounds, too: send one and she walks
off your screen and onto your teammate's.
Created by Guy. Website: lan-waifu.com ·
Buy LAN Waifu Pro ($4.99, once) · help and feedback:
hello@lan-waifu.com.
Superpowers
Throw fireballs, freeze, charm, heal and prank your teammates' characters,
even when they're on another screen. A few tries a day are free; LAN
Waifu Pro unlocks them all for $4.99, once.
New: Ultimates, a bigger tier of superpower. Frost's Tornado tears
across your screen, then across every teammate's in turn, freezing and
flinging everyone it touches, before spinning out back on hers. Sakura's
Party charm brings every character in the room, from every screen, to
hers for a party.


|
|
Freeze: Frost's ice shard |
Heart beam: Sakura charms anyone |
Bug jar: Mint bugs your code (it only looks bugged) |
Shadow send: Violet teleports anyone to anyone |
What she does
- Is yours. Pick one of seven characters with LAN Waifu: Choose
Character (👗). Teammates may pick the same one; name tags show whose is
whose when more than one is on a screen.
- Roams VS Code. She walks along the bottom of the whole window, just
above the status bar, over editors, sidebar and terminal alike. Drag her
anywhere in the window and she drops back down when you let go. That's on
Windows, macOS, and on Linux in an X11 session or on KDE Plasma; on other
Linux desktops she walks along the lines of your open editors instead (see
"Known limits"). With roaming turned off she lives in the LAN Waifu
tab (the heart in VS Code's left bar).
- Can be thrown. Grab her and fling her: she flies with the mouse's
speed and crash-lands (wherever she roams the whole window). Fling her off the right or left edge and
she flies onto that teammate's screen, crash-landing there; fling a
visitor off and she flies home. With nobody in the room she bounces off
the edge.
- Reacts to you. She cheers when you save, frets when errors appear (and
cheers when you fix them), sits out of your way while you type fast,
celebrates commits, and takes a short nap when you've been away from VS
Code for 10 minutes.
- Visits teammates. Now and then she walks off an edge to visit someone:
right to the next teammate, left to the previous one. Their characters
visit you the same way, and head home after a while.
- Carries messages. LAN Waifu: Send Message (💌) picks a teammate and a
message. Your character walks it over and tells them, plus a normal
notification. If she's out visiting, she's called home for it and says
so, in her own way, before setting off.
- Has superpowers with LAN Waifu Pro ($4.99, once). Run LAN Waifu: Use Power
(Ctrl+Alt+P, Cmd+Alt+P on Mac, or ✨ in the panel). Everyone can
teleport, in a puff of smoke, somewhere else on your screen or right next
to any character, wherever she is (Violet goes through her shadow portal
instead), fly superhero style across every screen in the room and back
home (call her and she flies straight back), and dance. Ember's
fireballs set a character running about in flames, and she has a fire
dash; Frost freezes a character in ice for 5 seconds; Sakura's heart beam
charms one into walking over to her; Honey's sweet heal cheers one up,
curing ice, fire, charm or bugs, and shields her for 2 minutes against
every attack; and Mint's bug jar sets a character running about covered
in bugs while her owner's code looks bugged for 10 seconds (only looks:
the file is never touched); and Midnight rides her moon about the window
while every character in the room falls asleep for 8 seconds, unless
Honey's shield protects her; and Violet's shadow send drops any
character through her portal to rise next to anyone else, on whichever
screen they're on. Frost also has the first Ultimate, her
Tornado: it crosses every screen in the room, one after another,
freezing and flinging everyone it touches (Honey's shield turns it
away), and spins out back on hers. Sakura's Ultimate, Party charm,
sends out a burst of charms: every character in the room, on every
screen, rises out of a party ring beside her, and they all party for 20
seconds before heading home (Honey's shield keeps one home). Ultimates
are Pro only and recharge for 10 minutes after each use. Aimed powers fly at the character you pick, across
screens if need be, and every power has its own sound effect (🔊 in the
panel, or Mute sounds in her right-click menu, turns them off).
Powers need the overlay (Windows, macOS, and Linux on X11 or KDE
Plasma).
- Has a menu. Right-click your character for her powers, Message and
Sound, in pills around her in her own colours; right-click a teammate's
to aim at her or message her owner. Every step stays around her, down to
typing your message in a box over her head (on Linux, typing happens in
VS Code's input box).
- Comes when called. Ctrl+Alt+W (Cmd+Alt+W on Mac) brings her to your
cursor, calling her home first if she's visiting.
- Brings sounds. LAN Waifu: Send a Sound (🔊) picks a teammate and a
sound from the built-in pack (▶ previews it). Your character carries it
over and asks "wanna listen?". Click her to play it. Unheard sounds wait in the panel
and in the status bar (🔊 with a count) until you listen.
- Likes attention. Click any character, on your code or in the panel.
Without a room code she's yours alone and nothing touches the network.
Each person has one character. With several VS Code windows open, she lives
in one of them (the first opened); if you close it, another window takes
her over.
The LAN Waifu panel lists who's in the room, with their characters. Your
name for teammates is your GitHub account's if you're signed in to VS Code
with one, otherwise your computer's user name; LAN Waifu: Set Your Name
(🏷 in the panel) changes it.
LAN Waifu Pro
The superpowers (Fireball, Fire dash, Freeze, Heart beam, Sweet heal, Bug
jar, Moon glide, Teleport, Shadow portal, Shadow send and Fly) and the
Ultimates (Frost's Tornado, Sakura's Party charm) are LAN Waifu Pro: $4.99, once,
yours for good on up to 3 machines. Everything else is free, including
Dance, the right-click menu, and being on the receiving end of your
teammates' powers. Free users can try 3 superpowers a day (Ultimates
aren't among the free tries).
- Buy Pro here, or run LAN Waifu: Get Pro to open the
store.
- LAN Waifu: Enter Pro License Key unlocks Pro with the key from your
purchase email.
- LAN Waifu: Remove Pro License From This Machine frees the activation,
to move Pro to another machine.
The license is checked with the store (Freemius) when you enter it and about
once a week after; offline, Pro keeps working for 30 days. Only the key,
this machine's name and an anonymous id for it are sent.
Use it
- Open the LAN Waifu tab (the heart in VS Code's left bar), press
Join a room and type the same code as your teammates on the same
network. Leave room takes her back to being yours alone.
- Teammates' characters start dropping by within a minute or so.
Settings
| Setting |
What it does |
lanWaifu.character |
Your character. Choose Character picks with pictures. |
lanWaifu.roomCode |
Shared secret for your room. Empty means solo. |
lanWaifu.displayName |
Your name for teammates. Set Your Name picks one. |
lanWaifu.roamEditors |
Let her roam over VS Code (default on). Toggle Roaming in Editors flips it. |
lanWaifu.overlay |
Roam the whole window rather than just the editors (default on). |
lanWaifu.size |
small, medium or large. |
lanWaifu.peers |
Teammates' IPs, for networks that block multicast. |
lanWaifu.relayUrl |
A relay server, for networks that block direct traffic. See relay/. |
Privacy and security
- Every packet is encrypted (AES-256-GCM) with a key derived from the room
code. People without the code can't read messages or forge packets. Pick a
room code that isn't easy to guess.
- Each packet is unique, so recorded packets can't be replayed later.
Teammates' clocks must agree within 10 minutes.
- Packets are size-checked and rate-limited on arrival.
- The relay, if you use one, only sees encrypted bytes and a room tag that
doesn't reveal the code.
- A Pro license key is checked with Freemius (api.freemius.com): the key,
this machine's name and an anonymous id for it (a hash of VS Code's
machine id), nothing else. Without a key, nothing is sent.
Troubleshooting
Run LAN Waifu: Show Diagnostics. It lists your IP addresses, the
teammates this window sees, and how many packets were dropped and why.
- Nobody shows up: check everyone has the same room code. On Windows,
allow VS Code on private networks when the firewall asks. On Linux, a
firewall such as ufw or firewalld drops the room's packets until you allow
UDP port 47321 from your network, for example
sudo ufw allow from 192.168.1.0/24 to any port 47321 proto udp. That
also lets two VS Code windows on one machine see each other.
- On a Mac, teammates show up but messages fail with "didn't answer":
macOS is keeping VS Code off the local network. Turn on Visual Studio
Code (or Cursor) in System Settings → Privacy & Security → Local
Network, then quit and reopen it.
- "unreadable" packets climbing: someone nearby uses a different room
code or an older version of LAN Waifu.
- "stale" packets: a teammate's clock is more than 10 minutes off.
- On Linux she only walks on lines of text: the LAN Waifu output
(View → Output) says why the overlay couldn't run, for instance a Wayland
desktop other than KDE Plasma.
- Office or guest Wi-Fi: these often block multicast. Add each other's IP
addresses (shown in diagnostics) to
lanWaifu.peers. If that doesn't work
either, run the relay (relay/README.md) and set lanWaifu.relayUrl.
Develop
npm install
npm test # room, mood and codec tests
npm run typecheck
npm run build # also builds the overlay apps this machine can: Windows (.NET SDK), Linux (Rust)
npm run package # builds lan-waifu-<version>.vsix
Press F5 in VS Code to launch an Extension Development Host, or from a
terminal:
npm run build
code --new-window --disable-extensions --extensionDevelopmentPath="$PWD"
Don't open this folder inside the Extension Development Host and press F5
there. VS Code would restart that same window for debugging, nothing
attaches, and it fails with "Extension host did not start in 10 seconds".
Layout:
src/core/: the logic, all pure and tested. room.ts (peers, who has her,
handoffs, letters, summons), mood.ts (reactions to your activity),
codec.ts (encryption, replay and rate limits), protocol.ts (packets).
src/net/: transports (lanTransport.ts, relayTransport.ts) and
link.ts, which ties them to the codec.
src/editor/: roaming over code editors and watching your activity.
src/webview/: the panel she uses when no editor is open.
overlay/: the Windows overlay app (C#, .NET Framework 4.8, which comes
with Windows). It draws the characters in see-through windows on top of
VS Code, moving them every screen refresh, and takes the mouse directly.
src/overlay/overlayStage.ts starts it and talks to it over stdin and
stdout, one JSON message per line. Building it needs the .NET SDK.
overlay-mac/: the same for macOS, in Swift (Sources/main.swift), built
by overlay-mac/build.sh on a Mac (CI does it) into overlay-mac/bin/. It
can't read window titles without a permission prompt, so it follows the
VS Code window that has the focus.
overlay-linux/: the same for Linux, in Rust, built by
overlay-linux/build.sh (needs Rust and the cairo, pango and D-Bus
development packages; CI does it) into overlay-linux/bin/. Its character
logic, window tracking and drawing are tested with cargo test. Where VS
Code is an X11 app (an X11 session, or VS Code under XWayland) it uses
see-through windows like the Windows app. On KDE Plasma's Wayland it draws
on a layer-shell surface, and a small KWin script it loads over D-Bus
reports where VS Code's window is. Anywhere else it logs why and exits, and
the extension falls back to roaming over editors.
src/art/characters.ts: the characters and their poses. The images in
media/characters/ are made from the sheets in art/source/ by
scripts/slice_characters.py (Python with Pillow, numpy and scipy; only
needed when adding art). See "Adding a character" below.
relay/: the optional relay server.
See RELEASE.md for publishing and TRIAL.md for testing with teammates.
Adding a character
Who each character is, how she looks, talks and moves, and the prompts for
new art are in docs/characters.md.
- Make two sheets in the same layout as the existing ones, 4 poses across
and 2 down, on a transparent background:
<id>-1: idle, walk ×4, wave, jump, laptop
<id>-2: point, thumbs up, excited, asleep, thinking, cheering,
peeking, laptop with a notification
- Save them as
art/source/<id>-1.png and art/source/<id>-2.png.
- Run
python scripts/slice_characters.py <id> and check
art/preview/<id>.png.
- Add the character to
CHARACTERS in src/art/characters.ts and to the
lanWaifu.character enum in package.json.
A full walk cycle can come from art/source/walk/<id>.png (or .webp): one
row of frames of her walking, facing right, on a transparent background. Eight
frames work well: contact, down, passing, up, then the same with the other
foot. They replace the sheet-1 walk frames, scaled to match her other poses.
The overlay advances them with the distance she walks, so if a new cycle has
much longer or shorter steps, adjust the cycle length in each overlay
(CycleLength in overlay/Actor.cs, cycleLength in
overlay-mac/Sources/main.swift, CYCLE_LENGTH in
overlay-linux/src/actor.rs).
A teammate whose character isn't installed on your machine is drawn as
Midnight.
Known limits
- VS Code has no API for drawing over its window, hence the overlay apps.
On Linux the overlay needs either an X11 session or KDE Plasma's Wayland
session (tested on Plasma 6). Other Wayland desktops (GNOME, Hyprland,
Sway and the rest) don't let an app learn where VS Code's window is, so
there she roams over your open editors instead. That uses editor
decorations with extra CSS (the trick Power Mode uses), which ties her to
lines of text. It works in VS Code 1.141, but a future VS Code could stop
allowing it; she'd then only appear in the panel. Starting VS Code under
XWayland (
code --ozone-platform=x11) may bring the overlay to those
desktops, untested.
- The Linux overlay is built for x64. On ARM Linux she roams the editors.
- On KDE Plasma's Wayland she's drawn on the screen most of VS Code's window
is on; if the window spans two screens, she's cut off at that screen's
edge.
- The overlay shows characters only while VS Code is the window in front, so
they don't float over other apps.
- Without the overlay, a click on her lands in the text under her (moving your cursor
there) and counts as clicking her when it's inside her outline. Past the
end of a short line VS Code can't tell exactly where you clicked, so a
click anywhere to the right of the text beside her counts.
- Sounds play through the OS (PowerShell on Windows,
afplay on macOS,
paplay or aplay on Linux), at your system volume.
Credits and license
Created by Guy. The code is MIT licensed. The character art is not: it's
all rights reserved and may only be used as part of this extension. See
LICENSE.
Sounds by Kenney (https://kenney.nl), CC0; power sound effects made for
LAN Waifu with ZzFX. See media/sounds/CREDITS.md.
| |