Instructions for how to work with user scripts for the Talon voice control software. Understanding .talon and .talon-list files, the unique way Talon uses Python, and how to write scripts that can be used in Talon.
Talon is a voice control software that allows users to control their computer using voice commands. It uses a unique scripting language that is based on Python, but with some differences. In this section, we will cover the basics of how to work with user scripts for Talon, including understanding .talon and .talon-list files, the unique way Talon uses Python, and how to write scripts that can be used in Talon.
Talon introduces two unique file formats for user scripts:
actions.js prints a list of available Talon actions.
$ node scripts/actions.js
app.bundle() -> str
Get active app's bundle identifier
app.executable() -> str
Get active app's executable name
app.name() -> str
Get active app's name
captures.js prints a list of available Talon captures.
$ node scripts/captures.js
{'name': 'number', 'rule': '<user.number_string>', 'doc': 'Parses a number phrase, returning it as an integer.'}
{'name': 'number_small', 'rule': '{digits} | {number_small}'}
{'name': 'number_small', 'rule': '{user.number_small}', 'doc': 'Parses a small (0-99) number phrase, returning it as an integer.'}
{'name': 'digits', 'rule': '<digit_string>'}
{'name': 'number_string', 'rule': '({digit} | {number_small} | {number_meta} | {number_scale})+'}
{'name': 'letter', 'rule': '{letter}'}
{'name': 'symbol', 'rule': '{symbol}'}
lists.js prints a list of available Talon lists.
$ node scripts/lists.js
{"user.letter": [{'air': 'a', 'batt': 'b', 'cap': 'c'}], "user.cursorless_hat_color": {'blue': 'blue', 'green': 'green', 'red': 'red', 'pink': 'pink', 'gold': 'yellow'}}
settings.js prints a list of available Talon settings.
$ node scripts/settings.js
['speech.record_all', 'user.subtitles_show', 'user.subtitles_screens', 'user.subtitles_size']
tailLog.js prints the last 100 lines from Talon's log file.
$ node scripts/tailLog.js
...last 100 lines of talon.log...
Run this script after making changes to your Talon scripts to check for errors. For example, if you have an indentation error in one of your Python files, you might see an error like this in the logs:
2026-03-11 10:58:54.565 ERROR user.andreas-talon.debug.debug_title (c:\users\andreas\appdata\roaming\talon\user\andreas-talon\debug\debug_title.py) import failed
16: threading.py:1014* # cron thread
15: threading.py:1043*
14: threading.py:994 *
13: talon\cron.py:156 |
12: talon\scripting\rctx.py:235 | # 'cron' main:Cron.interval.<locals>.call()
11: talon\cron.py:184 |
10: talon\fs.py:89 |
9: talon\fs.py:68 |
8: talon\scripting\rctx.py:235 | # 'fs' main:Loader.on_change()
7: app\resources\loader.py:792 |
6: app\resources\loader.py:763 |
5: app\resources\loader.py:429 | # [stack splice]
4: importlib\__init__.py:88 |
3: app\resources\loader.py:243 |
2: app\resources\loader.py:238 |
1: importlib._bootstrap:488 |
File "C:\Users\andreas\AppData\Roaming\talon\user\andreas-talon\debug\debug_title.py", line 17
# app.register("ready", on_ready)
^
IndentationError: expected an indented block after function definition on line 13
To test a voice command you can run the script sim.js with the voice command.
$ node scripts/sim.js "press air"
[1] "press air"
path: user\andreas-talon\core\keys\keys.talon
rule: "press <user.key_any>"
sleep in a cron callback; it blocks Talon's scheduler thread and can freeze or delay other work.