SuperAPI AI 工具集

notion

数据与分析

查看项目

更新于 10-16 00:01

技能介绍

用途:在命令行管理 Notion 工作区,支持搜索、查看、创建、编辑页面与数据库条目,以及管理评论。基于 Notion 远程 MCP 服务器,部分功能回退使用官方 API。

安装与认证:命令需在 PATH 中,检查用 notion-cli version;未安装可执行 go install github.com/lox/notion-cli@latest。首次使用 OAuth 打开浏览器授权:notion-cli auth login。CI/无头环境可设置 NOTION_ACCESS_TOKEN;API 回退功能需 notion-cli auth api setup 或设置 NOTION_API_TOKEN。

多账户:所有命令接受 --profile <name> 或 NOTION_CLI_PROFILE 指定账户,凭据隔离存放;优先级为 --profile > 环境变量 > auth use 默认 > 隐式默认。

主要命令:auth、page、db、search、comment、tools。page 支持 list、view、create、upload、edit、archive、sync;db 支持 list、query、create;comment 支持 list、create。多数命令支持 --json 输出,page view 支持 --no-comments、--raw。

常用示例:notion-cli search "meeting notes";notion-cli page view <page>;notion-cli page create --title "New Page";notion-cli page sync ./document.md;notion-cli db query <id>;notion-cli comment create <page> --content "..."。

限制:page edit 的三种模式互斥;定向编辑失败时可改用 --replace 全量替换。本地图片需单独成行才会上传,行内或混合语法被拒绝。page archive 依赖 API 回退路径,需先配置。未提供平台、收费与价格信息。