Apple Notes CLI
使用 memo notes 直接從終端機管理 Apple Notes。可建立、檢視、編輯、刪除、搜尋、在資料夾之間移動筆記,並匯出為 HTML/Markdown。
設定
- 安裝 (Homebrew):
brew tap antoniorodr/memo && brew install antoniorodr/memo/memo - 手動安裝 (pip):
pip install .(在複製儲存庫後執行) - 僅限 macOS;若提示,請授予 Apple Notes.app 的自動化權限。
檢視筆記
- 列出所有筆記:
memo notes - 依資料夾篩選:
memo notes -f "資料夾名稱" - 搜尋筆記(模糊搜尋):
memo notes -s "查詢"
建立筆記
- 新增筆記:
memo notes -a- 開啟互動式編輯器以撰寫筆記。
- 快速新增含標題:
memo notes -a "筆記標題"
編輯筆記
- 編輯現有筆記:
memo notes -e- 互動式選擇要編輯的筆記。
刪除筆記
- 刪除筆記:
memo notes -d- 互動式選擇要刪除的筆記。
移動筆記
- 將筆記移至資料夾:
memo notes -m- 互動式選擇筆記與目標資料夾。
匯出筆記
- 匯出為 HTML/Markdown:
memo notes -ex- 匯出選取的筆記;使用 Mistune 處理 Markdown。
限制
- 無法編輯包含圖片或附件的筆記。
- 互動式提示可能需要終端機存取權限。
備註
- 僅限 macOS。
- 需要能存取 Apple Notes.app。
- 若要自動化,請在「系統設定」>「隱私權與安全性」>「自動化」中授予權限。