notion-cli
Use the Notion CLI (`ntn`) to interact with the Notion API, manage workers, and upload files. Use when the user asks to "call the Notion API", "deploy a worker", "upload a file to Notion", "create a page", "query a database", or any task involving the `ntn` command.
Security Assessment
Detected risks:
About notion-cli
The notion-cli skill provides a command-line interface for interacting with the Notion API, allowing users to automate and manage various Notion tasks efficiently. It addresses the challenge of manually performing operations within Notion by providing a programmable interface that supports API calls, file uploads, worker management, and content creation. This skill is particularly useful for developers and technical users who want to integrate Notion workflows into scripts or automation pipelines.
The main features of notion-cli include querying and interacting with the Notion API via the `ntn api` command, managing pages and comments with Markdown support, uploading and retrieving files through `ntn files`, and handling worker deployment and execution with `ntn workers`. The CLI is self-documenting, providing commands to list API endpoints, view documentation, and inspect OpenAPI specifications. It also supports flexible authentication using the `NOTION_API_TOKEN` environment variable or interactive login. The skill emphasizes Markdown for formatting page content and comments, while still allowing rich text for advanced features such as mentions and custom emoji.
Typical use cases include creating or updating pages programmatically, uploading media assets, executing automated worker tasks, and querying databases for reporting or integration purposes. Target users are developers, DevOps engineers, or advanced Notion users who need reliable, scriptable access to Notion features. It is also suitable for teams looking to streamline collaboration and automate repetitive tasks in their Notion workspace.
FAQ
How do I authenticate the CLI with Notion?
The CLI uses the NOTION_API_TOKEN environment variable automatically. If this is not set, you can log in interactively using `ntn login`, which requires visiting a URL in a web browser.
Can I upload files directly from a URL?
Yes, you can use `ntn files create --external-url <URL>` to upload files hosted externally to Notion.
How do I create a page with formatted content?
Use `ntn pages create` with the `--content` option to include Markdown-formatted content. Markdown supports headings, links, bold, italic, and code formatting.
Is the CLI compatible with all Notion API endpoints?
Yes, you can list all public API endpoints with `ntn api ls` and inspect individual endpoints using `ntn api <path> --help` or `--docs`.
Can I manage and deploy Notion workers using this CLI?
Yes, the `ntn workers` commands allow you to scaffold new projects, deploy workers, list existing workers, and execute capabilities.
Install notion-cli
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
makenotion/skills