Skip to main content

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.

  1. Make sure you are running Python 3.8 or higher: python --version
  2. Upgrade pip first: python -m pip install --upgrade pip
  3. If you see a pywin32 error, install it manually: pip install pywin32

Q: horn command is not found after installation.

  1. Check that Python's Scripts folder is in your PATH: python -m site --user-site
  2. On Windows, the Scripts path is typically %APPDATA%\Python\PythonXX\Scripts — add it to your PATH environment variable.
  3. Restart your terminal and try again.

Q: Installation succeeds but horn prints an error about SAPI.

  1. Open Windows Settings → Time & Language → Speech and confirm the speech service is enabled.
  2. Try running the Windows built-in TTS test: Narrator or Windows Speech Recognition.
  3. Restart the Windows Audio service: services.msc → Windows Audio → Restart.

No sound

Q: horn runs without errors but I hear nothing.

  1. Check your system volume — make sure it is not muted or set to 0.
  2. If using headphones or external speakers, confirm the correct output device is selected in Windows Sound settings.
  3. Run horn in a terminal and watch for any stderr output that might indicate a silent failure.

Q: I hear sound but it is very quiet.

  1. The default volume is 100. If you have a horn.yaml config file, check the volume field.
  2. Also check the Windows per-app volume mixer — horn.exe may have its own level set lower.

Q: The voice cuts off mid-sentence.

  1. 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.
  2. 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.

  1. Confirm horn.mdc is in the correct directory: .cursor/rules/horn.mdc (project-level) or Cursor's global Rules directory.
  2. Verify the horn command is available in the terminal Cursor uses: open Cursor's integrated terminal and run horn.
  3. 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.

  1. This is a Cursor agent behavior issue, not a Horn issue. The agent may have stopped following the Rules mid-task.
  2. Try re-stating the task and explicitly remind the agent: "Remember to call horn --done when finished."
  3. Check if the Rules file uses alwaysApply: true in the front-matter — this ensures the rule is always active.

Q: Agent calls horn too frequently or at unexpected times.

  1. Review your horn.mdc rules — make sure the trigger conditions are clearly scoped to task start, completion, and confirmation only.
  2. Use Cursor's Rules management UI to disable and re-enable the rule to force a reload.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mahorn-0.1.0.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mahorn-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for mahorn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85c2a93de5c61320b5a818910a3f60948d6184d5af265fe5e0a4d8afb0c8ae54
MD5 5193577ba1f85b435ecaea93d78d0b26
BLAKE2b-256 05164a852c5c4c2ac6acdc1b7405c52192c9c8326fcd3e549eacac9d74031e09

See more details on using hashes here.

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

Hashes for mahorn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f43132da6f6046b6e51f761c547b8614975333dee2d26b4c3d2bb423ed7a0cf4
MD5 e8b3388659ae2bd0e1c373be6524c19b
BLAKE2b-256 32a9461c28451806e768b04d745dc5c149d97e290502735b0f1f05f3f70e64cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page