Skip to content
SumOfficeSumOfficeSumOffice

Quick start: your first JSONL session

In 10–15 minutes: start fastdoc-cli, open a DOCX, edit the first paragraph with the mutate command, save the result, and verify it without a GUI.

This is the shortest path from an installed SumDoc to a proven “command → model change → DOCX write → re-read” cycle.

JSONL is the simplest contract for a first integration: one JSON request per stdin line, one JSON response per stdout line. Rust holds the open document’s state between commands.

  1. Open a terminal.
  2. Check Node.js with node --version — you need version 22 LTS or newer.
  3. Go to the prepared folder on your desktop.
  4. Run the demo client, passing explicit input and output file paths.
Terminal window
cd ~/Desktop/SumDoc-API-first-run
node --version
node a4-api-demo.mjs \
"/Applications/SumDoc.app/Contents/Resources/app/fixtures/docx/simple_text.docx" \
"$PWD/api-demo-result.docx"
  1. Starts fastdoc-cli serve from the application package.
  2. Reads the protocol greeting and the list of session commands (there are 41).
  3. Sends ping, then open and model.
  4. Uses the mutate command to insert the text “API DEMO:” at the start of the first paragraph.
  5. Reads status and saves a copy with the save command.
  6. Ends the process with the shutdown command.
Connected: fastdoc.session-serve.v1
Commands available: 28
Ping: true
Session: rust-session-20320-1
Before: This is a sample word document. It has two pages, but no headers or footers.
After: API DEMO: This is a sample word document. It has two pages, but no headers or footers.
Revision: 1; dirty: true
Saved: /Users/tester/Desktop/SumDoc-API-first-run/api-demo-result.docx
Terminal window
open -a SumDoc ~/Desktop/SumDoc-API-first-run/api-demo-result.docx

The prefix API DEMO: should appear at the start of the first paragraph. This confirms the full cycle: the command reached Rust, changed the document model, was written to DOCX, and was read back by the graphical editor.

This path was proven exactly this way: on August 26, 2026, on an installed SumDoc, with that same prefix in the first paragraph.

Terminal window
CLI="/Applications/SumDoc.app/Contents/Resources/runtime/native/fastdoc-cli"
"$CLI" model-docx \
"$HOME/Desktop/SumDoc-API-first-run/api-demo-result.docx" \
--format json

Documentation assistant

Answers are assembled from the documentation and may be inaccurate — check the sources.