WindowCapture 1.1.0

dotnet tool install --global WindowCapture --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local WindowCapture --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=WindowCapture&version=1.1.0
                    
nuke :add-package WindowCapture --version 1.1.0
                    

WindowCapture

NuGet NuGet Downloads Build

A .NET global tool that captures screenshots of windows and browser tabs without bringing them to focus. Uses Win32 PrintWindow API for windows and Chrome DevTools Protocol (CDP) for Chromium browser tabs and WebDriver BiDi for Firefox tabs.

Install

dotnet tool install --global WindowCapture

Requires .NET 8+ on Windows.

Usage

Window Capture

# List all visible windows with their handle and size
windowcapture --list

# Capture a window by partial title match (case-insensitive)
windowcapture "Notepad"

# Capture a window by exact title
windowcapture "Untitled - Notepad" --exact

# Capture Visual Studio, Outlook, etc.
windowcapture "Visual Studio"
windowcapture "Inbox"
windowcapture "Teams"

Browser Tab Capture

# List all open browser tabs
windowcapture --tabs

# Capture a tab by title
windowcapture --tab "GitHub"
windowcapture --tab "Stack Overflow"

# Capture a tab by URL
windowcapture --tab "google.com"
windowcapture --tab "localhost:3000"

# Capture full scrollable page as one tall image
windowcapture --tab "GitHub" --scroll
windowcapture --tab "localhost:3000" --scroll

# Use a custom remote debugging port (default: 9222)
windowcapture --tabs --port 9223
windowcapture --tab "GitHub" --port 9223

Output

Screenshots are saved as PNG files in the system temp directory:

Screenshot saved: C:\Users\You\AppData\Local\Temp\screenshot_20260310_094405.png
Window: Notepad - Untitled

Browser Tab Setup

To capture browser tabs, the browser must be running with remote debugging enabled:

# Edge
msedge --remote-debugging-port=9222

# Chrome
chrome --remote-debugging-port=9222

# Firefox
firefox --remote-debugging-port 9222

Or enable permanently in edge://flags → "Enable remote debugging".

Firefox no longer supports CDP, so for Firefox the tool falls back automatically to WebDriver BiDi on the same port. Firefox allows only one BiDi client at a time, so close other automation tools (Playwright, Selenium) attached to it first.

Features

  • Silent capture — does not bring the window to the foreground or change focus
  • Background windows — captures windows hidden behind others
  • Browser tabs — captures any tab, not just the active one (CDP for Edge/Chrome, WebDriver BiDi for Firefox)
  • Full-page scroll capture — captures the entire scrollable page as one tall image (--scroll)
  • Partial matching — default search is case-insensitive substring match
  • No dependencies — single dotnet tool, no native binaries to install

Options

Option Description
--list List all visible windows
--tabs List all browser tabs (CDP or Firefox BiDi)
--tab Capture a browser tab instead of a window
--scroll Capture full scrollable page as one tall image (tab only)
--exact Match title exactly instead of partial match
--port <num> Remote debugging port (default: 9222)

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.1.0 40 10/26/2026
1.0.0 177 3/10/2026