Skip to content

Releases: dapi/docmost-cli

v2.0.0 — Agent-Friendly Output

03 Mar 16:26

Choose a tag to compare

Breaking Changes

All --format json output now wrapped in a predictable envelope:

Success (single object)

{ "ok": true, "data": { "id": "abc", "title": "Runbook" } }

Success (list)

{ "ok": true, "data": [...], "meta": { "count": 2, "hasMore": false } }

Error

{ "ok": false, "error": { "code": "NOT_FOUND", "message": "...", "details": null } }

Agents should update their parsers to check .ok first, then access .data or .error.

New Features

  • Envelope format for all JSON responses — predictable { ok, data/error } structure
  • Pagination metadata — list commands include meta.hasMore so agents know when to paginate
  • docmost commands — discovery command outputs all 65 commands with options as JSON
  • CI pipeline — GitHub Actions with build + tests on Node 20/22
  • Unit tests — vitest with 13 tests covering envelope and discovery

Fixes

  • paginateAll correctly reports hasMore when truncated by --max-items
  • searchSuggest no longer double-nests response data
  • search command passes pagination metadata

Migration Guide

Before (v1.x):

docmost page-info --page-id abc --format json
# { "id": "abc", "title": "..." }

After (v2.0):

docmost page-info --page-id abc --format json
# { "ok": true, "data": { "id": "abc", "title": "..." } }

--format table and --format text are unchanged.