Apple Notes
使用 memo 從終端機直接管理 Apple Notes。筆記會透過 iCloud 在所有 Apple 裝置間同步。
先決條件
- macOS 並安裝 Notes.app
- 安裝:
brew tap antoniorodr/memo && brew install antoniorodr/memo/memo - 在提示時授予 Notes.app 的自動化權限(系統設定 → 隱私權與安全性 → 自動化)
使用時機
- 使用者要求建立、檢視或搜尋 Apple Notes
- 將資訊儲存到 Notes.app 以便跨裝置存取
- 將筆記整理到資料夾中
- 將筆記匯出為 Markdown/HTML
不應使用的時機
- Obsidian 筆記庫管理 → 使用
obsidian技能 - Bear Notes → 不同應用程式(此處不支援)
- 僅限助理使用的快速筆記 → 使用
memory工具
快速參考
檢視筆記
memo notes # 列出所有筆記
memo notes -f "資料夾名稱" # 依資料夾篩選
memo notes -s "查詢" # 搜尋筆記(模糊搜尋)
建立筆記
memo notes -a # 新增筆記(開啟 $EDITOR)
memo notes -a -f "資料夾名稱" # 在特定資料夾中新增筆記
-a/--add 是裸旗標 — 它會開啟你的 $EDITOR 來撰寫筆記;不會接受標題參數。使用 -f/--folder 來指定目標資料夾。建議先設定 $EDITOR(例如 export EDITOR=vim)。
編輯筆記
memo notes -e # 互動式選擇以編輯
刪除筆記
memo notes -d # 互動式選擇以刪除
移動筆記
memo notes -m # 移動筆記到資料夾(互動式)
匯出筆記
memo notes -ex # 匯出為 HTML/Markdown
限制
- 無法編輯包含圖片或附件的筆記
- 互動式提示需要終端機存取(必要時使用 pty=true)
- 僅限 macOS — 需要 Apple Notes.app
規則
- 當使用者需要跨裝置同步(iPhone/iPad/Mac)時,優先使用 Apple Notes
- 對於不需要同步的助理內部筆記,使用
memory工具 - 對於 Markdown 原生的知識管理,使用
obsidian技能