URL Scheme API
Automate MouseViz by triggering actions via URL schemes from Raycast, Alfred, Keyboard Maestro, Stream Deck, or custom scripts.
MouseViz supports a URL scheme API that lets you trigger any action programmatically. URL schemes are special links that, when opened, tell MouseViz to perform a specific action.
The general format is:
mouseviz://command-name?param1=value1¶m2=value2Quick Start
You can trigger URL schemes from Terminal, automation tools, or scripts:
Terminal:
open "mouseviz://start-recording"AppleScript:
open location "mouseviz://start-recording"Raycast / Alfred / Keyboard Maestro:
Use the "Open URL" action with any mouseviz:// command.
Recording Control
Commands to start, stop, pause, and resume mouse tracking sessions.
Start Recording
mouseviz://start-recordingBegin a new mouse tracking session. If tracking is not already active, this starts a countdown and begins recording mouse movements, clicks, and scrolls. Ignored if already recording.
Available since v1.0
Stop Recording
mouseviz://stop-recordingStop the current tracking session. If auto-save is enabled, the session data is saved automatically. Ignored if not recording.
Available since v1.0
Pause Recording
mouseviz://pausePause the current recording without ending it. Events stop being captured until resumed. Ignored if not recording or already paused.
Available since v1.2
Resume Recording
mouseviz://resumeResume a paused recording session. Ignored if not paused.
Available since v1.2
Markers
Add timestamped markers during a recording to flag important moments.
Add Marker
mouseviz://add-marker?name=Task%201Add a named task marker at the current timestamp in the active recording. Defaults to "Marker" if no name is provided. Ignored if not recording.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Label for the marker (defaults to "Marker"). |
Examples:
# Add a named marker
open "mouseviz://add-marker?name=Checkout%20Flow"
# Add a default marker
open "mouseviz://add-marker"Available since v1.2
Overlay & Visualization
Commands for controlling the visualization overlay.
Show Overlay
mouseviz://show-overlayShow the visualization overlay (heatmap, trails, clicks, etc.).
Available since v1.2
Hide Overlay
mouseviz://hide-overlayHide the visualization overlay.
Available since v1.2
Set Visualization Mode
mouseviz://set-mode?mode=3Set the active visualization mode using a bitmask value. See the mode values in Settings > Visualization.
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | integer | Yes | Bitmask value for the active visualization modes. |
Available since v1.2
Clear Overlay
mouseviz://clearClear all visualization data (heatmap, trails, click pulses) from the overlay.
Available since v1.2
Export
Export Heatmap
mouseviz://export-heatmapOpen the export dialog for the current heatmap visualization. Exports to the configured default directory.
Available since v1.2
Query Commands
Query commands return JSON data by copying it to your system clipboard. After opening the URL, paste (⌘V) to access the result.
Get Status
mouseviz://statusCopies JSON with the current recording status to the clipboard:
{
"isTracking": true,
"isPaused": false,
"duration": 125.4,
"totalMoves": 4200,
"totalClicks": 38,
"totalScrolls": 12,
"markerCount": 3,
"eventCount": 4250,
"activeModes": 1,
"participant": "Alice",
"project": "Checkout Redesign"
}Automation example:
open "mouseviz://status" && sleep 0.5 && pbpaste | jq .isTrackingAvailable since v1.2
List Session History
mouseviz://list-history?limit=5Copies a JSON array of recent sessions to the clipboard.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of sessions to return (default: 10). |
Available since v1.2
Get Version
mouseviz://versionCopies the app version and build number as JSON to the clipboard.
Available since v1.2
Health Check
mouseviz://health-checkCopies a diagnostic health report as JSON to the clipboard. Useful for troubleshooting.
Available since v1.2
Navigation
Commands that open specific windows or panels in MouseViz.
Open Settings
mouseviz://settingsOpen the MouseViz settings window.
Available since v1.0
Open Study Scripts
mouseviz://study-scriptsOpen the Study Scripts panel to view, create, and manage your study scripts.
Available since v1.0
Import Study Script
mouseviz://import-study?file=/path/to/script.jsonImport a study script from a JSON file on disk. The file must conform to the MouseViz study script schema. After import, the Study Scripts panel opens automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
file | string | Yes | Absolute file path to the study script JSON file. |
Examples:
# Import from Desktop
open "mouseviz://import-study?file=/Users/me/Desktop/usability-test.json"
# Import from Downloads
open "mouseviz://import-study?file=/Users/me/Downloads/study.json"The file path must be URL-encoded if it contains spaces or special characters.
Available since v1.0
Open File
mouseviz://open-file?path=/path/to/image.png&type=imageOpen a file in the appropriate MouseViz editor. Used by the Share Extension to hand off files to the main app.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Absolute file path to the file. |
type | string | No | File type: image (default) or video. |
Available since v1.2