微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📝

终端级 Apple Notes 管理器

managing-apple-notes · vv1.0.1
办公 安全 S 级 作者 wangwalk 公开目录收录
1.2k 下载 516 安装 2.6k 收藏 5.2k 浏览

简介

基于开源 inotes CLI 的 macOS 笔记管理方案,通过 AppleScript 本地操作 Notes.app,实现命令行批量管理与数据导出,全程离线运行保障隐私。

原始描述

Manage Apple Notes from the terminal using the inotes CLI. Use when asked to list, read, create, edit, delete, or search notes in Notes.app on macOS.

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/managing-apple-notes/
其它 Agent解压到它自己的 skills 目录,目录名用 managing-apple-notes

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

中文使用说明 来自收录源

核心用法

managing-apple-notes 是一个面向 macOS 用户的文档型 Skill,指导用户通过 inotes CLI 工具在终端中管理 Apple Notes。用户需先通过 Homebrew 或 GitHub Releases 安装 inotes 二进制文件,并授予终端应用 macOS Automation 权限以访问 Notes.app。该工具支持完整的 CRUD 操作:列出笔记(支持按时间、文件夹筛选)、读取内容、创建新笔记、编辑标题/正文/文件夹、删除笔记(默认带确认),以及全文搜索功能。同时支持多账户切换(iCloud、Exchange 等)、文件夹管理,并可输出为 JSON、Plain 等机器可读格式,便于与其他工具链集成。

显著优点

该方案的最大优势在于隐私与安全的本地架构。inotes 完全通过 AppleScript 与系统原生 Notes.app 通信,所有操作均在本地完成,不产生任何网络请求,确保敏感笔记数据不会离开用户设备。其次,开源可审计(MIT 许可证)降低了后门风险,用户可审查源码或自行编译。命令行界面提供了 GUI 无法比拟的批量处理能力,支持结合 shell 脚本实现自动化备份(如导出所有笔记为 JSON)、批量归档或标签化管理。此外,作为 Universal Binary,它同时支持 Apple Silicon 和 Intel 架构,兼容性良好。

潜在缺点与局限性

主要限制在于平台锁定:仅支持 macOS 14 (Sonoma) 及以上系统,Windows 和 Linux 用户无法使用。其次,依赖管理成本较高,用户需自行安装并维护 inotes 二进制文件,且该工具由个人开发者维护(T3 来源),长期维护稳定性不及商业软件。功能层面,基于 AppleScript 的实现可能在处理超大规模笔记库时出现性能瓶颈,且部分 Notes.app 高级功能(如复杂格式、附件管理)支持有限。最后,系统权限门槛可能劝退普通用户——需要在系统设置中手动授权 Automation 权限。

适合的目标群体

该 Skill 最适合macOS 高级用户和开发者群体,特别是习惯使用终端、追求效率的极客用户。对于需要定期备份笔记数据(如导出为 JSON 存档)、批量整理笔记(如批量移动、标签归类)或将笔记集成到自动化工作流(结合 cron、Alfred、Hammerspoon 等工具)的用户尤为实用。同时,对数据隐私极度敏感、不愿使用云端第三方笔记服务的用户,可通过此工具实现本地化的笔记数据管理闭环。

使用风险

首要风险来自第三方二进制依赖:尽管 inotes 开源,但用户通过 Homebrew 安装的二进制仍需谨慎验证 SHA256 校验值,以防供应链攻击。其次,权限风险:授予终端 Automation 权限意味着脚本可能未经明确提示即可操作 Notes.app,若终端被恶意脚本控制,可能导致笔记数据被读取或篡改。操作层面,虽然删除默认需要确认,但使用 --force 标志会跳过确认,存在误删风险。最后,由于工具较新(v0.1.2),可能存在未发现的边界情况 Bug,建议关键操作前先行备份。

技能正文


name: managing-apple-notes description: "Manage Apple Notes from the terminal using the inotes CLI. Use when asked to list, read, create, edit, delete, or search notes in Notes.app on macOS." homepage: https://github.com/wangwalk/inotes url: https://github.com/wangwalk/inotes emoji: 📝 metadata: clawdbot: os: ["darwin"] requires: bins: ["inotes"] install: - "brew install wangwalk/tap/inotes" cliHelp: | inotes --version inotes status

Managing Apple Notes with inotes

inotes is a macOS CLI for Apple Notes. It communicates with Notes.app via AppleScript and supports all CRUD operations plus search. Output defaults to a human-readable table; use --json for machine-readable output.

