The command-line tool

In the app, open Help › Integrations and install the chainyourmac command. It's a link at ~/.local/bin/chainyourmac that points into the app, so it stays current with updates. If your shell can't find it, add this line to ~/.zshrc:

export PATH="$HOME/.local/bin:$PATH"

Then run window actions from the terminal, for example:

chainyourmac window focus east

The URL scheme

Every chainyourmac:// URL runs one action. Use open -g so ChainYourMac doesn't come to the front:

open -g "chainyourmac://window/focus/east"
URLDoes
chainyourmac://start · stop · restart · toggleStart, stop or restart the window manager
…/window/focus/<west|east|north|south|first|last>Move focus
…/window/swap/<west|east|north|south|first|last>Move the focused window
…/window/centerCentre the focused column
…/window/resizeNext preset width
…/window/fullwidthToggle full width
…/window/wider · narrowerColumn width
…/window/taller · shorter · equalizeHeights in a stack
…/window/stack · unstackStack into the left column / out to the right
…/window/consume/east · expel/westStack into the right column / out to the left
…/window/tabbedStacked ↔ tabbed column
…/window/manageFloat / unfloat
…/window/nextdisplaySend to the next display
…/window/pin/<left|right>Pin to an edge, or unpin

URLs are checked against this list before anything reaches the window manager, so a malformed or unknown URL does nothing.

Raycast

Help › Integrations exports Raycast script commands for ChainYourMac's actions. Add them to Raycast's Script Commands and each action is searchable in Raycast, and can have its own hotkey.

Keyboard Maestro, BetterTouchTool, AppleScript

These tools can send ChainYourMac's keyboard shortcuts, and ChainYourMac treats them exactly like keys you type. They can also open the URLs above. That makes it easy to bind actions to a mouse button, a trackpad gesture or a Stream Deck key.

A window manager you can script.

One-time purchase, free updates, macOS 13 or later on Apple silicon.

Get ChainYourMac — $19.99 one-time purchase · free updates forever · macOS 13+ on Apple silicon

FAQ

Does ChainYourMac work with Raycast?

Yes. Help › Integrations in the app exports Raycast script commands for its actions, and Raycast (like Keyboard Maestro, BetterTouchTool and AppleScript) can also send ChainYourMac's keyboard shortcuts, which work exactly like keys you type.

Can I start or stop ChainYourMac from a script?

Yes: open -g "chainyourmac://stop", chainyourmac://start, chainyourmac://restart or chainyourmac://toggle.