# Command line and automation

URL: https://lanesmac.com/docs/command-line-and-automation · Updated 2026-11-30

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.

**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

| Command | What it does |
| --- | --- |
| lanesmac focus --column 4 | Focus column 4 on the strip |
| lanesmac workspace export ~/my-dev-session.json | Save the current layout to a JSON file |
| lanesmac workspace load ~/my-dev-session.json | Load a saved layout |
| lanesmac notify --status success | Flag the focused column, for example when a build passes |
| lanesmac notify --status failure | Flag 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.
