{"name":"notion-cli","url":"https://skills.sh/makenotion/skills/notion-cli","install":"npx skills add makenotion/skills --skill notion-cli","sdk":"notion","key":"notion/notion-cli","description":"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.","hasContent":true,"content":"---\nname: notion-cli\ndescription: >-\n  Use the Notion CLI (`ntn`) to interact with the Notion API, manage workers,\n  and upload files. Use when the user asks to \"call the Notion API\", \"deploy a\n  worker\", \"upload a file to Notion\", \"create a page\", \"query a database\", or\n  any task involving the `ntn` command.\n---\n\n# Notion CLI\n\n## Look things up before answering\n\nThe CLI is self-documenting. Always prefer running these commands over guessing\nsyntax or relying on memorized knowledge:\n\n- `ntn api ls` — list every public API endpoint.\n- `ntn api <path> --help` — show methods, doc links, and usage for an endpoint.\n- `ntn api <path> --docs` — print the full official docs for an endpoint.\n- `ntn api <path> --spec` — print a reduced OpenAPI fragment (useful for\n  understanding request/response schemas).\n- `ntn pages get <page-id>` — retrieve a page as Markdown. Use this to read page\n  content.\n- `ntn <command> --help` — help for any command or subcommand.\n\n## Install\n\n```bash\ncurl -fsSL https://ntn.dev | bash\n```\n\n## Authentication\n\n- The CLI automatically uses `NOTION_API_TOKEN` when it is set.\n- Check `NOTION_API_TOKEN` first. If it is already set, prefer using it instead\n  of telling the user to run `ntn login`.\n- `ntn login` / `ntn logout` — log the CLI in or out (only use if not using\n  `NOTION_API_TOKEN`). `ntn login` requires the user to visit a URL in a web\n  browser.\n\n## `ntn api`\n\nRun `ntn api --help` for full syntax. Quick summary:\n\n```bash\n# GET with query param\nntn api v1/users page_size==100\n\n# POST with inline body fields\nntn api v1/pages parent[page_id]=abc123\n\n# POST with JSON body\nntn api v1/pages -d '{\"parent\":{\"page_id\":\"abc123\"}}'\n```\n\nThe method is inferred (GET by default, POST when a body is present). Override\nwith `-X METHOD`.\n\n### Markdown for pages and comments\n\nPrefer `ntn pages create` / `ntn pages update` for Markdown page content. Use\nthe `markdown` field when creating or updating comments via `ntn api`.\n\n```bash\n# Comment with markdown\nntn api v1/comments -d '{\"parent\":{\"page_id\":\"abc123\"},\"markdown\":\"Here is a [link](https://example.com) and **bold text**.\"}'\n\n# Page with markdown body\nntn pages create --parent page:abc123 --content '## Heading\\n\\nSome *formatted* content.'\n```\n\nThe `markdown` field supports inline formatting (bold, italic, code, links, etc.).\nOnly fall back to `rich_text` if you need features that Markdown cannot express (e.g. mentions, custom emoji, or colors).\n\n## `ntn files`\n\nConvenience wrapper around the File Uploads API.\n\n```bash\nntn files create < image.png\nntn files create --external-url https://example.com/photo.png\nntn files list\nntn files get <upload-id>\n```\n\n## `ntn workers`\n\nManage Notion workers (deploy, list, execute, etc.). Run `ntn workers --help`\nfor subcommands.\n\n```bash\nntn workers new my-worker        # scaffold a new project\nntn workers deploy               # deploy from current directory\nntn workers ls                   # list workers\nntn workers exec <capability>    # execute a capability\n```\n","contentSource":"https://raw.githubusercontent.com/makenotion/skills/main/skills/notion-cli/SKILL.md","contentFetchedAt":"2026-07-27T09:00:56.000Z"}