miruis still pretty experimental. It works, but you should expect rough edges, occasional bugs, and behavior that may vary across setups.
miru is an open-source Rust CLI that switches monitor focus based on head direction.
It runs locally on your machine. Webcam input, calibration, tracking, and focus changes all stay on-device. The release build is meant to feel like a single CLI: models and the ONNX Runtime DLL are embedded and extracted automatically on first run.
What It Does
- Calibrates your head position against the monitors you want to use
- Tracks head direction from a webcam
- Switches focus to the prominent window between calibrated monitors as you look across them
- Works best on horizontal multi-monitor setups
- Prioritizes Windows first, with room to expand later
Why
miru lets you have focused work sessions where you can easily swap between work on different monitors without having to lift your hands off of your keyboard.
Install
Download A Release Binary
Download the latest Windows release from GitHub Releases, unzip it, and run:
By default, miru recalibrates on launch. If you want to reuse the last saved calibration instead:
.\miru.exe --reuse-calibration
If the folder containing miru.exe is on your PATH, you can also run:
miru miru --reuse-calibration
Build From Source
cargo build --release .\target\release\miru.exe
Quick Start
- Run
miru - Follow the prompts to calibrate the monitors you want to use
- Use
miru --reuse-calibrationif you want to skip calibration on later launches - Turn your head to move focus between monitors
Usage
Common options:
--reuse-calibration
--calibration-file PATH
--camera N
--verbose
--switch-cooldown-ms N
--switch-threshold-deg F
--focus-mode move-and-focus|move-and-click|move-only
Defaults:
--camera:0--switch-cooldown-ms:200--switch-threshold-deg:1.5--focus-mode:move-and-focus
Run miru --help to see the full CLI help.
Calibration
During calibration, miru walks through the detected monitors one by one.
- Press
Enterto calibrate the shown monitor - Type
sand pressEnterto skip a monitor you do not want to use
Only calibrated monitors are used for switching, so you can leave out any display you do not want in the rotation.
Focus Modes
miru supports three focus modes:
move-and-focus: move the pointer and try native window focusmove-and-click: move the pointer and allow click-based focus transfermove-only: move the pointer without trying to focus anything
If you want pointer movement without focus transfer, use:
.\miru.exe --focus-mode move-only
Configuration
Calibration is stored in the local app data directory:
%LocalAppData%\miru\calibration.json
If you want to keep calibration somewhere else, use --calibration-file.
Embedded runtime assets are extracted on demand to:
%LocalAppData%\miru\models\
%LocalAppData%\miru\runtime\
FAQ
Does it use eye tracking?
No. It uses face detection plus facial landmarks to estimate head direction. The goal is stable monitor switching, not precise gaze tracking.
Is it real-time?
It is near-real-time, but not instant. The current implementation is tuned to stay usable on CPU while avoiding accidental switching.
Will it work with more than two monitors?
Often, yes, especially for horizontal layouts. Vertical or irregular layouts may need more tuning because pitch separation is weaker than yaw.
How do I use only some of my monitors?
Skip the monitors you do not want during calibration. Only calibrated monitors are used afterward.
Why do I see names like \\.\DISPLAY1?
Those are Windows display device identifiers. miru uses them internally, but the CLI also tries to present friendlier labels when possible.
Credits
Bundled model credits:
- UltraFace RFB-320 face detector
- 68-point facial landmark model used for head-direction estimation