Generated banner for Notion CLI
Generated logo for Notion CLI

Notion CLI

NotionOfficialPublished by Notion

  • Skill
  • Tool integration
  • Automation and integrations
  • MIT
  • Medium risk

From the author

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.
— the description by Notion

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

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/makenotion/notion-cli/download
  2. Unzip 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 | bash

Authentication

  • The CLI automatically uses NOTION_API_TOKEN when it is set.

  • Check NOTION_API_TOKEN first. If it is already set, prefer using it instead of telling the user to run ntn login.

  • ntn login / ntn logout — log the CLI in or out (only use if not using NOTION_API_TOKEN). ntn login requires 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 capability

Files

LICENSE.md

MIT License

Copyright (c) 2026 Notion Labs, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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 or Notion.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download notion-cli.zip