v0.6.0
v0.6.0 — long-doc UX, file sources, media blocks, friendlier errors
This release closes every open issue on the tracker (#21–#26). The theme: stop forcing users to work around Notion API limits that the CLI already has enough information to handle itself.
✨ Highlights
Long-form markdown just works now. Previously a ~14 KB postmortem with a 2 KB stack-trace would fail twice (children.length > 100, then rich_text.content > 2000) and had to be manually sliced. Now:
block append --file big.mdauto-batches in groups of 100 and printsnote: appending 253 blocks in 3 batches of ≤100…to stderr (so--format jsonstill pipes cleanly).- Code blocks over 2000 chars split on newline boundaries by default; override with
--on-oversize=truncate|fail. - Partial failures say exactly where:
batch 2/3 failed after writing 100 block(s): …. (#21)
Code fences stop throwing enum errors. Common aliases from editors and LLMs (ts, sh, yml, py, cpp, dockerfile, proto, …) normalize to the Notion enum. Unknown languages fall back to plain text with a one-line stderr warning, so a single unrecognized fence never kills a 150-block document. (#22)
Upload-then-embed in one command. New --image-file / --image-upload (and the same pattern for file / video / audio / pdf) land an uploaded file directly as a block. No more dropping to notion api PATCH with hand-crafted JSON. (#23)
notion block append <page> --image-file ./chart.png --caption "heap usage"
notion block append <page> --pdf-upload 351d45fb-... --caption "spec v2"notion file upload accepts stdin and URLs. The manual curl -o /tmp/x && upload /tmp/x && rm dance is gone. (#26)
curl -sSL https://example.com/chart.png | notion file upload - --name chart.png
notion file upload https://example.com/report.pdf # streams, no tmp filenotion api escape hatch polished. (#24)
- Missing
/v1prefix auto-prepended with a stderr note (no more opaqueinvalid_request_url). --body @file.json(curl-style) and--body -(explicit stdin) supported.- Misleading positional-body examples removed from help.
auth status and auth doctor show integration type. When an internal integration hits the workspace-root validation error, it now gets a concrete next-step paragraph instead of the raw API message. (#25)
✓ Authenticated
Workspace: My Workspace
Bot: cli
Integration: internal
Root page: not allowed (share a parent page)
📦 Upgrade
# Homebrew
brew upgrade 4ier/tap/notion-cli
# npm
npm install -g @4ier/notion-cli
# or grab a binary from the assets below🔗 Issues closed
#21 · #22 · #23 · #24 · #25 · #26
🧪 Validation
All changes were smoke-tested against a real workspace: 150-bullet batching, 3000-char code-block splitting, stdin/URL uploads, every --<kind>-file / --<kind>-upload variant, and the live internal-integration error path. Full test suite is green across 5 Go packages (go test ./...).
Previous release: v0.5.0