Context
Press button → sequence of OS actions (open tab, run command, switch tab, type text).
Scope
- New plugin
deckhand.plugins.macros. Reads macros from config.toml under [macros.<id>] with a steps list.
- Step primitives:
iterm.new_tab {cwd, cmd}, iterm.send_text {text}, iterm.focus_tab {index}, shell.run {cmd, cwd}, delay.ms {ms}.
- New action
macro.run with payload {macro_id}.
- Pick one of: iTerm Python API or AppleScript. Commit to it. Document why.
- No conditionals, variables, or error branches in the DSL. If logic is needed, write a Python plugin function instead.
Demo macro
- Ship one generic demo in
examples/macros.example.toml that doesn't assume user filesystem layout — e.g., "open a tab in the current shell's $PWD and run pwd && ls."
- Do not check in personal macros (e.g., "Start working on Code Cannon"). Those live in the user's own
config.toml, not the repo.
Acceptance
macro.run with {"macro_id": "demo"} opens an iTerm tab and runs the demo commands.
- A personal Code Cannon macro can be defined out-of-tree and works.
Context
Press button → sequence of OS actions (open tab, run command, switch tab, type text).
Scope
deckhand.plugins.macros. Reads macros fromconfig.tomlunder[macros.<id>]with astepslist.iterm.new_tab {cwd, cmd},iterm.send_text {text},iterm.focus_tab {index},shell.run {cmd, cwd},delay.ms {ms}.macro.runwith payload{macro_id}.Demo macro
examples/macros.example.tomlthat doesn't assume user filesystem layout — e.g., "open a tab in the current shell's$PWDand runpwd && ls."config.toml, not the repo.Acceptance
macro.runwith{"macro_id": "demo"}opens an iTerm tab and runs the demo commands.