Skip to content

Latest commit

 

History

History
182 lines (127 loc) · 8.74 KB

README.md

File metadata and controls

182 lines (127 loc) · 8.74 KB

Pixie

An AI cursor companion for Windows. Pixie lives on top of your screen as a small glowing arrow, follows your mouse, and flies to things to point at them, circle them and label them.

Status: early development. The overlay and the motion and drawing engine are finished and tested. The AI is not connected yet: today Pixie follows your cursor and plays a scripted demo. Answering questions about your screen is the next phase. See the roadmap.

What it is

Pixie is a Windows take on Clicky, a macOS assistant that looks at your screen and points at what it is talking about. The goal is an assistant you can ask by voice or by typing, which answers out loud while flying to the relevant button, circling it and drawing an arrow to it.

Pixie is not a normal app window. It is a transparent layer over the whole display:

  • Clicks, drags and typing pass straight through it to the apps underneath.
  • It never takes keyboard focus.
  • It does not appear in the taskbar or in Alt+Tab.
  • It is excluded from screenshots and screen sharing, so it never shows up in its own captures.

What it does today

Follows your cursor. Pixie rides just below and to the right of the pointer, moved by a damped spring so the motion is smooth and does not overshoot. After two seconds without mouse movement the sprite settles into a gentle idle bob.

Flies and points. Given a target, Pixie flies there along a curved Bézier path that bows toward the middle of the screen and never leaves it. Flight time scales with distance, from 350 ms to 1.1 s. The sprite turns into the flight, lands with its tip on the target and can show a short label next to it.

Draws on the screen. Circles, boxes, arrows and underlines are drawn with a slight hand-drawn wobble. The full set of actions:

Action What appears
point Pixie flies to a spot, with an optional label
circle A circle around a spot
box A translucent highlight rectangle
arrow An arrow from one point to another
underline An underline stroke
note A sticky text label
clear Erases all drawings

Each drawing strokes on over 400 ms and fades out after 8 seconds.

Talks in speech bubbles. The bubble wraps long text, flips to the other side of Pixie near a screen edge, and never clips off screen. Labels are placed so they never overlap Pixie or the bubble.

Plays a scripted demo tour. In debug mode, Ctrl+Alt+D runs a tour that exercises every action in every corner of the screen. This is the same command stream the AI will produce in the next phase.

Stays out of the way. A tray icon and a global shortcut show or hide Pixie. Only one instance can run at a time.

Getting started

Requirements

  • Windows 11 (developed and tested there; other platforms are untested)
  • Node.js 22 or newer, with npm

Install and run

git clone https://github.com/Azrkiel/pixie.git
cd pixie
npm install
npm start

The first launch downloads the Electron binary (about 100 MB, one time). Pixie then appears next to your cursor, and a purple dot appears in the system tray.

To quit, right-click the tray icon and choose Quit Pixie.

Controls

Control What it does
Ctrl+Alt+P Show or hide Pixie
Click the tray icon Show or hide Pixie
Right-click the tray icon Menu with Quit Pixie

Debug mode

Start with PIXIE_DEBUG set to see the demo tour and frame timing:

$env:PIXIE_DEBUG = "1"; npm start
Control What it does
Ctrl+Alt+D Play the demo tour. Press again to restart it
Ctrl+Alt+S Save a full-resolution screenshot to %APPDATA%\pixie\debug to check that Pixie is excluded from capture

Debug mode also prints frame statistics to the terminal, and any frame longer than 50 ms is logged with whether the time was spent in Pixie's code or outside it.

Environment variables

Variable Effect
PIXIE_DEBUG=1 Enables the debug shortcuts and frame logging
PIXIE_CAPTURABLE=1 Makes Pixie visible to screen capture, for recording demos. Only works together with PIXIE_DEBUG=1
PIXIE_NO_GPU=1 Disables hardware acceleration. Use it if the overlay shows as a black rectangle, which can happen on hybrid-GPU laptops

