Skip to content

Repository files navigation

WinOrchestra

Control Windows windows from the command line. (Insert a pun about this because I didn't come up with one)

Based on my old project WindowManager (Python) (which I made as a beginner) and rewritten in Go for speed, compact binaries (and just to prove myself that I can do it).

Install

Download the latest executable from Releases and place it anywhere where you want. Or build from source:

go install github.com/FanaticExplorer/WinOrchestra@latest

Usage

winorchestra Check that it works
winorchestra --help List available commands
winorchestra [command] --help Show help for a specific command

Commands

CommandDescription
listList windows as JSON
focusRestore and bring a window to the foreground
minimizeMinimize a window
closeGracefully close a window (same as clicking ✕)

Filters

FlagDescription
-t, --titlePartial window title (case‑insensitive)
-p, --processPartial .exe name (case‑insensitive)
--classPartial window class (case‑insensitive)
--pidExact process ID

Multiple filters are ANDed — a window must match all of them. focus, minimize, and close require at least one filter; list works with or without.

Use --all to apply an action to every matching window instead of just the first.

Examples

# List all windows
winorchestra list
# List only Firefox windows
winorchestra list -p "firefox"# Compact JSON output
winorchestra list --raw
# Focus Chrome
winorchestra focus -p "chrome"# Minimize a window by title
winorchestra minimize -t "Calculator"# Close all Discord windows
winorchestra close -p "discord" --all
# List only windows of a specific class
winorchestra list --class "MozillaWindowClass"

jq recipes

Since list outputs JSON, you can pipe it into something like jq:

# Show only minimized windows
winorchestra list | jq '.[] | select(.minimized)'# Show the currently focused window
winorchestra list | jq '.[] | select(.focused)'# Check if Notepad is running
winorchestra list -p "notepad"| jq 'length > 0'

JSON output example

{
"pid": 21348,
"exe": "Discord.exe",
"class": "Chrome_WidgetWin_1",
"title": "Friends - Discord",
"minimized": false,
"focused": false
}

Support

I'm a student building tools like this in my free time — if it's useful to you, a donation helps me keep going.

License

MIT — see LICENSE.

About

Control Windows windows from the command line

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages