yourturn

agent
Security Audit
Fail
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Fail
  • spawnSync — Synchronous process spawning in npm/yourturn/bin/yourturn.js
  • rm -rf — Recursive force deletion command in scripts/publish.sh
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Plays a sound when your AI coding agent stops and it is your turn. Works with Claude Code and Codex.

README.md

yourturn logo

yourturn

Plays a sound when your AI coding agent stops and it is your turn.

CI npm crates.io MIT license

See yourturn in action

https://github.com/user-attachments/assets/a6289f40-0723-4f50-9722-468d9c790058

You give Claude Code or Codex a task, switch to something else, and forget to check back. yourturn plays a sound and shows a notification the moment the agent is done or needs you.

Use any sound you like: a short ding, a movie quote, a whole song. Give every project its own sound and you can hear which agent finished without looking.

npm install -g yourturn
yourturn install

That is all. From now on you hear a chime when an agent is done, and a different one when it needs you. No sound files to find, nothing to configure. When you want to, make it yours:

yourturn sound done ~/Music/victory.mp3

Features

  • Works out of the box: a chime when the agent is done, a knock when it needs you. Nothing to configure.
  • Five built-in sounds to pick by name: a lion, a gong, a rooster, applause and the Wilhelm scream.
  • Your own audio files: mp3, wav, flac, ogg (Vorbis), m4a (AAC) and aiff. Decoding is built in, so it behaves the same on every machine.
  • A sound per project: hear which agent finished.
  • Songs work: a long track plays in the background and fades out when you send your next prompt. By default a sound stops after 30 seconds; set max_seconds = 0 to let it play to the end.
  • Several agents at once: sounds take turns instead of playing over each other.
  • A folder of sounds: point an event at a folder and it picks one at random.
  • Desktop notification with the agent and project name.
  • One small binary (under 3 MB). No Python, no afplay, no PowerShell, no background service.
Agent Finished Asks for permission or asks you a question
Claude Code yes yes
Codex (CLI and app) yes yes

Tested on macOS. Linux is untested. Windows is not supported yet.

Install

With npm (downloads a prebuilt binary; needs Node.js 18 or newer):

npm install -g yourturn

With Cargo (builds from source, needs Rust; on Linux also libasound2-dev):

cargo install yourturn

Then connect your agents:

yourturn install            # every agent found on this machine
yourturn install claude     # or just one: claude, codex

It works right away with built-in sounds; you do not have to pick one.

Codex only: Codex runs a hook after you approve it. Type /hooks in the Codex CLI, or open Settings > Hooks in the Codex app, and trust the three yourturn hooks.

Check that it works:

yourturn test

You should hear two rising notes and see a notification. Agent sessions that are already open normally pick the hooks up by themselves; if one stays silent, restart it.

Use npm install -g, not npx. The hooks point at the installed binary, and the npx cache is temporary. If you switch Node versions with nvm, fnm or volta, the global folder moves: run yourturn install <agent> again.

Choose your sounds

yourturn sound done ~/Music/victory.mp3      # one file
yourturn sound done ~/Music/done-songs       # a folder: random pick
yourturn sound attention ~/Sounds/hey.wav    # when the agent needs you
yourturn sound done lion                     # a built-in sound
yourturn sound done glass                    # one of your computer's own sounds
yourturn sound done default                  # back to the default

There are three kinds of sound you can name:

Kind Examples Where it comes from
Built in lion, gong, rooster, applause, scream Ships inside yourturn, works on every machine
System glass, funk, hero, submarine on macOS Your operating system's own alert sounds; yourturn only plays them
Your own any path to an mp3, wav, flac, ogg, m4a or aiff A file on your machine

yourturn sounds lists the built-in and system sounds found on your machine, and yourturn play lion lets you hear one first.

A different sound per project:

cd ~/code/shop && yourturn sound done ~/Music/shop.mp3 --here
yourturn sound done ~/Music/blog.mp3 --project ~/code/blog

A project sound applies to that folder and everything inside it. An event the project does not set uses the general sound. When several agents finish close together, their sounds play one after another.

Use your own sound

  1. Get an audio file: something you recorded, downloaded, or cut from a clip (below).
  2. Point yourturn at it: yourturn sound done ~/Downloads/my-sound.mp3
  3. Hear it: yourturn test

