Tool Open source

DesktopFly

DesktopFly is a macOS desktop companion that places a procedural 3D fruit fly on a transparent, click-through overlay. The fly walks across window edges, grooms, sleeps, flies, and responds to cursor movement, clicks, window changes, keyboard activity, time of day, and thermal state without requiring permissions or entitlements. A separate interactive brain window displays 23,210 FlyWire neuron soma positions and live spikes.

View repository Mentioned in 2 videos ↓

Overview

Its behavior is driven by a 1 kHz leaky-integrate-and-fire simulation of a 668-neuron circuit containing approximately 19,000 real synaptic connections. Cursor approach is converted into looming input for LC4 and LPLC2 visual neurons; escape is produced only when activity reaches the DNp01/Giant Fiber escape command neuron through the modeled synapses. Other circuit outputs drive walking speed, steering, grooming, backward movement, wing effort, escape maneuvers, arousal, and spontaneous takeoff. The loop also feeds gait rhythm to ascending proprioceptive neurons and fast cursor motion to sensory wind partners. The body geometry and sensory transduction are procedural or modeled, while the downstream connectivity and synaptic strengths come from FlyWire data.

The project targets macOS 13 or later and requires the Xcode Command Line Tools. Menu-bar controls provide pausing, brain-window visibility, escape testing, movement between displays, adding or removing flies, and starting a collective startle response; the brain window can stimulate nearby circuit neurons for 400 ms. The code is MIT-licensed, while derived FlyWire data files are CC BY-NC 4.0.

What DesktopFly is used for

2 uses taken from transcripts — each links to the moment in the video.

  • Puts a fruit fly on a Mac desktop whose escape behavior is driven by a neural simulation. Cursor approach, window edges, and temperature influence the fly's movement.

  • A macOS desktop app that places a 3D fruit fly on the screen, driven by a live spiking simulation based on real fly neural connectivity. The fly responds to desktop signals with behaviors such as walking, grooming, sleeping, and fleeing the cursor, while a separate window displays its simulated brain.

Videos mentioning DesktopFly

2 in the library.