docmost-cli 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. docmost_cli/__init__.py +5 -0
  2. docmost_cli/__main__.py +18 -0
  3. docmost_cli/api/__init__.py +5 -0
  4. docmost_cli/api/attachments.py +30 -0
  5. docmost_cli/api/auth.py +202 -0
  6. docmost_cli/api/client.py +296 -0
  7. docmost_cli/api/comments.py +103 -0
  8. docmost_cli/api/pages.py +530 -0
  9. docmost_cli/api/pagination.py +94 -0
  10. docmost_cli/api/search.py +40 -0
  11. docmost_cli/api/spaces.py +141 -0
  12. docmost_cli/api/users.py +25 -0
  13. docmost_cli/api/workspace.py +43 -0
  14. docmost_cli/cli/__init__.py +3 -0
  15. docmost_cli/cli/attachment.py +30 -0
  16. docmost_cli/cli/comment.py +83 -0
  17. docmost_cli/cli/config_cmd.py +143 -0
  18. docmost_cli/cli/main.py +133 -0
  19. docmost_cli/cli/page.py +382 -0
  20. docmost_cli/cli/search.py +33 -0
  21. docmost_cli/cli/space.py +57 -0
  22. docmost_cli/cli/sync_cmd.py +122 -0
  23. docmost_cli/cli/user.py +25 -0
  24. docmost_cli/cli/workspace.py +40 -0
  25. docmost_cli/config/__init__.py +23 -0
  26. docmost_cli/config/settings.py +23 -0
  27. docmost_cli/config/store.py +160 -0
  28. docmost_cli/convert/__init__.py +3 -0
  29. docmost_cli/convert/prosemirror_to_md.py +300 -0
  30. docmost_cli/models/__init__.py +3 -0
  31. docmost_cli/models/common.py +3 -0
  32. docmost_cli/output/__init__.py +17 -0
  33. docmost_cli/output/formatter.py +85 -0
  34. docmost_cli/output/tree.py +66 -0
  35. docmost_cli/py.typed +0 -0
  36. docmost_cli/sync/__init__.py +57 -0
  37. docmost_cli/sync/diff.py +156 -0
  38. docmost_cli/sync/frontmatter.py +152 -0
  39. docmost_cli/sync/manifest.py +195 -0
  40. docmost_cli/sync/pull.py +158 -0
  41. docmost_cli/sync/push.py +374 -0
  42. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-attachment.1 +57 -0
  43. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-comment.1 +92 -0
  44. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-config.1 +127 -0
  45. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-page.1 +412 -0
  46. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-search.1 +90 -0
  47. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-space.1 +111 -0
  48. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-sync.1 +206 -0
  49. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-user.1 +39 -0
  50. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli-workspace.1 +68 -0
  51. docmost_cli-0.4.0.data/data/share/man/man1/docmost-cli.1 +301 -0
  52. docmost_cli-0.4.0.dist-info/METADATA +241 -0
  53. docmost_cli-0.4.0.dist-info/RECORD +56 -0
  54. docmost_cli-0.4.0.dist-info/WHEEL +4 -0
  55. docmost_cli-0.4.0.dist-info/entry_points.txt +2 -0
  56. docmost_cli-0.4.0.dist-info/licenses/LICENSE +661 -0
