| name | docmost |
| description | Read, create, update, and search Docmost wiki pages. Use when the user wants to interact with their Docmost wiki -- reading documentation, creating pages, searching for information, or updating content. |
| argument-hint | [action] [details] |
| allowed-tools | Bash(docmost-cli *) |
Docmost Wiki Interaction
You have access to docmost-cli, a CLI tool for managing Docmost wiki instances. Use it to read, create, update, search, and manage wiki content.
Prerequisites
The user must have docmost-cli installed and configured (docmost-cli config init). Test with docmost-cli config test if unsure.
Command Reference
Reading Content
docmost-cli space list --json
docmost-cli page list <space-slug> --json
docmost-cli page get <page-id>
docmost-cli page get <page-id> --meta
docmost-cli search query "<search-term>" --json
docmost-cli search query "<search-term>" --space <space-slug> --json
docmost-cli page list <space-slug> --tree
Writing Content
docmost-cli page create <space-slug> --title "Page Title" --content "# Heading\n\nContent here"
docmost-cli page create <space-slug> --title "Page Title" --file content.md
docmost-cli page update <page-id> --title "New Title"
docmost-cli -y page delete <page-id>
Other Operations
docmost-cli user me
docmost-cli workspace info
docmost-cli comment create <page-id> --content "Comment text"
docmost-cli comment list <page-id> --json
docmost-cli page export <page-id> --format md
Workflow Patterns
Finding and Reading a Page
- List spaces:
docmost-cli space list --json
- Find the space slug you need
- Search or list pages:
docmost-cli search query "topic" --json
- Read the page:
docmost-cli page get <page-id>
Creating Documentation for Code
- Analyze the code the user wants documented
- Write Markdown content
- Save to a temp file or use
--content flag
- Create the page:
docmost-cli page create <space-slug> --title "Title" --content "..."
- Report the page ID back to the user
Updating Existing Documentation
- Get current content:
docmost-cli page get <page-id>
- Modify the Markdown content as needed
- Update:
docmost-cli page update <page-id> --file updated.md
- Content updates are applied in place — the page keeps its ID, slug, history
and inbound links. Works on Community and Enterprise alike, from Docmost
v0.71. Use
--append / --prepend to add without replacing.
Output Format
- Content commands (
page get): Raw Markdown to stdout — directly usable
- List commands (
--json): JSON array of complete server objects — every
field the API returned, not a subset. For pages that means id, slugId,
title, icon, position, parentPageId, spaceId, creatorId,
lastUpdatedById, isLocked, createdAt, updatedAt and more. Page
content is not included; fetch it with page get <id>.
Pagination is followed automatically, so the array is complete; add
--envelope if you need hasNextPage / nextCursor
- Narrow the output with
--fields id,title,updatedAt when you only need a
few keys — worth doing to keep context small, since --json is now much
larger. It works in JSON and table mode, and an unknown name errors with the
list of fields the server actually returned
- Single-item commands (
user me, workspace info): add --json for the
complete object
- Write commands (
page create, delete): Page ID to stdout, confirmation to stderr
- Always use
--json for list/search commands when you need to parse the output programmatically
Tips
- Use
--json on list commands to get parseable output, plus --fields to keep it small
- Page IDs are UUIDs like
019a2a69-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- Space slugs are lowercase alphanumeric (e.g.,
engineering, devtest)
- Use
-y flag to skip confirmation prompts for automated workflows
- Use
--verbose for debugging connectivity issues
For detailed examples, see examples.md.