Hope hook has anki's support

Hope to have the hooks to really support, currently has a plug-in (https://ankiweb.net/shared/info/1420819673) in the Windows implements this function, so I think it can realize the hook, Such as anki connect plug-in or ccid or nnid

in anki each card and note have a unique id (which anki internally refers to as cid and nid respectively).

the addon AnkiConnect allows external software send information or trigger some actions in Anki.

There are some published scripts that rely on AnkiConnect, e.g. glutanimate’s python script anki-cli-remote which can open the browser with custom searches (and you can search for card/note ids ([Searching - Anki Manual

For MacOS you could google for “applescript ankiconnet”
This is an explanation from the anki forum, I feel hook developers should be able to make it, I can’t program, I really want to have this feature, but I can’t, good pain!