All projects
open source / 2026Dev Tools · Games

lombrico

A worm that lives in your terminal. It eats your logs, dances to your music and burps.

lombrico

The story

I wanted to see what I could make in C, and I wanted a worm, so I made a cool worm. It's a shaded 3D tube drawn in ASCII, and it doesn't just wander around: it reacts to what you're doing. Pipe your logs into it and it eats them line by line, errors first, obviously. Put some music on and it dances. Leave it alone long enough and it curls up and falls asleep.

things it can say
161
situations it has an opinion on
46
redrawing only what changed
30 fps
operating systems, one file each where they differ
3
Fed a few thousand fake failing tests. It liked the errors.

A worm made of characters

The body is a chain of segments. Only the head steers, every other segment just follows the one in front of it, and that's all you need for the snake-like movement.

The tube is lit from the top left, and every cell picks a character from " .:-=+*#%@" based on how bright it is, the same trick as donut.c. When it eats, you can see each bite go down the body as a little bulge.

  1. 1

    Eat

    If there's something to eat, that wins over everything.

  2. 2

    Dance

    If it hears music. Even with its mouth full it still throws a ♪ on every beat.

  3. 3

    Sleep

    If nothing happened for 30 seconds. 15 at night, it has a bedtime.

  4. 4

    Wander

    Otherwise it wanders, and when it gets bored it chases its tail, does zoomies or just stares at you.

It eats your logs

Whatever you pipe in scrolls up from the bottom like a normal log, and the worm goes for the closest characters. It really likes errors though, and will go out of its way for one: they're spicy, it turns gold inside and runs hot for a bit.

If stdout isn't the terminal, every byte goes through untouched, so you can put it in the middle of a pipeline and nothing breaks. Feed it something huge and it draws at most 15 new lines a second, lets the rest through and tells you to slow down. When the input ends it gives you a verdict: clean run, or how many errors you have to go fix.

It dances, but only to music

It listens to the mic and runs an FFT on it. Talking and typing make noise too, so it only dances when the beats keep time, because music has a steady gap between beats and everything else doesn't. From that gap it works out the bpm and dances at that speed, and it has opinions about it: under 95 is a slow dance, over 140 is too fast for a worm.

It listens a bit above the bass too, because laptop speakers basically have no bass. A sudden loud noise with no music, like a clap, makes it jump.

It feels the machine

CPU heats it up: red goes orange, it gets faster and twitchier, and over 85% it complains. Memory makes it longer. Network traffic sends ripples along the body, in for downloads and out for uploads. If the CPU suddenly jumps from idle to busy it asks who's compiling.

It talks. A lot

It talks in a little bubble over its head, one letter at a time. Every situation has a few different lines and it never says the same one twice in a row. Answering you always comes first, and random chatter waits for a few seconds of quiet, so it doesn't talk your ear off.

You can boop it on the head, pet it until it's had enough, or click anywhere to drop a leaf and watch it go eat it.

Plain C, no dependencies

C17 and just whatever the OS already has. Everything OS-specific lives in its own file: the terminal, the mic (CoreAudio on macOS, ALSA on Linux, waveIn on Windows) and the CPU, memory and network stats. The rest of the code doesn't care where it runs.

It redraws only the cells that changed, in one write per frame, and puts your terminal back exactly how it was when you quit, ctrl-c and ctrl-z included. 53 tests, and a debug build with the sanitizers on.

Gallery

lombrico · 1
lombrico · 2
lombrico · 3
lombrico · 4

Want something like this?

I can build the same thing for your product.

Tell me what you have in mind. You get an answer the same day, with a realistic scope and timeline, not a sales pitch.