ntn grammar.
Setup
Create an integration and grant it access to the relevant pages using Notion setup.Supported commands
Runntn <command> --help for the supported flags and operands.
This list is generated from Mirage’s registered command tree.
Read and edit pages
--parent accepts page:, database: or
data-source: followed by an ID. pages edit replaces the entire body.
Trashing requires confirmation; pass --yes for noninteractive use.
To update database-row properties, use the API rather than page-body editing:
Query data sources
resolve returns a database’s data source IDs. query accepts a data source
or database ID/URL. Its default output is tab-separated: page ID followed by
property values, with columns sorted by name from the returned rows.
--json returns the API response. --filter-file reads through the workspace
VFS, relative to the session’s working directory.
Call the API
A body selects POST unless a method is explicit. Blocks, comments and search
use API paths; they are not separate command groups.
VFS and limits
The optional Notion VFS provides page and database files. Reuse its IDs, or obtain them through the API; no mount is required. Interactive login/logout, update, workers, deployment and file-management commands are absent. The config supplies the credential. Command-line parsing follows CLAP style. Exit codes distinguish these failures:
The shared conformance suite checks the implemented surface against
ntn.
The suite pins ntn 0.21.9, whose
package metadata declares MIT.
Mirage’s command implementation is Apache-2.0; see
compatibility and licenses.