Skip to content

ctk pages

Retrieve a page by its ID. Returns metadata and body content.

Terminal window
ctk pages get 12345678

Output:

Page: Architecture Overview
ID: 12345678
Space ID: 131073
Status: current
Version: 5
Parent ID: 131074
Created: 2025-01-10T14:30:00Z
Updated: 2025-03-01T09:15:00Z
--- Body ---
# Architecture Overview
This document describes the system architecture...

List pages in a space.

Terminal window
ctk pages list 131073

Output:

ID Title Status Version
───────────────────────────────────────────────────────────────
12345678 Architecture Overview current 5
12345679 API Design current 3
12345680 Deployment Guide current 12
Showing 3 pages

Create a new page. Requires --space and --title.

Terminal window
ctk pages create --space 131073 --title "New Page" --body "<p>Hello</p>"
ctk pages create -s 131073 -t "New Page" --parent 12345678
FlagShortDescription
--space-sSpace ID (required)
--title-tPage title (required)
--body-bPage body in storage format
--parentParent page ID

Update an existing page. Automatically fetches the current version and increments it.

Terminal window
ctk pages update 12345678 --title "Updated Title" --body "<p>New content</p>"
FlagShortDescription
--title-tNew page title (required)
--body-bNew page body in storage format

List version history for a page.

Terminal window
ctk pages versions 12345678

Output:

Version Author Message Minor Created
─────────────────────────────────────────────────────────────────────
5 5b10ac... Updated architecture 2025-03-01
4 5b10ac... Added diagrams 2025-02-15
3 5b10ac... Initial draft yes 2025-01-10
Showing 3 versions

Compare two versions of a page with a unified diff.

Terminal window
ctk pages diff 12345678 --from 3 --to 5
FlagDescription
--fromStarting version number (required)
--toEnding version number (required)

Output:

Diff: Architecture Overview (v3 -> v5)
- Old architecture description
+ New architecture description with updated diagrams

Add a footer comment to a page.

Terminal window
ctk pages comment 12345678 "<p>Looks good!</p>"