LanesMac logoLanesMac

Docs

Command line and automation

LanesMac is set up in a settings window, but everything you do every day can also be scripted. This page covers the lanesmac command and lanesmac:// links.

By Mansi Gangani · Updated

Can I script LanesMac?

Yes. LanesMac has a command-line tool, lanesmac, and lanesmac:// links, so scripts, Raycast, Alfred and Keyboard Maestro can drive the strip. Install the command once with lanesmac install-cli. Then lanesmac focus --column 4 focuses a column, lanesmac workspace export saves the current layout to a JSON file, and lanesmac workspace load brings it back. lanesmac notify flags the focused column when a long job finishes, for example npm test && lanesmac notify --status success || lanesmac notify --status failure, so you can work elsewhere and see when the tests are done. lanesmac:// links run actions from anywhere that can open a URL, such as lanesmac://focus?app=Visual%20Studio%20Code. Settings themselves live in a settings window rather than a config file.

Install the command

Run lanesmac install-cli once. After that, the lanesmac command is available in any terminal and in shell scripts.

Common commands

CommandWhat it does
lanesmac focus --column 4Focus column 4 on the strip
lanesmac workspace export ~/my-dev-session.jsonSave the current layout to a JSON file
lanesmac workspace load ~/my-dev-session.jsonLoad a saved layout
lanesmac notify --status successFlag the focused column, for example when a build passes
lanesmac notify --status failureFlag it as failed

Actions without a default key, such as full-width, fit-main, focus-border and dim-inactive, also have command names you can bind in other tools.

Flag a column when a job finishes

Add lanesmac notify to the end of a long command: npm test && lanesmac notify --status success || lanesmac notify --status failure. Start it in a terminal column, move elsewhere on the strip, and the column flags itself when the job is done.

lanesmac:// links

Anything that can open a URL can run a LanesMac action. lanesmac://focus?app=Visual%20Studio%20Code focuses VS Code, which makes it easy to build Raycast or Alfred commands, Keyboard Maestro macros or Shortcuts actions.

Questions

Is there a config file I can keep in my dotfiles?

No. Settings live in a settings window. Saved layouts export as JSON, so you can keep those in your dotfiles.

Try it with your own windows

LanesMac is free for 7 days, with every feature. After that it's a one-time purchase, no subscription. Works on macOS 13 Ventura or later, on Apple silicon and Intel Macs.