Skip to main content

hookjump

Press a hotkey while a song plays in Spotify on macOS, and playback jumps to the best part of the song: the part you pinned, or the part you keep going back to.

Status: an early release, used daily on its author's Mac (Apple Silicon); see Compatibility for what has and has not been tried.

How it finds "the best part"

  1. Your pick: while a song plays in the background, press ⌥D to pin that spot (a chorus, a verse you love, a solo), or type a time such as 1:23. A pinned spot always wins.
  2. Your own listening: hookjump notes, on your Mac only, where you rewind to and where you skip to. Once the same place comes up in two different listens, ⌥F jumps there. Listening without touching anything teaches it nothing, and its own jumps never count.

When there is nothing to jump to, hookjump says so instead of jumping somewhere random.

Install

You need:

  • macOS 13 or later, and the Spotify desktop app (not the web player);
  • Python 3.10 or later. The python3 that comes with macOS is 3.9, too old; the steps below get a newer one through Homebrew;
  • for hookjump.app (open at login, permission in hookjump's own name): Apple's Command Line Tools. If you use Homebrew you already have them.
brew install pipx
pipx ensurepath          # then open a new terminal
pipx install hookjump
hookjump install         # builds ~/Applications/hookjump.app
open ~/Applications/hookjump.app

pipx gives hookjump a Python environment of its own, so nothing it needs mixes with your other tools, and pipx uninstall removes all of it. uv tool install hookjump does the same, if you use uv. The version in development: pipx install git+https://github.com/turhanGoksu/hookjump.

hookjump install compiles a small launcher from its C source on your Mac (launcher.c, about 100 lines), so no prebuilt binary is ever downloaded. Then choose Open at Login in the hook's menu to start hookjump with your Mac.

Without the Command Line Tools, hookjump install says how to get them (xcode-select --install). Until then, hookjump run in a terminal does the same, for as long as the terminal stays open.

Using it

A hook sits in the menu bar. It carries bait when hookjump knows a spot in the playing song, is empty when it does not yet, and fades while learning is paused.

Keys
⌥F jump to the best part (it lands 1.5 s early, so you hear the start)
⌥D pin the spot that is playing

After a key, a line opens next to the hook for 3 seconds: ● is where the song is, ◆ where it jumps, ◉ both at once, ✕ nowhere to jump.

Click the hook for its menu. At the top, the song is drawn as a line with what hookjump learned on it: ticks above where you rewound to, ticks below where you skipped to, ◆ the hook, ● playback. Click the line to pin that second. Below it:

  • This Song: pin at a typed time, remove the pin, forget the song, or stop learning from it (a pin still works);
  • Pause Learning;
  • What hookjump Keeps: every song it keeps something about, by name, and what: the pin, the spot it learned, or the seeks so far. Songs kept by 0.1 get their name the next time they play: Spotify names only the playing song, and hookjump does not go online to ask;
  • Open at Login;
  • Shortcuts: change ⌥F and ⌥D. The recorder refuses keys you would miss: ones that type a character on your keyboard (on a Turkish keyboard ⌥Q is @), accent keys, and shortcuts every app uses, such as ⌘C;
  • Delete Everything…

The same jump and pin work from a terminal or any tool that runs commands, such as a keyboard shortcut made in the Shortcuts app:

hookjump jump    # Jumped to 1:43: the part you replay most.
hookjump pin     # Pinned 1:12. The jump lands 1.5 s before it.

Permissions

hookjump asks for one permission: to control Spotify, so it can read which song is playing and where, and move it. macOS asks the first time, in hookjump's name. It needs no Accessibility or Input Monitoring permission: its hotkeys use the same system call as other shortcut apps, which asks for none.

If hookjump runs from a folder macOS protects (Desktop, Documents, Downloads), macOS also asks to let it read that folder. Installing with pipx avoids that.

Privacy

Everything stays on your Mac. hookjump makes no network request at all.

What hookjump keeps, in one file in ~/Library/Application Support/hookjump/:

  • the spots you pin, and your shortcuts;
  • where you rewound or skipped to in each song, for its last 10 listens with such a seek, with no dates or times;
  • the raw playback positions it learns from, deleted after 7 days;
  • the title and artist of the songs any of the above is about, and only those: a song you only listened to is never named. The menu's What hookjump Keeps lists them.

Pause Learning stops all recording; This Song › Forget, and Delete Everything, erase it (deleted data is overwritten, not left in the file). The exact format is in spec/STORAGE.md.

Compatibility

macOS 27, Apple Silicon tried by hand on 27.2: recording, jumps, open at login
macOS 26 (Tahoe), Apple Silicon used daily
macOS 15 (Sequoia), Apple Silicon and Intel automatic tests only
macOS 15.0 and 15.1 these refuse hotkeys with ⌥ alone, so hookjump falls back to ⌃⌥F and ⌃⌥D and says so in its menu
macOS 13 and 14 not tried
Python 3.10 to 3.15 3.10 and 3.15 tested automatically; 3.15 used daily
Spotify 1.3 used daily

The automatic tests run on GitHub's machines with fake players: they check hookjump's own code, not Spotify.

Known limits

  • Spotify on macOS only, through its AppleScript support. Apple Music, Windows and Android are planned, not built.
  • Spotify playing on another device, such as a phone (Spotify Connect): hookjump learns from it and ⌥F moves it, while the Mac is awake with Spotify open. It cannot see what a phone plays offline, and a phone on mobile data has not been confirmed.
  • A pin and what was learned belong to one Spotify track. The single and the album release of a song are separate tracks, so neither carries over.
  • A hotkey another app also uses cannot be detected: macOS lets two apps register the same one. Change hookjump's under Shortcuts if they clash.
  • The recorder treats a letter typed with ⌥ as rare, like ⌥F's ƒ. On keyboards that type their own letters with ⌥ (Polish Pro: ⌥A is ą), it would accept such a key and take that letter away.

Uninstall

hookjump uninstall      # removes hookjump.app, its login item and permission
pipx uninstall hookjump
rm -r ~/Library/Application\ Support/hookjump    # what it learned

Repository layout

  • src/hookjump/core/: the platform-independent algorithms, pure functions using only the Python standard library.
  • src/hookjump/adapters/: storage (SQLite), the Spotify turntable, hotkeys, the keyboard layout.
  • src/hookjump/: the booth that joins them, the menu bar app, the commands.
  • spec/: the algorithms and the storage format in plain language, plus JSON test vectors that every implementation (this one, a future Android one) must pass.
  • android/: the Android app, in progress and not released yet.
  • eval/: the best parts of 20 songs, labeled by hand, and the protocol they were labeled under.

License

Apache-2.0

Metadata

Release files for hookjump 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hookjump 0.2.0
File Size Uploaded Provenance Actions
hookjump-0.2.0.tar.gz 53.0 kB With provenance Details for hookjump-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hookjump 0.2.0
File Interpreter ABI Platform Actions
hookjump-0.2.0-py3-none-any.whl Python 3 none any Details for hookjump-0.2.0-py3-none-any.whl

Total release size: 108.4 kB

Release files / hookjump-0.2.0.tar.gz

Download URL hookjump-0.2.0.tar.gz
Size 53.0 kB
Tags Source
SHA-256 checksum
How to use checksums
29257a236b2e99f5d5f310e88dcaeada81a1c4d35e09ad1826ca4a4b87a05e3d
BLAKE2b-256 checksum
How to use checksums
da277f35ffc8f8f36b8ceed2fe4aa46a589687ca1ea91bf558ef0776cb1f116c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / hookjump-0.2.0-py3-none-any.whl

Download URL hookjump-0.2.0-py3-none-any.whl
Size 55.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8792e63316023d9fdcf7c3f63a516702b74f5e3265c64a565e2e653a4bd56554
BLAKE2b-256 checksum
How to use checksums
7eb785c7ba9cef4f6f7505973c9c59bfa2f4efad125a5437c099758d500195d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for hookjump 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hookjump-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page