That is the whole setup. Add --here to use it only for the project in the current folder.

Cut a sound out of any clip

Any mp3 works, so a line from a film, a goal commentary or two seconds of a song can be your "done" sound. With ffmpeg, cut the part you want out of a file you have:

# from 0:07 to 0:13 of clip.mp4, as an mp3
ffmpeg -i clip.mp4 -ss 7 -to 13 -vn ~/Music/my-sound.mp3
yourturn sound done ~/Music/my-sound.mp3

Sounds you add stay on your machine; yourturn never uploads anything.

Want something else? Wikimedia Commons and Freesound have many sounds under free licenses. The recorded built-in sounds come from there too; see CREDITS.md.

Commands

Command What it does
yourturn install [agent] Connect every agent found, or one (claude, codex)
yourturn uninstall [agent] Disconnect one agent, or all of them
yourturn sound <event> <path or name> Set a sound. Add --here or --project <folder> for one project
yourturn sounds List the built-in and system sounds you can use by name
yourturn test [event] Notify and play, as if an agent in this folder stopped
yourturn play <file or name> Just play a sound
yourturn stop Silence whatever yourturn is playing
yourturn status Show settings and recent activity

Events: done (the agent finished) and attention (the agent asks for permission or asks you a question).

Settings

~/.config/yourturn/config.toml:

volume = 0.8        # 0.0 to 1.0
max_seconds = 30    # stop a sound after this long; 0 plays to the end
notify = true       # desktop notification
sound = true        # play a sound

[sounds]
done = "/Users/you/Music/victory.mp3"
attention = "/Users/you/Sounds/hey.wav"

[[project]]
path = "/Users/you/code/shop"
done = "/Users/you/Music/shop.mp3"

yourturn sound rewrites this file, so comments you add to it are not kept. A misspelled setting is reported by yourturn status; hooks then carry on with the defaults.

How it works

Agents have hook systems: they run a command when something happens. yourturn install registers a few hooks:

Agent event yourturn does
The agent stops plays the done sound, notifies
The agent asks for permission or asks a question plays the attention sound, notifies
You send a prompt silences that session's sound

The hook command starts a detached player and returns in about 10 ms, so the agent never waits. It prints nothing, because agents may feed a hook's output to the model.

Only one player uses the speakers at a time. A player that finds them busy waits its turn; if the current sound has played for 15 seconds, the next one takes over, so a long song cannot block another agent.

What install changes on your machine

  • Claude Code: four entries under hooks in ~/.claude/settings.json.
  • Codex: three entries under hooks in ~/.codex/hooks.json.

Every other setting in those files is kept, in the same order, and only yourturn's own hook commands are ever removed. The file is written back as standard JSON, so its indentation may change. Before yourturn is first added it writes a backup next to the file (*.yourturn-backup). That backup is a full copy, so treat it like the original if your settings hold secrets.

yourturn's own files live in ~/.config/yourturn/ (settings, a log of hook calls, and small state files). It makes no network requests and collects nothing.

Troubleshooting

yourturn status shows the settings, which agents are connected, and the last hook calls. Every call is logged to ~/.config/yourturn/yourturn.log with the folder the agent reported and which rule chose the sound.

  • No sound from Codex: trust the hooks (see Install).
  • It stopped working after a Node upgrade: run yourturn install <agent> again; yourturn status tells you when a hook points at a missing file.
  • Wrong sound for a project: compare the cwd in the log with the project folder you set.
  • A file will not play: yourturn sound tells you when it cannot decode a file. Opus and Apple Lossless are not supported; convert the file to mp3.
  • No notification on macOS: allow notifications for Script Editor in System Settings > Notifications. Installing terminal-notifier makes yourturn use that instead.

Uninstall

yourturn uninstall                # disconnects every agent
npm uninstall -g yourturn        # or: cargo uninstall yourturn
rm -rf ~/.config/yourturn
rm -f ~/.claude/settings.json.yourturn-backup ~/.codex/hooks.json.yourturn-backup

Roadmap

  • Linux and Windows
  • Gemini CLI and Cursor
  • A menu bar app for the settings

Contributing

See CONTRIBUTING.md. Security reports: SECURITY.md.

License

MIT

Reviews (0)

No results found