xdotool is a monster, it can automate lots of different things, notably also windows manipulation.
ydotool can perform a subset - most of those that relate to typing, mouse-moving and -clicking.
wmctrl can query windows (if they are managed by the window manager) and perform actions on them like raise, close, resize etc.
wlrctl can perform a subset of these, most notably those that are not found in ydotool.
Unfortunately I could not get it to work; I keep getting “XXX interface not found!” even though its stated dependency, wlroots>=0.13, is installed.
But kdotool works with a syntax much like what xdotool uses for window control.