@@ -0,0 +1,127 @@
1
+ .\" Manual page for docmost-cli-config(1)
2
+ .\" Source: SPECIFICATION.md section 4.1, src/docmost_cli/cli/config_cmd.py
3
+ .TH DOCMOST\-CLI\-CONFIG 1 "2026\-03\-22" "docmost\-cli 0.4.0" "User Commands"
4
+ .SH NAME
5
+ docmost\-cli\-config \- manage docmost\-cli configuration
6
+ .SH SYNOPSIS
7
+ .B docmost\-cli config init
8
+ .RB [ \-\-profile
9
+ .IR name ]
10
+ .br
11
+ .B docmost\-cli config show
12
+ .br
13
+ .B docmost\-cli config set
14
+ .I key value
15
+ .RB [ \-\-profile
16
+ .IR name ]
17
+ .br
18
+ .B docmost\-cli config test
19
+ .SH DESCRIPTION
20
+ Commands for managing
21
+ .B docmost\-cli
22
+ configuration.
23
+ Configuration is stored in a TOML file at
24
+ .IR ~/.config/docmost\-cli/config.toml
25
+ and supports multiple named profiles for different Docmost instances.
26
+ .PP
27
+ See
28
+ .BR docmost\-cli (1)
29
+ for the full configuration file format, environment variables,
30
+ and priority chain.
31
+ .SH SUBCOMMANDS
32
+ .SS init
33
+ Interactive setup wizard.
34
+ Prompts for the Docmost URL, authentication method (API key or
35
+ email/password), and credentials.
36
+ Writes the result to the configuration file.
37
+ .TP
38
+ .BI \-\-profile " name"
39
+ Profile to configure.
40
+ Default:
41
+ .BR default .
42
+ .PP
43
+ If a profile already exists, its values are shown as defaults in the
44
+ prompts.
45
+ .SS show
46
+ Show current configuration with secrets masked.
47
+ .PP
48
+ Displays a table of all settings for the active profile.
49
+ Sensitive values (API key, password) are partially redacted.
50
+ .SS set
51
+ Set a single configuration value.
52
+ .PP
53
+ .I key
54
+ is the configuration key to set.
55
+ Valid keys:
56
+ .BR url ,
57
+ .BR api_key ,
58
+ .BR email ,
59
+ .BR password .
60
+ .PP
61
+ .I value
62
+ is the value to assign.
63
+ .TP
64
+ .BI \-\-profile " name"
65
+ Profile to update.
66
+ Default:
67
+ .BR default .
68
+ .SS test
69
+ Test connectivity and authentication against the configured Docmost
70
+ instance.
71
+ .PP
72
+ Attempts to connect to the Docmost API and authenticate using the
73
+ current configuration.
74
+ Reports success or a detailed error message.
75
+ .SH EXAMPLES
76
+ Run the interactive setup wizard:
77
+ .PP
78
+ .RS 4
79
+ .EX
80
+ $ docmost\-cli config init
81
+ .EE
82
+ .RE
83
+ .PP
84
+ Set up a staging profile:
85
+ .PP
86
+ .RS 4
87
+ .EX
88
+ $ docmost\-cli config init \-\-profile staging
89
+ .EE
90
+ .RE
91
+ .PP
92
+ Show current configuration:
93
+ .PP
94
+ .RS 4
95
+ .EX
96
+ $ docmost\-cli config show
97
+ .EE
98
+ .RE
99
+ .PP
100
+ Set a single value:
101
+ .PP
102
+ .RS 4
103
+ .EX
104
+ $ docmost\-cli config set url https://docs.example.com
105
+ $ docmost\-cli config set api_key dm_xxxxxxxxxxxxxxxxxxxx \-\-profile staging
106
+ .EE
107
+ .RE
108
+ .PP
109
+ Test the connection:
110
+ .PP
111
+ .RS 4
112
+ .EX
113
+ $ docmost\-cli config test
114
+ .EE
115
+ .RE
116
+ .SH EXIT STATUS
117
+ See
118
+ .BR docmost\-cli (1).
119
+ .SH SEE ALSO
120
+ .BR docmost\-cli (1)
121
+ .SH AUTHORS
122
+ Georg
123
+ .MT georg@mann\-mouse.at
124
+ .ME .
125
+ .SH COPYRIGHT
126
+ Copyright \(co 2026 Georg.
127
+ License AGPLv3+: GNU Affero General Public License version 3 or later.
@@ -0,0 +1,412 @@
1
+ .\" Manual page for docmost-cli-page(1)
2
+ .\" Source: SPECIFICATION.md section 4.2, src/docmost_cli/cli/page.py
3
+ .TH DOCMOST\-CLI\-PAGE 1 "2026\-03\-22" "docmost\-cli 0.4.0" "User Commands"
4
+ .SH NAME
5
+ docmost\-cli\-page \- page operations for Docmost wiki
6
+ .SH SYNOPSIS
7
+ .B docmost\-cli page list
8
+ .I space\-slug
9
+ .RB [ \-\-limit
10
+ .IR N ]
11
+ .RB [ \-\-cursor
12
+ .IR cursor ]
13
+ .RB [ \-\-tree ]
14
+ .RB [ \-\-json ]
15
+ .br
16
+ .B docmost\-cli page get
17
+ .I page\-id
18
+ .RB [ \-\-raw ]
19
+ .RB [ \-\-meta ]
20
+ .br
21
+ .B docmost\-cli page create
22
+ .I space\-slug
23
+ .BI \-\-title " title"
24
+ .RB [ \-\-content
25
+ .IR md ]
26
+ .RB [ \-\-file
27
+ .IR path ]
28
+ .RB [ \-\-stdin ]
29
+ .RB [ \-\-parent
30
+ .IR id ]
31
+ .RB [ \-\-icon
32
+ .IR emoji ]
33
+ .br
34
+ .B docmost\-cli page update
35
+ .I page\-id
36
+ .RB [ \-\-title
37
+ .IR title ]
38
+ .RB [ \-\-content
39
+ .IR md ]
40
+ .RB [ \-\-file
41
+ .IR path ]
42
+ .RB [ \-\-stdin ]
43
+ .RB [ \-\-icon
44
+ .IR emoji ]
45
+ .br
46
+ .B docmost\-cli page delete
47
+ .I page\-id
48
+ .br
49
+ .B docmost\-cli page move
50
+ .I page\-id
51
+ .RB [ \-\-parent
52
+ .IR id ]
53
+ .RB [ \-\-space
54
+ .IR slug ]
55
+ .RB [ \-\-position
56
+ .IR N ]
57
+ .br
58
+ .B docmost\-cli page duplicate
59
+ .I page\-id
60
+ .br
61
+ .B docmost\-cli page copy
62
+ .I page\-id
63
+ .BI \-\-space " slug"
64
+ .br
65
+ .B docmost\-cli page children
66
+ .I page\-id
67
+ .RB [ \-\-json ]
68
+ .br
69
+ .B docmost\-cli page history
70
+ .I page\-id
71
+ .RB [ \-\-limit
72
+ .IR N ]
73
+ .RB [ \-\-json ]
74
+ .br
75
+ .B docmost\-cli page export
76
+ .I page\-id
77
+ .RB [ \-\-format
78
+ .BR md | html ]
79
+ .RB [ \-\-output
80
+ .IR path ]
81
+ .br
82
+ .B docmost\-cli page import
83
+ .I space\-slug
84
+ .BI \-\-file " path"
85
+ .RB [ \-\-title
86
+ .IR title ]
87
+ .RB [ \-\-parent
88
+ .IR id ]
89
+ .SH DESCRIPTION
90
+ Commands for managing wiki pages in a Docmost instance.
91
+ Pages contain Markdown content and belong to a space.
92
+ They can be organized hierarchically using parent\-child relationships.
93
+ .PP
94
+ Content is always presented as Markdown.
95
+ The underlying ProseMirror JSON format is converted automatically
96
+ unless
97
+ .B \-\-raw
98
+ is specified.
99
+ .PP
100
+ Page creation uses the server\-side import endpoint for reliable
101
+ Markdown\-to\-ProseMirror conversion.
102
+ .SH SUBCOMMANDS
103
+ .SS list
104
+ List pages in a space.
105
+ .PP
106
+ .I space\-slug
107
+ identifies the space whose pages to list.
108
+ .TP
109
+ .BI \-\-limit " N"
110
+ Maximum number of results to return.
111
+ Default: 50.
112
+ .TP
113
+ .BI \-\-cursor " cursor"
114
+ Pagination cursor from a previous response.
115
+ When omitted, pagination is followed automatically until all pages
116
+ are retrieved (up to
117
+ .BR \-\-limit ).
118
+ .TP
119
+ .B \-\-tree
120
+ Display pages as an indented tree showing the parent\-child hierarchy.
121
+ .TP
122
+ .B \-\-json
123
+ Output as a JSON array instead of a Rich table.
124
+ .SS get
125
+ Get page content as Markdown.
126
+ .PP
127
+ .I page\-id
128
+ is the UUID of the page to retrieve.
129
+ .PP
130
+ By default, only the Markdown content is written to stdout,
131
+ making it suitable for piping or redirection.
132
+ .TP
133
+ .B \-\-raw
134
+ Output the ProseMirror JSON representation instead of Markdown.
135
+ .TP
136
+ .B \-\-meta
137
+ Prepend YAML frontmatter containing page metadata
138
+ (id, title, space, created, updated, creator).
139
+ .SS create
140
+ Create a new page via Markdown import.
141
+ .PP
142
+ .I space\-slug
143
+ identifies the space to create the page in.
144
+ .TP
145
+ .BI \-\-title " title"
146
+ Page title.
147
+ Required.
148
+ .TP
149
+ .BI \-\-content " markdown"
150
+ Inline Markdown content string.
151
+ Mutually exclusive with
152
+ .B \-\-file
153
+ and
154
+ .BR \-\-stdin .
155
+ .TP
156
+ .BI \-\-file " path"
157
+ Read content from a Markdown file.
158
+ Mutually exclusive with
159
+ .B \-\-content
160
+ and
161
+ .BR \-\-stdin .
162
+ .TP
163
+ .B \-\-stdin
164
+ Read content from standard input.
165
+ Mutually exclusive with
166
+ .B \-\-content
167
+ and
168
+ .BR \-\-file .
169
+ .TP
170
+ .BI \-\-parent " id"
171
+ Parent page UUID.
172
+ When set, the new page is nested under this parent.
173
+ .TP
174
+ .BI \-\-icon " emoji"
175
+ Page icon emoji.
176
+ .PP
177
+ Outputs the new page ID to stdout and a confirmation message to stderr.
178
+ .SS update
179
+ Update an existing page's title, icon, and/or content.
180
+ .PP
181
+ .I page\-id
182
+ is the UUID of the page to update.
183
+ At least one of the options below must be provided.
184
+ .TP
185
+ .BI \-\-title " title"
186
+ New page title.
187
+ .TP
188
+ .BI \-\-icon " emoji"
189
+ New page icon emoji.
190
+ .TP
191
+ .BI \-\-content " markdown"
192
+ New Markdown content (inline string).
193
+ Mutually exclusive with
194
+ .B \-\-file
195
+ and
196
+ .BR \-\-stdin .
197
+ .TP
198
+ .BI \-\-file " path"
199
+ Read new content from a file.
200
+ .TP
201
+ .B \-\-stdin
202
+ Read new content from standard input.
203
+ .SS delete
204
+ Delete a page.
205
+ .PP
206
+ .I page\-id
207
+ is the UUID of the page to delete.
208
+ .PP
209
+ Prompts for confirmation unless the global
210
+ .B \-\-yes
211
+ flag is set.
212
+ .SS move
213
+ Move a page to a new location.
214
+ .PP
215
+ .I page\-id
216
+ is the UUID of the page to move.
217
+ At least one of the options below must be provided.
218
+ .TP
219
+ .BI \-\-parent " id"
220
+ New parent page UUID.
221
+ Omit to move the page to the root level.
222
+ .TP
223
+ .BI \-\-space " slug"
224
+ Move the page to a different space.
225
+ .TP
226
+ .BI \-\-position " N"
227
+ Position among siblings (zero\-based index).
228
+ .SS duplicate
229
+ Duplicate a page within the same space.
230
+ .PP
231
+ .I page\-id
232
+ is the UUID of the page to duplicate.
233
+ .PP
234
+ Outputs the new page ID to stdout.
235
+ .SS copy
236
+ Copy a page to a different space.
237
+ .PP
238
+ .I page\-id
239
+ is the UUID of the page to copy.
240
+ .TP
241
+ .BI \-\-space " slug"
242
+ Target space slug.
243
+ Required.
244
+ .PP
245
+ Outputs the new page ID to stdout.
246
+ .SS children
247
+ List child pages of a parent page.
248
+ .PP
249
+ .I page\-id
250
+ is the UUID of the parent page.
251
+ .TP
252
+ .B \-\-json
253
+ Output as a JSON array instead of a Rich table.
254
+ .SS history
255
+ Show page version history.
256
+ .PP
257
+ .I page\-id
258
+ is the UUID of the page.
259
+ .TP
260
+ .BI \-\-limit " N"
261
+ Maximum number of history entries to return.
262
+ .TP
263
+ .B \-\-json
264
+ Output as a JSON array instead of a Rich table.
265
+ .SS export
266
+ Export page content to a file.
267
+ .PP
268
+ .I page\-id
269
+ is the UUID of the page to export.
270
+ .TP
271
+ .BI \-\-format " format"
272
+ Export format:
273
+ .B md
274
+ (Markdown, default) or
275
+ .BR html .
276
+ .TP
277
+ .BI \-\-output " path"
278
+ Write to a file instead of stdout.
279
+ Prompts for confirmation if the file already exists
280
+ (unless
281
+ .B \-\-yes
282
+ is set).
283
+ .SS import
284
+ Import a file as a new page.
285
+ .PP
286
+ .I space\-slug
287
+ identifies the space to import into.
288
+ .TP
289
+ .BI \-\-file " path"
290
+ Markdown or HTML file to import.
291
+ Required.
292
+ .TP
293
+ .BI \-\-title " title"
294
+ Override the page title.
295
+ If omitted, the title is auto\-detected from the filename or
296
+ the first H1 heading in the file.
297
+ .TP
298
+ .BI \-\-parent " id"
299
+ Parent page UUID to nest the imported page under.
300
+ .PP
301
+ Outputs the new page ID to stdout.
302
+ .SH EXAMPLES
303
+ List all pages in a space:
304
+ .PP
305
+ .RS 4
306
+ .EX
307
+ $ docmost\-cli page list engineering
308
+ .EE
309
+ .RE
310
+ .PP
311
+ List pages as a tree:
312
+ .PP
313
+ .RS 4
314
+ .EX
315
+ $ docmost\-cli page list engineering \-\-tree
316
+ .EE
317
+ .RE
318
+ .PP
319
+ Get page content as Markdown and save to file:
320
+ .PP
321
+ .RS 4
322
+ .EX
323
+ $ docmost\-cli page get 019a2a69\-xxxx > page.md
324
+ .EE
325
+ .RE
326
+ .PP
327
+ Get page content with YAML frontmatter:
328
+ .PP
329
+ .RS 4
330
+ .EX
331
+ $ docmost\-cli page get 019a2a69\-xxxx \-\-meta
332
+ .EE
333
+ .RE
334
+ .PP
335
+ Create a page from a file:
336
+ .PP
337
+ .RS 4
338
+ .EX
339
+ $ PAGE_ID=$(docmost\-cli page create eng \-\-title "Deploy Guide" \-\-file deploy.md)
340
+ .EE
341
+ .RE
342
+ .PP
343
+ Create a page from stdin:
344
+ .PP
345
+ .RS 4
346
+ .EX
347
+ $ echo "# Quick Note" | docmost\-cli page create eng \-\-title "Note" \-\-stdin
348
+ .EE
349
+ .RE
350
+ .PP
351
+ Update a page's content from a file:
352
+ .PP
353
+ .RS 4
354
+ .EX
355
+ $ docmost\-cli page update 019a2a69\-xxxx \-\-file updated.md
356
+ .EE
357
+ .RE
358
+ .PP
359
+ Delete a page without confirmation:
360
+ .PP
361
+ .RS 4
362
+ .EX
363
+ $ docmost\-cli \-y page delete 019a2a69\-xxxx
364
+ .EE
365
+ .RE
366
+ .PP
367
+ Move a page to a different space:
368
+ .PP
369
+ .RS 4
370
+ .EX
371
+ $ docmost\-cli page move 019a2a69\-xxxx \-\-space devops
372
+ .EE
373
+ .RE
374
+ .PP
375
+ Export a page as HTML:
376
+ .PP
377
+ .RS 4
378
+ .EX
379
+ $ docmost\-cli page export 019a2a69\-xxxx \-\-format html \-\-output page.html
380
+ .EE
381
+ .RE
382
+ .PP
383
+ Import a Markdown file:
384
+ .PP
385
+ .RS 4
386
+ .EX
387
+ $ docmost\-cli page import eng \-\-file runbook.md \-\-parent 019b3c8f\-yyyy
388
+ .EE
389
+ .RE
390
+ .PP
391
+ Batch\-retrieve page titles as JSON:
392
+ .PP
393
+ .RS 4
394
+ .EX
395
+ $ docmost\-cli page list eng \-\-json | jq \(aq.[].title\(aq
396
+ .EE
397
+ .RE
398
+ .SH EXIT STATUS
399
+ See
400
+ .BR docmost\-cli (1).
401
+ .SH SEE ALSO
402
+ .BR docmost\-cli (1),
403
+ .BR docmost\-cli\-space (1),
404
+ .BR docmost\-cli\-sync (1),
405
+ .BR docmost\-cli\-comment (1)
406
+ .SH AUTHORS
407
+ Georg
408
+ .MT georg@mann\-mouse.at
409
+ .ME .
410
+ .SH COPYRIGHT
411
+ Copyright \(co 2026 Georg.
412
+ License AGPLv3+: GNU Affero General Public License version 3 or later.
@@ -0,0 +1,90 @@
1
+ .\" Manual page for docmost-cli-search(1)
2
+ .\" Source: SPECIFICATION.md section 4.5, src/docmost_cli/cli/search.py
3
+ .TH DOCMOST\-CLI\-SEARCH 1 "2026\-03\-22" "docmost\-cli 0.4.0" "User Commands"
4
+ .SH NAME
5
+ docmost\-cli\-search \- full\-text search across a Docmost wiki
6
+ .SH SYNOPSIS
7
+ .B docmost\-cli search query
8
+ .I query
9
+ .RB [ \-\-space
10
+ .IR slug ]
11
+ .RB [ \-\-limit
12
+ .IR N ]
13
+ .RB [ \-\-type
14
+ .BR page | attachment ]
15
+ .RB [ \-\-json ]
16
+ .SH DESCRIPTION
17
+ Full\-text search across all pages and attachments in the Docmost
18
+ workspace.
19
+ Results include a highlighted snippet showing the matching text
20
+ in context.
21
+ .SH SUBCOMMANDS
22
+ .SS query
23
+ Execute a full\-text search.
24
+ .PP
25
+ .I query
26
+ is the search string.
27
+ .TP
28
+ .BI \-\-space " slug"
29
+ Restrict search to a specific space.
30
+ .TP
31
+ .BI \-\-limit " N"
32
+ Maximum number of results.
33
+ Default: 20.
34
+ .TP
35
+ .BI \-\-type " type"
36
+ Filter results by type:
37
+ .B page
38
+ or
39
+ .BR attachment .
40
+ .TP
41
+ .B \-\-json
42
+ Output as a JSON array instead of a Rich table.
43
+ .PP
44
+ Table columns: id, title, highlight.
45
+ .SH EXAMPLES
46
+ Search across the entire wiki:
47
+ .PP
48
+ .RS 4
49
+ .EX
50
+ $ docmost\-cli search query "deployment guide"
51
+ .EE
52
+ .RE
53
+ .PP
54
+ Search within a specific space:
55
+ .PP
56
+ .RS 4
57
+ .EX
58
+ $ docmost\-cli search query "API endpoint" \-\-space eng
59
+ .EE
60
+ .RE
61
+ .PP
62
+ Search for attachments only:
63
+ .PP
64
+ .RS 4
65
+ .EX
66
+ $ docmost\-cli search query "diagram" \-\-type attachment
67
+ .EE
68
+ .RE
69
+ .PP
70
+ Search and output as JSON:
71
+ .PP
72
+ .RS 4
73
+ .EX
74
+ $ docmost\-cli search query "onboarding" \-\-json | jq \(aq.[].title\(aq
75
+ .EE
76
+ .RE
77
+ .SH EXIT STATUS
78
+ See
79
+ .BR docmost\-cli (1).
80
+ .SH SEE ALSO
81
+ .BR docmost\-cli (1),
82
+ .BR docmost\-cli\-page (1),
83
+ .BR docmost\-cli\-attachment (1)
84
+ .SH AUTHORS
85
+ Georg
86
+ .MT georg@mann\-mouse.at
87
+ .ME .
88
+ .SH COPYRIGHT
89
+ Copyright \(co 2026 Georg.
90
+ License AGPLv3+: GNU Affero General Public License version 3 or later.
@@ -0,0 +1,111 @@
1
+ .\" Manual page for docmost-cli-space(1)
2
+ .\" Source: SPECIFICATION.md section 4.3, src/docmost_cli/cli/space.py
3
+ .TH DOCMOST\-CLI\-SPACE 1 "2026\-03\-22" "docmost\-cli 0.4.0" "User Commands"
4
+ .SH NAME
5
+ docmost\-cli\-space \- manage Docmost wiki spaces
6
+ .SH SYNOPSIS
7
+ .B docmost\-cli space list
8
+ .RB [ \-\-json ]
9
+ .br
10
+ .B docmost\-cli space create
11
+ .BI \-\-name " name"
12
+ .RB [ \-\-slug
13
+ .IR slug ]
14
+ .RB [ \-\-description
15
+ .IR desc ]
16
+ .br
17
+ .B docmost\-cli space update
18
+ .I space\-slug
19
+ .RB [ \-\-name
20
+ .IR name ]
21
+ .RB [ \-\-description
22
+ .IR desc ]
23
+ .SH DESCRIPTION
24
+ Commands for managing Docmost wiki spaces.
25
+ Spaces are top\-level organizational containers for pages.
26
+ Each space has a unique slug used to identify it in CLI commands.
27
+ .SH SUBCOMMANDS
28
+ .SS list
29
+ List all spaces in the workspace.
30
+ .TP
31
+ .B \-\-json
32
+ Output as a JSON array instead of a Rich table.
33
+ .PP
34
+ Table columns: id, name, slug, description.
35
+ .SS create
36
+ Create a new space.
37
+ .TP
38
+ .BI \-\-name " name"
39
+ Space display name.
40
+ Required.
41
+ .TP
42
+ .BI \-\-slug " slug"
43
+ URL slug for the space.
44
+ Auto\-generated from the name if omitted.
45
+ .TP
46
+ .BI \-\-description " description"
47
+ Space description.
48
+ .PP
49
+ Outputs the new space ID to stdout.
50
+ .SS update
51
+ Update an existing space's name or description.
52
+ .PP
53
+ .I space\-slug
54
+ is a positional argument identifying the space to update.
55
+ At least one of
56
+ .B \-\-name
57
+ or
58
+ .B \-\-description
59
+ must be provided.
60
+ .TP
61
+ .BI \-\-name " name"
62
+ New space name.
63
+ .TP
64
+ .BI \-\-description " description"
65
+ New space description.
66
+ .SH EXAMPLES
67
+ List all spaces:
68
+ .PP
69
+ .RS 4
70
+ .EX
71
+ $ docmost\-cli space list
72
+ .EE
73
+ .RE
74
+ .PP
75
+ List spaces as JSON:
76
+ .PP
77
+ .RS 4
78
+ .EX
79
+ $ docmost\-cli space list \-\-json | jq \(aq.[].slug\(aq
80
+ .EE
81
+ .RE
82
+ .PP
83
+ Create a space with a custom slug:
84
+ .PP
85
+ .RS 4
86
+ .EX
87
+ $ docmost\-cli space create \-\-name "Engineering" \-\-slug eng
88
+ .EE
89
+ .RE
90
+ .PP
91
+ Update a space description:
92
+ .PP
93
+ .RS 4
94
+ .EX
95
+ $ docmost\-cli space update eng \-\-description "Engineering team docs"
96
+ .EE
97
+ .RE
98
+ .SH EXIT STATUS
99
+ See
100
+ .BR docmost\-cli (1).
101
+ .SH SEE ALSO
102
+ .BR docmost\-cli (1),
103
+ .BR docmost\-cli\-page (1),
104
+ .BR docmost\-cli\-sync (1)
105
+ .SH AUTHORS
106
+ Georg
107
+ .MT georg@mann\-mouse.at
108
+ .ME .
109
+ .SH COPYRIGHT
110
+ Copyright \(co 2026 Georg.
111
+ License AGPLv3+: GNU Affero General Public License version 3 or later.