Windows CLI task completion notification tool for AI agent collaboration
Project description
Horn
Windows CLI voice notification tool for AI agent collaboration.
Horn plays a Chinese voice notification through Windows Text-to-Speech when your AI agent (e.g. Cursor) completes a task or needs your confirmation — so you can step away from the screen without missing a beat.
Quick Start
Step 1 — Install
pip install horn
Step 2 — Verify
horn
You should hear: "Horn 已就绪,等待任务通知". If you do, installation is complete.
Step 3 — Configure Cursor Rules
Copy horn.mdc to your project's .cursor/rules/ directory (or Cursor's global Rules directory):
.cursor/
└── rules/
└── horn.mdc ← copy here
The horn.mdc file is included in the package. Find it with:
python -c "import importlib.resources as r; print(r.files('horn.rules').joinpath('horn.mdc'))"
Then give Cursor a simple task to confirm auto-trigger is working. You should hear "老板,我开始执行任务了" at the start.
Commands
| Command | Voice Output | Use Case |
|---|---|---|
horn |
「Horn 已就绪,等待任务通知」 | Verify installation |
horn --start |
「老板,我开始执行任务了」 | Agent begins a task |
horn --done |
「老板,任务已完成」 | Agent finishes a task |
horn --confirm |
「老板,有事情需要你确认」 | Agent needs your decision |
Exit codes: 0 on success, 1 on any error (unknown argument, TTS failure, timeout).
All errors are written to stderr only; no stdout output on normal runs.
Requirements
- Windows 10 / 11
- Python 3.8+
- Windows Speech (SAPI) enabled (enabled by default on most Windows installations)
FAQ
Installation issues
Q: pip install horn fails with a build error.
- Make sure you are running Python 3.8 or higher:
python --version - Upgrade pip first:
python -m pip install --upgrade pip - If you see a
pywin32error, install it manually:pip install pywin32
Q: horn command is not found after installation.
- Check that Python's
Scriptsfolder is in your PATH:python -m site --user-site - On Windows, the Scripts path is typically
%APPDATA%\Python\PythonXX\Scripts— add it to your PATH environment variable. - Restart your terminal and try again.
Q: Installation succeeds but horn prints an error about SAPI.
- Open Windows Settings → Time & Language → Speech and confirm the speech service is enabled.
- Try running the Windows built-in TTS test: Narrator or Windows Speech Recognition.
- Restart the Windows Audio service:
services.msc → Windows Audio → Restart.
No sound
Q: horn runs without errors but I hear nothing.
- Check your system volume — make sure it is not muted or set to 0.
- If using headphones or external speakers, confirm the correct output device is selected in Windows Sound settings.
- Run
hornin a terminal and watch for any stderr output that might indicate a silent failure.
Q: I hear sound but it is very quiet.
- The default volume is 100. If you have a
horn.yamlconfig file, check thevolumefield. - Also check the Windows per-app volume mixer —
horn.exemay have its own level set lower.
Q: The voice cuts off mid-sentence.
- This may be caused by the 5-second playback timeout. The Chinese phrases are short and should finish well within 5 seconds under normal conditions.
- If your system is under heavy load, the TTS engine may be slow — try closing other applications.
Cursor Rules not triggering
Q: Agent completes a task but I hear no voice notification.
- Confirm
horn.mdcis in the correct directory:.cursor/rules/horn.mdc(project-level) or Cursor's global Rules directory. - Verify the
horncommand is available in the terminal Cursor uses: open Cursor's integrated terminal and runhorn. - In Cursor Settings, check that the Rules file is being loaded (look for it under Rules for AI).
Q: Agent triggers horn --start but never triggers horn --done.
- This is a Cursor agent behavior issue, not a Horn issue. The agent may have stopped following the Rules mid-task.
- Try re-stating the task and explicitly remind the agent: "Remember to call horn --done when finished."
- Check if the Rules file uses
alwaysApply: truein the front-matter — this ensures the rule is always active.
Q: Agent calls horn too frequently or at unexpected times.
- Review your
horn.mdcrules — make sure the trigger conditions are clearly scoped to task start, completion, and confirmation only. - Use Cursor's Rules management UI to disable and re-enable the rule to force a reload.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mahorn-0.1.0.tar.gz.
File metadata
- Download URL: mahorn-0.1.0.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85c2a93de5c61320b5a818910a3f60948d6184d5af265fe5e0a4d8afb0c8ae54
|
|
| MD5 |
5193577ba1f85b435ecaea93d78d0b26
|
|
| BLAKE2b-256 |
05164a852c5c4c2ac6acdc1b7405c52192c9c8326fcd3e549eacac9d74031e09
|
File details
Details for the file mahorn-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mahorn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f43132da6f6046b6e51f761c547b8614975333dee2d26b4c3d2bb423ed7a0cf4
|
|
| MD5 |
e8b3388659ae2bd0e1c373be6524c19b
|
|
| BLAKE2b-256 |
32a9461c28451806e768b04d745dc5c149d97e290502735b0f1f05f3f70e64cc
|