用途:在 Notion 与 Obsidian 之间同步内容,并可为长页面生成 AI 摘要。主要能力:pull 可从 Notion 拉取配置好的页面和数据库到仓库,支持按页面名、按数据库、强制重同步和跳过 AI 摘要;push 可将仓库笔记推送到指定 Notion 数据库,并可自定义标题;status 查看同步状态。用法:所有命令需在项目目录 ~/Development/hikmaAI/automation/hikmaai_notion_obsidian_sync 下运行,例如 uv run hikma-sync pull、uv run hikma-sync pull --page "Local dev"、uv run hikma-sync pull --db "Product Requirements"、uv run hikma-sync pull --force、uv run hikma-sync pull --no-ai、uv run hikma-sync push --note "Projects/HikmaAI/Notion/My Note" --to "Engineering Wiki"、uv run hikma-sync status。页面与数据库在 config.yaml 中配置,新增条目需填入 Notion UUID,数据库可设 sync_items: true 同步单个页面。适用场景:把 Notion 页面或数据库同步到 Obsidian 仓库、将本地笔记回推到 Notion。限制:缺少 .env 中的 NOTION_TOKEN 或 ANTHROPIC_API_KEY 会报错;数据库 404 需检查 UUID 和集成权限;Obsidian 未运行时 CLI 写入可能失败,但有文件系统回退;页面不足 2000 字或使用 --no-ai 时不生成 AI 摘要。
notion-sync
办公与效率
更新于 10-16 06:45