Skip to main content
If you have an old local_client.py running: stop it. Downloading local_client.py from Google Drive and running it by hand is deprecated. Local execution now runs through the OpenHome CLI’s Local Link bridge (openhome local), which is versioned, reviewable, and needs no separate file to edit or keep alive by hand.
Local Connect is the 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

See OpenHome CLI for the repo-based install method (Python 3.10+) if you’d rather not use the one-line installer.

2. Log in

Paste your API key from Dashboard → Settings → API Keys. 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. Add the OpenHome Local Link template from the Marketplace to your Agent, then test it: “show current directory”.

How it works

  1. Capture: the Ability captures your spoken request.
  2. Generate: an LLM converts it into one shell command.
  3. Send: the command is sent over Local Link with exec_local_command().
  4. Execute: the bridge’s local-link handler runs it in your shell and returns the output.
  5. 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):
For Windows, swap the examples to PowerShell or cmd equivalents.

The core function

exec_local_command() reference

Parameters:
  • command (required): the terminal command to execute. A plain string routes to the local-link shell 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’s main.py, before the call to exec_local_command().

Command blocklist

Command whitelist (for voice-only use cases)

Confirm destructive actions

Always confirm before rm, sudo, shutdown, dd, or format.

Best practices

1. Test commands manually first

2. Tune timeouts

3. Handle errors and timeouts

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

Watch openhome local logs for what actually happened. Verify the command runs correctly when typed manually in your own shell.
Some commands need admin privileges. Avoid them in voice flows when possible, or add an explicit confirmation step before anything that needs elevated permissions.
Raise the timeout (exec_local_command(cmd, timeout=60.0)) and watch openhome local logs to see what ran.
Confirm the Ability’s trigger words are set in the Dashboard and that the bridge is running on the machine you expect (--client-id).
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

The local-link handler runs commands in your shell, with your user permissions, there is no sandbox. Anyone with access to your OpenHome account can run commands through your bridge while it’s running. Only trigger requests you would run yourself.
  • 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 logs for 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