Notion CLI
NotionOfficialPublished by Notion
- Skill
- Tool integration
- Automation and integrations
- MIT
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Notion CLI (ntn) provides a command-line interface for interacting with Notion services. It enables users to perform API operations, manage Notion workers, and upload files directly from their terminal. The tool is designed to be self-documenting, allowing users to explore API endpoints, schemas, and command usage through built-in help and documentation features.
What it does
- Interact with Notion API endpoints using GET and POST requests
- Manage Notion workers including scaffolding, deployment, and execution
- Upload files to Notion via a dedicated file management interface
- Create and update Notion pages using Markdown content
- Retrieve page content as Markdown
- Query Notion databases and list API resources
When to use it
- When you need to automate Notion tasks via the command line
- When deploying or managing Notion workers
- When uploading files or images to Notion programmatically
- When you need to query databases or retrieve page content in Markdown format
- When interacting with Notion API endpoints without a browser
Advantages
- Self-documenting commands reduce the need for external documentation lookups
- Supports Markdown for page and comment content creation
- Simplifies complex API interactions with a streamlined CLI syntax
- Provides convenient wrappers for file uploads and worker management
Usage examples
- “Create a new page in Notion with the title 'Project Notes' and some markdown content.”
- The agent uses the ntn pages create command to generate a new page with the specified content formatted in Markdown.
- “List all my deployed Notion workers.”
- The agent executes ntn workers ls to retrieve and display the list of active workers.
- “Upload this image to Notion.”
- The agent uses ntn files create to upload the file to the Notion File Uploads API.
- “How do I use the v1/users endpoint?”
- The agent runs ntn api v1/users --help to provide the user with the correct usage, methods, and documentation links.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/makenotion/notion-cli/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip notion-cli.zip -d .agents/skills
Documentation by Notion
Notion CLI
Look things up before answering
The CLI is self-documenting. Always prefer running these commands over guessing syntax or relying on memorized knowledge:
ntn api ls— list every public API endpoint.ntn api <path> --help— show methods, doc links, and usage for an endpoint.ntn api <path> --docs— print the full official docs for an endpoint.ntn api <path> --spec— print a reduced OpenAPI fragment (useful for understanding request/response schemas).ntn pages get <page-id>— retrieve a page as Markdown. Use this to read page content.ntn <command> --help— help for any command or subcommand.
Install
curl -fsSL https://ntn.dev | bashAuthentication
The CLI automatically uses
NOTION_API_TOKENwhen it is set.Check
NOTION_API_TOKENfirst. If it is already set, prefer using it instead of telling the user to runntn login.ntn login/ntn logout— log the CLI in or out (only use if not usingNOTION_API_TOKEN).ntn loginrequires the user to visit a URL in a web browser.
ntn api
Run ntn api --help for full syntax. Quick summary:
# GET with query param
ntn api v1/users page_size==100
# POST with inline body fields
ntn api v1/pages parent[page_id]=abc123
# POST with JSON body
ntn api v1/pages -d '{"parent":{"page_id":"abc123"}}'The method is inferred (GET by default, POST when a body is present). Override
with -X METHOD.
Markdown for pages and comments
Prefer ntn pages create / ntn pages update for Markdown page content. Use
the markdown field when creating or updating comments via ntn api.
# Comment with markdown
ntn api v1/comments -d '{"parent":{"page_id":"abc123"},"markdown":"Here is a [link](https://example.com) and **bold text**."}'
# Page with markdown body
ntn pages create --parent page:abc123 --content '## Heading\n\nSome *formatted* content.'The markdown field supports inline formatting (bold, italic, code, links, etc.).
Only fall back to rich_text if you need features that Markdown cannot express (e.g. mentions, custom emoji, or colors).
ntn files
Convenience wrapper around the File Uploads API.
ntn files create < image.png
ntn files create --external-url https://example.com/photo.png
ntn files list
ntn files get <upload-id>ntn workers
Manage Notion workers (deploy, list, execute, etc.). Run ntn workers --help
for subcommands.
ntn workers new my-worker # scaffold a new project
ntn workers deploy # deploy from current directory
ntn workers ls # list workers
ntn workers exec <capability> # execute a capabilityFiles
- ATTRIBUTION.mdAdded by AutoGineer846 B
- LICENSE.md1.0 KiB
- SKILL.md3.0 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs network access
Security
What our scanner noticed· Medium risk
- Instructions that use the network
- Downloads piped into a shell
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Notion
- Publisher
- Notion (Official)
- Source
- makenotion/skills · skills/notion-cli · commit 10e976a
- Licence
- MIT License (redistribution allowed)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Notion.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download notion-cli.zip