Type something to search...

OverRec CLI Reference

OverRec includes a headless CLI mode for scripting and automation.

OverRec.exe cli <command> [options]

monitors — List displays

OverRec.exe cli monitors [--all]

Without --all, prints a compact ID/resolution list. With --all, prints full details: resolution, absolute position, scale factor, refresh rate, rotation, and primary flag.

Example output (--all):

ID    Resolution      Abs Position      Scale   Hz        Rot    Primary
0     1920x1080       (0, 0)            1       60        0°     yes
1     2560x1440       (1920, 0)         1       144       0°

window — Find a window by title keyword

OverRec.exe cli window [--all] [<keyword...>]

Lists all visible windows whose title contains all given keywords (case-insensitive). The printed WindowID is used with the snap command.

Without --all, prints a compact ID/title list. With --all, also shows the monitor number, location, and size. Location shows max or min instead of coordinates for maximised/minimised windows.

Examples:

OverRec.exe cli window chrome
OverRec.exe cli window visual studio
OverRec.exe cli window --all note

Example output (default):

WindowID        Title
------------------------------------------------------------
657846          Google Chrome
329812          Visual Studio Code

Example output (--all):

WindowID        Mon   Location          Size          Title
--------------------------------------------------------------------------------
657846          0     0,0               1920x1080     Google Chrome
329812          0     max               1920x1080     Visual Studio Code
131070          1     1920,0            1280x720      Notepad

Tip: run OverRec.exe cli window with no keywords to list every visible window.


snap — Move and resize a window

OverRec.exe cli snap --windowid ID --location X,Y --size WxH [--monitor ID]

Moves and resizes the window identified by --windowid to the given position and size. DWM shadow margins are corrected automatically so the visible frame lands exactly at the requested coordinates.

OptionDescription
--windowid IDWindow handle from OverRec.exe cli window
--location X,YTop-left corner in pixels
--size WxHWidth × Height in pixels
--monitor IDOptional. Offsets --location relative to that monitor’s top-left origin

Examples:

# Snap to absolute screen coordinates
OverRec.exe cli snap --windowid 657846 --location 0,0 --size 1920x1080

# Snap to the top-left quarter of monitor 1
OverRec.exe cli snap --windowid 657846 --location 0,0 --size 1280x720 --monitor 1

draw — Display an overlay rectangle

OverRec.exe cli draw --location X,Y --size WxH [--color COLOR] [--timeout SECS] [--monitor ID] [--grid SIZE] [--grid-line dotted|dashed|solid]

Opens a fullscreen transparent overlay and draws a rectangle. Stays visible until the window is closed or the timeout elapses.

OptionDescription
--location X,YTop-left corner relative to the monitor
--size WxHWidth × Height in pixels
--color COLORBorder color: red, green, blue, yellow, white, black, or #RRGGBB (default: blue)
--timeout SECSAuto-close after N seconds
--monitor IDMonitor to draw on (default: 0)
--grid SIZEOverlay a labeled measurement grid with SIZE-pixel cells (minimum 10)
--grid-line STYLEGrid line style: dotted (default), dashed, or solid

Examples:

OverRec.exe cli draw --location 100,100 --size 800x600
OverRec.exe cli draw --location 0,0 --size 1920x1080 --color "#FF4400" --timeout 3
OverRec.exe cli draw --location 200,200 --size 400x300 --monitor 1
OverRec.exe cli draw --location 256,211 --size 955x692 --grid 200 --color red
OverRec.exe cli draw --location 0,0 --size 1920x1080 --grid 100 --grid-line solid

screenshot — Capture a region to file or clipboard

OverRec.exe cli screenshot --location X,Y --size WxH [--output path.png] [--no-clipboard] [--monitor ID]

Captures the specified screen region. By default the image is copied to the clipboard; use --output to save to a file instead (or in addition).

OptionDescription
--location X,YTop-left corner relative to the monitor
--size WxHWidth × Height in pixels
--output path.pngSave to file (must end in .png)
--no-clipboardSkip copying to clipboard
--monitor IDMonitor to capture from (default: 0)

Examples:

# Copy to clipboard
OverRec.exe cli screenshot --location 0,0 --size 1920x1080

# Save to file only
OverRec.exe cli screenshot --location 100,200 --size 800x600 --output capture.png --no-clipboard

# Save and copy
OverRec.exe cli screenshot --location 0,0 --size 1280x720 --output shot.png

record — Record a region to GIF or MP4

OverRec.exe cli record --location X,Y --size WxH --output file.gif|file.mp4 --timeout SECS [--fps N] [--monitor ID] [--ffmpeg PATH] [--async]

Records the specified screen region to an animated GIF or H.264 MP4. By default the command waits until the timeout expires and the file is finalized; pass --async to start a detached worker and return immediately.

GIF encoding is built in. MP4 requires FFmpeg (ffmpeg on PATH by default, or --ffmpeg PATH). On Windows, MP4 capture uses Desktop Duplication and the region must fit inside one non-rotated monitor.

OptionDescription
--location X,YTop-left corner relative to the monitor
--size WxHWidth × Height in pixels
--output FILEOutput path ending in .gif or .mp4
--timeout SECSRequired. Stop and finalize after N seconds
--fps NFrame rate from 1 to 240 (default: 10)
--monitor IDMonitor whose top-left is used as the origin
--ffmpeg PATHMP4 only. FFmpeg executable path
--asyncRecord in a detached worker and return immediately

Examples:

# Record a region to GIF for 10 seconds
OverRec.exe cli record --location 0,0 --size 1280x720 --output demo.gif --timeout 10

# Record to H.264 MP4 at 30 fps
OverRec.exe cli record --location 0,0 --size 1920x1080 --output demo.mp4 --timeout 15 --fps 30

# Start a background recording and return immediately
OverRec.exe cli record --location 0,0 --size 1280x720 --output demo.mp4 --timeout 20 --fps 30 --async

mcp — Run an MCP server

OverRec.exe cli mcp [--host ADDR] [--port PORT] [--stdio]

Starts a Model Context Protocol server that exposes every CLI command as a tool, so AI agents (Claude Code, Claude Desktop, and others) can take screenshots, draw overlays, record the screen, and snap windows directly.

OptionDescription
--host ADDRHTTP only. Bind address (default: 127.0.0.1)
--port PORTHTTP only. TCP port (default: 7820)
--stdioUse the stdio transport instead of HTTP

Two transports are available: Streamable HTTP (default) at POST http://HOST:PORT/mcp, and stdio (--stdio) for clients that launch the server as a child process.

Register with Claude Code:

# HTTP — start the server, then add it
OverRec.exe cli mcp
claude mcp add --transport http overrec http://127.0.0.1:7820/mcp

# stdio — Claude Code launches and manages the process
claude mcp add overrec -- OverRec.exe cli mcp --stdio

Typical workflow

# 1. Find your monitors
OverRec.exe cli monitors --all

# 2. Find the window you want to snap
OverRec.exe cli window chrome

# 3. Snap it to the left half of monitor 0
OverRec.exe cli snap --windowid 657846 --location 0,0 --size 960x1080

# 4. Optionally draw a reference rectangle to verify the area
OverRec.exe cli draw --location 0,0 --size 960x1080 --timeout 2

# 5. Take a screenshot of that area
OverRec.exe cli screenshot --location 0,0 --size 960x1080 --output left-half.png