Skip to content

Add reusable multi-term Apple Notes search command #2

@vinitu

Description

@vinitu

Problem

Searching Apple Notes currently requires writing ad-hoc AppleScript for each query. Multi-term searches such as Kia Cerato, kia, cerato, Киа, Церато are repetitive and easy to get wrong.

Desired behavior

Add a reusable search command that accepts multiple terms and searches both note titles and note plaintext.

Example CLI:

scripts/commands/search.sh --term "Kia" --term "Cerato" --term "Киа" --term "Церато"

Optional simpler form:

scripts/commands/search.sh "Kia" "Cerato" "Киа" "Церато"

Expected output should include one row per matching note:

NAME	CREATED	MODIFIED	ID	MATCHED_TERMS	PREVIEW
📅 #timeline / Kia Cerato Koup	2019-10-22	2026-01-09	x-coredata://.../ICNote/p101	Kia,Cerato	2017-08-09 - 81857 - замена тормозных колодок...

Implementation notes

  • Prefer AppleScript via osascript, consistent with the current skill.
  • Support searching by title and plaintext.
  • Accept arbitrary number of terms.
  • Return tab-separated output for easy parsing.
  • Escape quotes and special characters safely before passing terms into AppleScript.

Acceptance criteria

  • scripts/commands/search.sh Kia Cerato finds a note whose title contains Kia Cerato.
  • scripts/commands/search.sh Cerato finds notes where only the body contains Cerato.
  • Multiple matched terms are reported in MATCHED_TERMS.
  • The command is documented in SKILL.md with examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions