Releases: draftmark-app/cli
Releases · draftmark-app/cli
Release list
v0.4.1
Internal refactor — no user-facing changes.
- Adopt the shared
@draftmark-app/clientpackage for HTTP transport. The CLI'sapi()is now a thin shim over the shared client; the result-style{ ok, status, data }contract, error normalization, and all command behavior are unchanged. Fully backward compatible.
v0.4.0
OKF bundle round trip from the CLI.
Added
dm export <collection-slug>— write a collection as an OKF bundle to disk (./<slug>/:index.md,log.md,concepts/*.md,okf.json). Options:-o <dir>,--json,--force,--api-key/--token(owner export includes private members).dm import <dir>— ingest a local OKF bundle directory as a new collection of docs. Options:--visibility,--api-key(account-owned import),--json.
Together they round-trip: dm export <slug> → dm import <dir>.
v0.3.0
Fixed
dm commentsno longer crashes on docs that have comments. The command was iterating the raw response as an array, but the API wraps it in{ comments: [...] }— it now handles both shapes.
Added
dm resolve [slug] <commentId>— mark a comment resolved once you've addressed it;--dismissmarks it dismissed instead. Uses the existingPATCH /docs/:slug/comments/:idendpoint.
v0.2.2
Bug fixes for anchored comments and a new threaded-reply flag.
- Fix
--selectionand--linesending values in the wrong field, which caused the API to return 500.--selectionnow setsanchor_text;--linesends an integeranchor_ref. - Add
--parent <id>to post a true threaded reply (nests under the target comment). - Add
dm comment-delete [slug] <commentId> --confirmto delete a comment (and its replies).
v0.2.1
Fix
Account key resolution for private doc creation — dm login --api-key acct_... was being shadowed by doc-level keys (key_...) from .draftmark.json. Now create --private correctly prefers account keys from global config over doc keys from local config.
dm config now shows Account API Key and Doc API Key separately.
v0.2.0
What's new
New commands
dm update— Push content revisions from file or stdindm react— Add emoji reactions to documentsdm list— Show all documents in.draftmark.jsondm browse— Open document in the default browserdm config— Show resolved configuration from all sourcesdm login / logout / whoami— Global credential management (~/.config/draftmark/config.json)
Agent DX
--agentflag oncreate— marks doc as agent-authored, auto-inherited bycommentandreview--meta <json>— pass arbitrary JSON metadata on create- Stdin support —
echo "# Hello" | dm create -anddm update - - Structured JSON errors — all failures return
{ error, code, details } -q / --quiet— suppress stderr for clean piping--format table|json|minimalonstatusandcomments--since <date>— filter comments by date
Fixes & improvements
createnow accepts--api-key(required for--private, optional for public)- Private doc creation shows the full
?token=URL - All commands resolve credentials from: flag → env →
.draftmark.json→ global config --base-urlglobal option to override API endpoint- Standardized exit codes: 0 ok, 1 error, 2 auth, 3 not found, 4 conflict
v0.1.0
Initial release of the Draftmark CLI.
Commands: create, status, comments, comment, review, raw, close, open, delete
npm install -g draftmark
dm --help