local-link handler: a raw shell executor built into every OpenHome Local Link bridge, always available the moment the bridge is running. It is the lighter-weight alternative to OpenClaw for straightforward, direct terminal commands. Works on Windows, macOS, and Linux.
What you can build
- System monitor (disk space, CPU, memory)
- File management assistant (create, move, delete files)
- Development environment controller (git, npm, dev servers)
- Application launcher
- Network diagnostics tool (ping, traceroute, speed test)
- Automation scripts (backups, cleanup)
Setup
1. Install the OpenHome CLI
2. Log in
3. Start the Local Link bridge
Run this on the computer you want to control, and keep it running:openhome local run runs it in the foreground for debugging. start and run accept --client-id (device name, default laptop), --role (default agent), and --timeout (per-request seconds, default 30). Give each device a distinct --client-id if you run more than one.
Once the bridge is running, the local-link handler is available automatically, no download, no file to edit, no separate process to babysit.
4. Install the Local Link Ability
Add the OpenHome Local Link template from the Marketplace to your Agent, then test it: “show current directory”.How it works
- Capture: the Ability captures your spoken request.
- Generate: an LLM converts it into one shell command.
- Send: the command is sent over Local Link with
exec_local_command(). - Execute: the bridge’s
local-linkhandler runs it in your shell and returns the output. - Speak: the LLM rewrites the output into a short spoken reply.
The template
The Ability uses a small system prompt to convert natural language into a shell command, executes it, then uses a second prompt to convert the output into a spoken response.The command-generation prompt
Tune this for your OS and use case. Default (macOS/Linux):cmd equivalents.
The core function
exec_local_command() reference
command(required): the terminal command to execute. A plain string routes to thelocal-linkshell handler used throughout this page.target_id(optional): which device to reach, if you run Local Link on more than one machine (default:"laptop", matching--client-id)timeout(optional): max wait time in seconds (default:10.0)
Example abilities
1. Git assistant
2. System monitor (cross-platform)
3. Dev environment launcher
4. File organization assistant
Adding safety checks to the Ability
Since there is no separate client file, these patterns live directly in your Ability’smain.py, before the call to exec_local_command().
Command blocklist
Command whitelist (for voice-only use cases)
Confirm destructive actions
Always confirm beforerm, sudo, shutdown, dd, or format.
Best practices
1. Test commands manually first
2. Tune timeouts
3. Handle errors and timeouts
local-link vs openclaw
Both run through the same openhome local bridge, as two handlers:
Use
local-link for direct, concrete terminal commands. Use OpenClaw when you need broader, LLM-driven automation across apps.
Troubleshooting
"Local Link isn't connected" (spoken)
"Local Link isn't connected" (spoken)
The bridge isn’t running. Start it with
openhome local start, then check openhome local status. If you’re logged out, run openhome login first.Commands not executing
Commands not executing
Watch
openhome local logs for what actually happened. Verify the command runs correctly when typed manually in your own shell.Permission denied
Permission denied
Some commands need admin privileges. Avoid them in voice flows when possible, or add an explicit confirmation step before anything that needs elevated permissions.
Commands time out
Commands time out
Raise the timeout (
exec_local_command(cmd, timeout=60.0)) and watch openhome local logs to see what ran.Nothing happens
Nothing happens
Confirm the Ability’s trigger words are set in the Dashboard and that the bridge is running on the machine you expect (
--client-id).Spoken output is raw terminal text
Spoken output is raw terminal text
The template uses an LLM to reformat responses. Check that the formatting system prompt is still in place, and add command-specific parsing for structured output (JSON, tables) if needed.
Security
- Add a command blocklist or whitelist (above) for anything voice-triggered.
- Always confirm destructive actions (
rm,sudo,shutdown,dd,format) before running them. - Monitor
openhome local logsfor what’s actually being executed. - Treat your OpenHome API key as a secret. If it has ever been pasted somewhere public, rotate it in the dashboard.
Resources
- Local Link template on GitHub: openhome-dev/abilities/templates/openhome-local-link
- OpenHome CLI: Install and command reference
- Heavier alternative: Connect to OpenClaw

