Expert guidance for Talon voice control development. Use when creating voice commands, defining actions, writing .talon files, testing Talon config, or debugging Talon issues.
This skill provides guidance for developing Talon voice control configurations.
When you discover new Talon patterns, best practices, or learn something not covered here, update this skill:
The goal is for this skill to grow into a comprehensive local reference.
Search across hundreds of Talon repositories for real-world examples:
https://search.talonvoice.com/api/v1/search/?q=<query>&fold_case=auto®ex=false
Returns JSON with matching code snippets and file locations. Use this to find how others implement patterns.
Set regex=true to use RE2 regex patterns in the query (e.g., q=cron\.(after|interval)).
Look up patterns and examples in these repositories. Code in active repositories is more reliable than potentially outdated documentation.
| Repository | Purpose | |------------|---------| | talonhub/community | Main community voice command set. The standard reference for Talon patterns. | | cursorless-dev/cursorless | Voice-controlled structural code editing. Advanced Talon integration example. |
| Resource | Notes | |----------|-------| | talonvoice.com/docs | Official API documentation. Covers Module, Context, actions, captures, settings. | | talon.wiki | Community wiki. Good for getting started, hardware recommendations. |
Note: Online documentation may be outdated. When in doubt, check actual code in repositories or use the code search.
See TESTING.md for command-line testing instructions, including:
test_talon.shcron.after()See PROGRAMMATIC_ACCESS.md for interacting with a running Talon instance:
See UI_AUTOMATION.md for inspecting and interacting with application UI elements via Windows UI Automation / macOS Accessibility APIs.
See CANVAS.md for drawing overlays, widgets, and visual feedback using Talon's Skia-based Canvas API.
See settings/api_exploration/eye_tracking/EYE_TRACKING_API_EXPLORATION.md for the eye tracking API reference.
user/ # Talon user directory
├── apps/ # App-specific commands
│ ├── generic/ # Cross-app abstractions (code_editor, browser)
│ └── [app].py/.talon # App-specific implementations
├── misc/ # General utilities and commands
├── plugins/ # Reusable plugins (vimfinity, etc.)
├── settings/ # Talon settings files
├── utils/ # Python utility modules
└── test_talon.sh # Testing script
Define voice commands and their actions:
# Context header (optional - restricts when commands are active)
app: vscode
-
# Commands below the dash
hello world: insert("Hello, World!")
go to definition: user.find_definition()
search <user.text>: user.search(text)
Context examples:
# Match by app
app: vscode
-
# Match by tag
tag: user.code_editor
-
# Match by OS
os: windows
-
# Multiple conditions (AND)
app: vscode
mode: command
-
Define actions, modules, contexts, and complex logic:
from talon import Module, Context, actions
module = Module()
# Define a tag that can be enabled/disabled
module.tag("code_editor", desc="Active in code editors")
# Define actions
@module.action_class
class Actions:
def my_action(arg: str) -> str:
"""Action docstring - shown in help."""
return f"Result: {arg}"
Used to define abstract actions with app-specific implementations:
# In apps/generic/code_editor.py
from talon import Module, Context, actions
module = Module()
module.tag("code_editor", desc="Active in code editors")
@module.action_class
class Actions:
def find_definition() -> None:
"""Navigate to definition."""
pass # Abstract - no default implementation
# In apps/vscode.py
from talon import Context, actions
ctx = Context()
ctx.matches = r"""
app: vscode
"""
# Enable the tag when VSCode is active
ctx.tags = ["user.code_editor"]
@ctx.action_class("user")
class UserActions:
def find_definition():
actions.key("f12") # VSCode-specific implementation
module = Module()
# Define a list
module.list("browsers", desc="Web browsers")
ctx = Context()
ctx.lists["user.browsers"] = {
"chrome": "chrome",
"firefox": "firefox",
"edge": "msedge",
}
# Use in .talon:
# open <user.browsers>: user.open_app(browsers)
from talon import Module, settings
module = Module()
module.setting(
"my_timeout",
type=int,
default=5000,
desc="Timeout in milliseconds",
)
# Use it:
timeout = settings.get("user.my_timeout")
# Standard Talon imports
from talon import Module, Context, actions, settings, app, clip, cron, ctrl
# For UI automation
from talon import ui
# For key simulation
actions.key("ctrl-c")
actions.insert("text")
# Internal Talon plugins (fragile - use local imports)
def my_action():
from talon_plugins import menu
menu.open_repl(None)
The cron module schedules tasks to run on the main thread. This is important because UI operations (canvas creation, etc.) require the main thread's resource context.
from talon import cron
# Run once after delay
job = cron.after("1s", my_callback)
# Run repeatedly at interval
job = cron.interval("500ms", my_callback)
# Cancel a scheduled job
cron.cancel(job)
Key point: cron.after and cron.interval queue callbacks to run on the main thread. This means:
actions.key("ctrl-c") # Press keys
actions.insert("text") # Type text
actions.edit.copy() # Standard edit actions
actions.user.my_action() # User-defined actions
actions.app.path() # Get current file path
# Simple command
hello: insert("world")
# With capture
say <phrase>: insert(phrase)
# With list
open <user.apps>: user.open_app(apps)
# Optional words
[please] save: edit.save()
# Alternative words
(quit | exit): app.quit()
# Repeater
press enter <number> times: key("enter:number")
generic/ with app-specific overrides.talon files (use Python)cron| Purpose | Location |
|---------|----------|
| App-specific commands | apps/[app].py + apps/[app].talon |
| Cross-app abstractions | apps/generic/ |
| General utilities | misc/ |
| Reusable plugins | plugins/ |
| Utility Python modules | utils/ |
| Settings | settings/ |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer