Documentation
¶
Overview ¶
Package commands implements the Notion CLI subcommands.
This file implements the `comment` command group, which exposes the Notion Comments API (Notion-Version 2026-03-11):
POST /v1/comments
GET /v1/comments?block_id=...
GET /v1/comments/{id}
PATCH /v1/comments/{id}
DELETE /v1/comments/{id}
Per the API contract, exactly one of `rich_text` or `markdown` must be provided when creating or updating a comment. The CLI surfaces `--text` (sugar for a single-run rich_text array) and `--rich-text <file>` (load a rich_text array from a JSON file).
Package commands implements the Notion CLI subcommands.
This file implements the `custom-emoji` command group, which exposes the Notion Custom Emojis API (Notion-Version 2026-03-11):
GET /v1/custom_emojis
GET /v1/custom_emojis/{id}
See https://developers.notion.com/reference/list-custom-emojis.
Package commands implements the Notion CLI subcommands.
This file implements the `files` command group, which exposes the Notion File Uploads API:
POST /v1/file_uploads
POST /v1/file_uploads/{id}/send
POST /v1/file_uploads/{id}/complete
GET /v1/file_uploads/{id}
GET /v1/file_uploads
Single-part uploads (≤20 MB): create → send. Multi-part uploads (>20 MB): create with mode=multi_part → send each chunk (1-indexed part_number) → complete.
Package commands implements the Notion CLI subcommands.
This file implements the `view` command group, which exposes the Notion Views API (Notion-Version 2026-03-11):
POST /v1/views
GET /v1/views?database_id=...|data_source_id=...
GET /v1/views/{view_id}
PATCH /v1/views/{view_id}
DELETE /v1/views/{view_id}
POST /v1/views/{view_id}/queries
GET /v1/views/{view_id}/queries/{query_id}
DELETE /v1/views/{view_id}/queries/{query_id}
Cached query results expire 15 minutes after creation; clients should re-create the query if `expires_at` has passed before paginating.
Index ¶
- func RegisterAuthCommands(root *cobra.Command)
- func RegisterBatchCommands(root *cobra.Command)
- func RegisterBlockCommands(root *cobra.Command)
- func RegisterCacheCommands(root *cobra.Command)
- func RegisterCommentCommands(root *cobra.Command)
- func RegisterConfigCommands(root *cobra.Command)
- func RegisterCustomEmojiCommands(root *cobra.Command)
- func RegisterDBCommands(root *cobra.Command)
- func RegisterDataSourceCommands(root *cobra.Command)
- func RegisterDoctorCommand(root *cobra.Command)
- func RegisterFilesCommands(root *cobra.Command)
- func RegisterListCommand(root *cobra.Command)
- func RegisterMarkdownCommands(root *cobra.Command)
- func RegisterPageCommands(root *cobra.Command)
- func RegisterSearchCommand(root *cobra.Command)
- func RegisterSyncCommand(root *cobra.Command)
- func RegisterUserCommands(root *cobra.Command)
- func RegisterViewCommands(root *cobra.Command)
- func RegisterWhoamiCommand(root *cobra.Command)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthCommands ¶
RegisterAuthCommands registers all auth subcommands under root.
func RegisterBatchCommands ¶
RegisterBatchCommands registers all batch subcommands under root.
func RegisterBlockCommands ¶
RegisterBlockCommands registers all block subcommands under root.
func RegisterCacheCommands ¶
RegisterCacheCommands registers cache subcommands.
func RegisterCommentCommands ¶
RegisterCommentCommands registers all comment subcommands under root.
func RegisterConfigCommands ¶
RegisterConfigCommands registers config subcommands.
func RegisterCustomEmojiCommands ¶
RegisterCustomEmojiCommands registers all custom-emoji subcommands under root.
func RegisterDBCommands ¶
RegisterDBCommands registers all database subcommands under root.
func RegisterDataSourceCommands ¶
RegisterDataSourceCommands registers the `data-source` command group under root.
This is the explicit, low-level command group for the 2025-09-03 Notion API data source endpoints. `db query --data-source` remains the convenience path for querying through a database alias.
func RegisterDoctorCommand ¶
RegisterDoctorCommand registers the doctor command.
func RegisterFilesCommands ¶
RegisterFilesCommands registers `files upload`, `files retrieve`, and `files list` under root.
func RegisterListCommand ¶
RegisterListCommand registers the list command under root.
func RegisterMarkdownCommands ¶
RegisterMarkdownCommands registers the `markdown` subcommand tree under root.
func RegisterPageCommands ¶
RegisterPageCommands registers all page subcommands under root.
func RegisterSearchCommand ¶
RegisterSearchCommand registers the search command under root.
func RegisterSyncCommand ¶
RegisterSyncCommand registers the sync command under root.
func RegisterUserCommands ¶
RegisterUserCommands registers all user subcommands under root.
func RegisterViewCommands ¶
RegisterViewCommands registers all view subcommands under root.
func RegisterWhoamiCommand ¶
RegisterWhoamiCommand registers the whoami command.
Types ¶
This section is empty.