🔒 Privacy & Security

  • ✅ Open source: Full source code at https://github.com/wangwalk/inotes
  • ✅ Local-only: All operations run locally via AppleScript; no data leaves your machine
  • ✅ No network calls: inotes does not connect to any remote servers
  • ✅ Auditable install: Binary installed via Homebrew from signed release or GitHub Releases
  • ✅ MIT Licensed: Free and open for inspection and contributions
  • ⚠️ Requires macOS Automation permission for Notes.app (user grants via System Settings)
  • 📦 Universal binary: Supports both Apple Silicon (arm64) and Intel (x86_64)

Prerequisites

System Requirements:

  • macOS 14+ (Sonoma or later)
  • Apple Notes.app (comes with macOS)

Install via Homebrew (recommended):

brew install wangwalk/tap/inotes

Verify installation:

inotes --version  # Should show: 0.1.2
which inotes      # Should be in /opt/homebrew/bin/ or /usr/local/bin/

Manual installation from GitHub Releases:

Download from GitHub Releases and verify SHA256:

curl -LO https://github.com/wangwalk/inotes/releases/download/v0.1.2/inotes-0.1.2-universal-apple-darwin.tar.gz
# Verify checksum from release notes
tar xzf inotes-0.1.2-universal-apple-darwin.tar.gz
sudo cp inotes /usr/local/bin/
sudo chmod +x /usr/local/bin/inotes

Check permission:

inotes status

If permission is denied, the user must enable Automation access for their terminal in System Settings > Privacy & Security > Automation > Notes.

Commands

List notes

inotes                            # recent iCloud notes (default)
inotes today                      # modified today
inotes show week                  # modified this week
inotes show all                   # all notes
inotes show --folder Work         # notes in a specific folder
inotes show recent --limit 10    # limit results

List folders

inotes folders

List accounts

inotes accounts

Create a folder

inotes mkfolder "Projects"
inotes mkfolder "Work Notes" --account Exchange

Read a note

inotes read 1        # by index from last show output
inotes read A3F2     # by ID prefix (4+ characters)

Create a note

inotes add --title "Meeting Notes" --body "Action items" --folder Work

Edit a note

inotes edit 1 --title "Updated Title"
inotes edit 2 --body "New content" --folder Projects

Delete a note

inotes delete 1              # with confirmation
inotes delete 1 --force      # skip confirmation

Search notes

inotes search "quarterly review"
inotes search "TODO" --folder Work --limit 10

Multi-account support

By default only iCloud notes are shown. Use --account <name> or --all-accounts to access other accounts.

inotes accounts                    # list available accounts
inotes show all --account Exchange
inotes show all --all-accounts

Output formats

Flag Description
(default) Human-readable table
--json / -j JSON
--plain Tab-separated
--quiet / -q Count only

Agent usage guidelines

  • Always use --json when you need to parse output programmatically.
  • Use --no-input to disable interactive prompts in non-interactive contexts.
  • Use --no-color when capturing output to avoid ANSI escape sequences.
  • Identify notes by index (from the last show output) or by ID prefix (first 4+ hex characters of the note ID).
  • Run inotes status first to verify automation permission before attempting other commands.
  • The CLI automatically filters out notes in "Recently Deleted" folders across all supported languages.

Examples for common tasks

Create daily note:

inotes add --title "Daily Notes $(date +%Y-%m-%d)" --body "## TODO\n\n## Done\n"

Export all notes to JSON:

inotes show all --json > notes-backup.json

Find notes with specific tag:

inotes search "#important" --json | jq '.[] | select(.folder == "Work")'

Archive completed notes:

inotes search "DONE" --folder Inbox --json | jq -r '.[].id' | while read id; do
  inotes edit "$id" --folder Archive
done

Troubleshooting

"Automation permission denied"

  • Go to System Settings > Privacy & Security > Automation
  • Find your terminal app (e.g., Terminal.app, iTerm.app)
  • Enable access to "Notes"

"Command not found"

  • Run which inotes to check if it's in your PATH
  • If using Homebrew: brew doctor and check for warnings
  • Try brew reinstall wangwalk/tap/inotes

"Note not found" when using index

  • Run inotes show again to get fresh indices
  • Use ID prefix instead: inotes read A3F2

Performance issues with many notes

  • Use --limit flag to reduce result set
  • Filter by folder: --folder "Work"
  • Use date filters: today, week, recent

Additional resources

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

productivitydocsmacoscliautomation

同类 Skill