What is the full list of scripting languages that can also access application data? I only know of Apple Script and JXA.
Welcome to the forum.
https://wiki.keyboardmaestro.com/manual/Scripting?s[]=scripting&s[]=language
Scripting Languages Supported by Keyboard Maestro:
Keyboard Maestro supports running scripts in these languages directly within actions:
- AppleScript
- Full native support.
- Great for interacting with macOS apps and automation.
- JavaScript for Automation (JXA)
- JavaScript-based automation alternative to AppleScript.
- Can interact with macOS apps in a similar way.
- Shell Scripts (run via
sh
,bash
, orzsh
)
- Perfect for command-line tools and file manipulation.
- You can choose your preferred shell.
- Perl
- Run directly via a shell script action.
- Python (pre-installed versions)
- Can run legacy versions like Python 2.7 (still present on some systems).
- For newer macOS versions, Python may need to be manually installed.
- Ruby
- Available via shell script actions.
- Useful for text and file processing.
- Swift (via command line with
swift
)
- Indirect support by running via shell if Xcode tools are installed.
Scripting Languages Not Directly Supported by Keyboard Maestro (but runnable via workarounds):
These languages are not directly supported by dedicated KM actions but can be run using external tools or shell commands if installed:
- Node.js (JavaScript runtime outside JXA)
- Use a shell script to run
.js
files vianode
.
- PHP
- Can be run via shell script if installed.
- Go (Golang)
- Can compile and run Go binaries or call Go programs via shell.
- Rust
- Same as Go – you can compile and call executables via shell.
- Haskell, Java, C++, etc.
- Require compilation and execution via terminal or calling a compiled binary.
Use the "Execute a Shell Script" action for any language not natively supported (like Node, PHP, Go, etc.), and specify the full path to the interpreter if needed (e.g., /usr/local/bin/node
).
Though not a scripting language other things like RegEx are very useful for processing and getting actions to output what you need inside of Keyboard Maestro.
Shell Scripts
- You can use Bash, Zsh, or any shell language to manipulate text or run logic using Unix tools like
grep
,awk
,sed
,cut
, etc. - These often act like RegEx tools and are very powerful for parsing strings or files.
- Example shell command:
bash
CopyEdit
echo "$KMVAR_MyVar" | grep -o '[0-9]\+'
If you haven't already check out Tokens and Variables in Keyboard Maestro.