Extending MacScout
Add your own commands to MacScout's menus, and learn how the built-in action packs work.
MacScout's right-click menu changes with the selection. Right-click a folder that has a package.json and you get its scripts. Right-click a few images and you can convert or resize them. Those menu items are actions, and you can add your own.
Two ways to extend MacScout
Custom actions are commands you define in the config file. There is nothing to build or install: save the file and the action is in the menu. Use them for your own scripts, command line tools and small helpers.
Action packs are written in Swift and built into the app. Git, Scripts, Images and the other built-in menus are action packs. Write one when an action needs more than a shell command, for example its own window, a menu that depends on the project, or work that should run inside the app.
Most people only ever need custom actions. If you got MacScout from the Mac App Store, The App Store version explains what Apple's App Sandbox changes.
Your first action
Add a command to the right-click menu in a few minutes.
Custom actions
Every field an action can have.
Recipes
Ready-made actions to copy into your config.
Writing a pack
Build a new action pack in Swift.
Where actions show up
- The context menu. Right-click files, folders, or empty space in a folder. For files and folders, actions sit below Open and Quick Look. For empty space, they come last.
- The Actions menu. The ⚡ button in the toolbar shows the actions for the current selection. With nothing selected, it shows the actions for the current folder. Its last item, Edit Actions…, opens the config file.
- Keyboard shortcuts. An action with a shortcut runs when you press it, as long as it applies to the selection.
Built-in packs come first in the menu, followed by your custom actions.
The config file
Custom actions, and the settings for the built-in packs, live in one file:
~/.macscout/config.jsoncMacScout creates it the first time it starts, with comments that explain the settings, and reloads it whenever you save. See The config file for the details.