Releases: dapi/docmost-cli
Releases · dapi/docmost-cli
v2.0.0 — Agent-Friendly Output
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.hasMoreso 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
paginateAllcorrectly reportshasMorewhen truncated by--max-itemssearchSuggestno longer double-nests response datasearchcommand 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.