How it works

flowchart LR
  subgraph main["Main process (Node.js)"]
    feed["Cursor feed"]
    tour["Demo tour player"]
    tray["Tray and shortcuts"]
  end
  subgraph overlay["Overlay window (sandboxed renderer)"]
    reducers["Pure reducers: stage and behaviour"]
    canvas["Canvas: sprite, drawings, bubble"]
  end
  feed -- "pixie:cursor" --> reducers
  tour -- "pixie:stage" --> reducers
  reducers --> canvas
Loading

The main process polls the cursor position about 60 times a second and sends it to the overlay over a typed IPC channel, skipping samples when the mouse has not moved. A second channel carries ordered stage commands: perform an action, show speech, or release Pixie back to the cursor. The overlay turns both streams into state with pure reducer functions, and a canvas paints that state every frame.

Project layout

Path Contents
src/main/ Electron main process: overlay window, cursor feed, tray, shortcuts, demo tour, security hardening
src/preload/ The only bridge between main and the page, exposed as a typed window.pixie
src/renderer/ Canvas rendering: sprite, behaviour state machine, annotations, speech bubble, stage reducer
src/shared/ Pure logic used by both sides: geometry, spring physics, flight paths, coordinate mapping, action and IPC types
tests/ Vitest unit tests
docs/plans/ The step-by-step plan and recorded results for each phase

Anything mathematical lives in pure functions with unit tests. The Electron-specific code is kept thin.

Design notes

  • Coordinates. Actions are expressed in screenshot pixels, because that is what a vision model returns. One module, src/shared/coords.ts, converts them to the overlay's CSS pixels, so display scaling (for example 125 %) is handled in a single tested place.
  • Deterministic drawing. The hand-drawn wobble comes from a seeded random number generator, so the same action always produces the same stroke and can be tested exactly.
  • State machine. Pixie's behaviour (follow, idle, flying, pointing, returning) is a pure reducer driven by events and a clock, tested with a fake clock.
  • The one-pixel trick. A top-most window that exactly covers the monitor makes Windows treat the app as fullscreen and mute notifications. The overlay is one pixel shorter than the display, which avoids this.
  • Security. The overlay page runs sandboxed with context isolation and no Node integration. All permission requests, navigation and new windows are denied by default, and the page's Content Security Policy starts from default-src 'none'.

Performance

Measured on the development laptop (1920×1080 at 125 % scaling, 16 threads):

  • 60 fps during the demo tour, with at most 3.7 ms of Pixie's own work per frame
  • About 1.4 % CPU while following the cursor
  • About 330 MB of memory across Electron's four processes

Development

npm test           # run the unit tests (77 tests)
npm run typecheck  # TypeScript type check
npm run build      # bundle main, preload and renderer into dist/

The stack is Electron 44, TypeScript 7, esbuild and Vitest.

Roadmap

Phase Adds Status
1. Overlay foundation Transparent click-through overlay, cursor follow, tray, capture exclusion Done
2. Motion and drawing engine Flights, pointing, annotations, speech bubbles, demo tour Done
3. Brain Type a question; Claude reads a screenshot and answers while pointing and drawing Planned, next
4. Voice Push-to-talk, speech-to-text, spoken answers with pointing in sync Planned
5. Agent team and behaviours Step-by-step walkthroughs, background research, precise pointing, idle personality Planned
6. Ship it Installer, settings, privacy and cost guards, multi-monitor Planned
7. Operator (optional) Pixie clicks and types for you, behind a safety gate Planned

The full design, including the planned agent architecture, is in PLAN.md.

Current limitations

  • The AI is not connected. Pixie only follows the cursor and plays the scripted tour.
  • One display only: Pixie stays on the display the cursor was on at launch.
  • Windows only. There is no installer yet, so it runs from source.

Acknowledgements

Inspired by Clicky by Farza, which showed that an assistant pointing at your screen works well.

License

MIT