Notion CLI (ntn)

GitHub

Notion官方CLI工具,用于身份验证、管理Notion API(创建/查询页面)、文件上传及部署Notion Workers。适用于需要自动化操作Notion数据或部署集成服务的场景。

触发场景

需要创建或查询Notion页面 需要管理Notion数据库 需要上传文件到Notion 需要部署或管理Notion Workers

安装

npx skills add composio-community/awesome-agent-clis --skill Notion CLI (ntn) -g -y
更多选项

非标准路径

npx skills add https://github.com/composio-community/awesome-agent-clis/tree/master/ntn -g -y

不安装直接使用

npx skills use composio-community/awesome-agent-clis@Notion CLI (ntn)

指定 Agent (Claude Code)

npx skills add composio-community/awesome-agent-clis --skill Notion CLI (ntn) -a claude-code -g -y

安装 repo 全部 skill

npx skills add composio-community/awesome-agent-clis --all -g -y

预览 repo 内 skill

npx skills add composio-community/awesome-agent-clis --list

SKILL.md

Frontmatter
{
    "name": "Notion CLI (ntn)",
    "description": "CLI for Notion — authenticate, manage Workers, interact with the Notion API, and upload files. Use when an agent needs to create or query Notion pages, manage databases, upload files to Notion, or deploy Notion Workers."
}

ntn — The Notion CLI

Official Notion CLI for authentication, Workers management, and API access.

Installation

npm i -g ntn

Authentication

ntn login
ntn logout

Key Commands

Notion API

Access the full public Notion API from the terminal. Requires a Notion integration token via NOTION_API_TOKEN.

# List available API endpoints
ntn api ls

# View endpoint spec or docs
ntn api v1/pages --spec -X POST
ntn api v1/pages --docs -X POST

# Create a page
ntn api v1/pages parent[page_id]=abc123

# Query with typed JSON
ntn api v1/pages archived:=true properties[count]:=10

# Query params and headers
ntn api v1/users page_size==100 Accept:application/json

Inline Request Syntax

# Direct JSON body
ntn api v1/pages -d '{"parent":{"page_id":"abc123"}}'

# String assignment
ntn api v1/pages parent[page_id]=abc123

# Typed JSON assignment
ntn api v1/pages archived:=true properties[count]:=10

# Query params
ntn api v1/users page_size==100

# Headers
ntn api v1/users Accept:application/json

Method selection:

  • GET by default
  • POST automatically when body fields are present
  • -X/--method overrides

File Uploads

# Upload a file from stdin
ntn files create < file.png

# Upload from URL
ntn files create --external-url https://example.com/photo.png

# List and inspect uploads
ntn files list
ntn files get <upload-id>

Workers

ntn workers --help
ntn workers list
ntn workers deploy

Environment Variables

  • NOTION_API_TOKEN: Notion integration token (required for ntn api and ntn files commands)

Notes

  • ntn files create is intentionally quiet on success — shows a progress bar only when stderr is a TTY
  • Shell completion can suggest API paths and supported methods
  • Currently in alpha — focused on Workers development workflows

版本历史

  • 9f765d2 当前 2026-07-24 16:03

同 Skill 集合

aws-cli/SKILL.md
coderabbit-cli/SKILL.md
composio-cli/SKILL.md
elevenlabs-cli/SKILL.md
gcloud-cli/SKILL.md
github-cli/SKILL.md
gitlab-cli/SKILL.md
google-workspace-cli/SKILL.md
mailcoach-cli/SKILL.md
neon-cli/SKILL.md
planetscale-cli/SKILL.md
posthog-cli/SKILL.md
railway-cli/SKILL.md
ramp-cli/SKILL.md
remotion-cli/SKILL.md
resend-cli/SKILL.md
sendblue-cli/SKILL.md
sentry-cli/SKILL.md
sonoscli/SKILL.md
stripe-cli/SKILL.md
stripe-projects-cli/SKILL.md
supabase-cli/SKILL.md
tavily-cli/SKILL.md
turso-cli/SKILL.md
vercel-cli/SKILL.md
visa-cli/SKILL.md
wacli/SKILL.md
kapso-cli/SKILL.md

元信息

文件数
0
版本
9f765d2
Hash
853dccbb
收录时间
2026-07-24 16:03

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 07:42
浙ICP备14020137号-1 $访客地图$