| name | notion-cli |
| description | Use when working with Notion via ntn: call APIs, query databases, create pages, upload files, or deploy/manage workers. |
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 <command> --help — help for any command or subcommand.
ntn api
Run ntn api --help for full syntax. Quick summary:
ntn api v1/users page_size==100
ntn api v1/pages parent[page_id]=abc123
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.
When creating pages or comments, Markdown is available as an input method; use Markdown by default unless you need more advanced formatting.
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
ntn workers deploy
ntn workers ls
ntn workers exec <capability>