Repository navigation
feat: SVG and frame rendering, Mermaid conversion, scene sharing, and a clearer login - #7
Merged
Merged
Conversation
The build writes dist/reference.json from the commander definitions and help text: every command's usage, arguments, options, examples and notes. The docs at plus.excalidraw.com/docs/cli are generated from the published copy. Help notes that were wrapped by hand are now one line each, since the docs list each line as an item.
… and proxy-aware CJK fonts - `scenes share <id> --access view|edit|none` and `scenes share-slides <id> [--off]` turn a scene's public link and its shared presentation link on or off, through the new PUT /scenes/:id/link-sharing and /shared-slides routes, and print the URL - `render` and `scenes render` write SVG when --out ends in .svg or with --format svg; SVGs embed the fonts their text uses, subset to its glyphs. The font-subsetting WebAssembly the build used to drop now ships in dist/wasm/ and is only loaded for SVG exports (with it missing, SVG export hung) - --all-frames renders each frame to its own file in the --out directory, numbered in presentation order (customData.slidesOrder) and named after the frame, in one browser session - `excalidraw mermaid <file> --out <.excalidraw|.png|.svg>` converts Mermaid into editable elements as the editor's import does, with @excalidraw/mermaid-to-excalidraw 3.4.0 (Pele) and @excalidraw/element's convertToExcalidrawElements running in the render page from dist/mermaid.js. The labels' fonts are loaded and the diagram laid out again before converting, so shapes fit their text; --elbow and --font-size are supported - font downloads, API requests and the update check go through HTTPS_PROXY / HTTP_PROXY and honor NO_PROXY, as curl does; Node's fetch ignored them, which left CJK text in a fallback font behind a proxy. undici is bundled into a chunk only loaded when a proxy is set - npmmirror is a default font mirror between Excalidraw's CDN and jsDelivr, and --fonts-url accepts a local folder or file: URL, such as an unpacked @excalidraw/excalidraw dist/prod, read directly and not cached - tests cover SVG, frames, Mermaid (including Chinese labels), Chinese text in Excalifont vs other fonts, proxies, and local font folders; test runs ignore the developer's proxy settings - pnpm-workspace.yaml exempts @excalidraw/mermaid-to-excalidraw@3.4.0, published today, from the one-day release age Opus 5.5 (xhigh)
maielo
force-pushed
the
feat/reference-json
branch
from
November 3, 2026 22:03
8ebd8af to
fccdbfd
Compare
The browser inherited HTTP_PROXY and HTTPS_PROXY, so Chrome sent its own background requests (component updates, time checks) through the proxy. The page gets everything through page.route(), so the browser no longer sees proxy settings, like the API key. CI's proxy test caught Chrome's requests.
API requests send `excalidraw-cli/<version> node/<version> <platform>-<arch>`. The public API records requests whose User-Agent starts with `excalidraw-cli/<version>` as CLI usage (cli-request) instead of public-api-request, with the CLI version. Without it they were sent as Node's default `node`.
- A proxy without a scheme, such as proxy.corp:8080, is an HTTP proxy. - A socks4:// or otherwise unusable proxy is skipped with a warning that doesn't print the value, and requests connect directly instead of failing. - NODE_USE_ENV_PROXY=0 no longer turns off the CLI's proxy support. - One pattern lists the proxy variables the render browser doesn't get.
… frames - SVGs are serialized as XML, so a non-breaking space is no longer . - A frame's SVG is clipped to the frame again and no longer embeds the whole scene. - Mermaid conversion waits for every font face, including after a failed CJK font download, before laying the diagram out. - A renderer file missing from the install fails the render at once instead of hanging until the timeout. - --all-frames writes each frame as soon as it's drawn, and --timeout applies to each frame. - --fonts-url rejects empty entries, none mixed with mirrors, and URLs without a scheme instead of reading them as folders. - Excalidraw's CDN gets half the font download time again, and the README says mirrors are tried in order. - The SVG font-subsetting WebAssembly ships as base64 text, so it isn't re-encoded on each render.
- excalidraw login opens with the CLI's name and version, lists the free commands, and picks a login method: paste an API key, log in with the browser (coming soon, disabled until OAuth ships), or not now. After logging in, it shows the workspace, key type and where the key was saved. - Help groups commands into "No account needed" and "Excalidraw+", and the README's quick start and command table are split the same way. - The missing-key error says render and mermaid work without a key.
Bumps @excalidraw/mermaid-to-excalidraw to 3.6.0, which still lays diagrams out with Pele and now converts these three diagram types into Excalidraw elements instead of one image.
The help command created for the top-level group was shared with every subcommand registered after it, so "excalidraw scenes --help" listed its help command under "NO ACCOUNT NEEDED". It's now created last.
…adds excalidraw login opens with a banner: the CLI's name and version, what works without an account (PNG and SVG export, one image per frame, Mermaid to editable diagrams) next to what logging in adds, and a line on using the CLI with AI agents. The login method follows right after; "Not now" says the free CLI keeps working without an account. A successful login ends with the workspace, the key type and a command to try.
The project is on 3.6.0 now, which is older than a day.
Short bullets about what changes for users, screenshots of anything visible, and test results, so notes stay the same whoever writes them.
…s them --max-width and --max-height default to 16384 instead of 2048, so --scale 3 on a 940 px drawing gives 2820 px instead of stopping at 2048. When --max-width, --max-height, the 16384-pixel side or the 64-megapixel limit makes a PNG smaller than --scale asks for, a warning on stderr names the limit and suggests SVG for full size.
Every command's help starts with the Excalidraw CLI badge, lists commands under "Free, no account" and "With Excalidraw+" in the login screen's colors, uses title-case sections, wraps notes to the terminal as bullets, and dims option defaults and env vars. reference.json reads the same help sections, so the docs don't change.
render, scenes render and mermaid went from 9-11 notes to 4-5, and patch, put, create, share-slides and logs list to 3-4, each ending with a link to its guide. Everything cut is in docs/rendering.md, mermaid.md, scene-content.md and scripting.md.
…d the exit status scenes content patch says to increase an element's version to change it and to send at least one field; mermaid says what --out - writes and that syntax errors name the line; the top-level help says errors go to stderr and exit with status 1. Agents learn these from --help alone.
Member
|
🔥 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release scope for 0.3.0: SVG and per-frame rendering, Mermaid conversion, scene sharing, fonts behind proxies, and a login screen that shows the CLI is free to use without an account.
What's new
render,scenes render: SVG output (.svgor--format svg), with fonts subset to the text used.--all-frames --out slides/: one image per frame, in slide order (01-title.png, …).--scaleis no longer capped at 2048 px:--max-width/--max-heightdefault to 16384, and a warning says when a limit shrinks a PNG.mermaid flow.mmd --out flow.excalidraw|.png|.svg: editable Excalidraw elements, runs locally, no key. Gantt, quadrant and timeline diagrams are editable too.scenes share <id> --access view|edit|none,scenes share-slides <id> [--off]: public scene and presentation links.login: what's free next to what Excalidraw+ adds, a hint for AI agents, browser login (OAuth) listed as coming soon, and "Not now".--help: laid out like the login screen, with commands under "Free, no account" and "With Excalidraw+", wrapped notes, and at most 5 notes per command, linking to the docs.HTTPS_PROXY,HTTP_PROXYandNO_PROXYwork as in curl, including values without a scheme andsocks5://.--fonts-urltakes mirrors or a local folder.User-Agent: excalidraw-cli/<version> …, so the API counts them as CLI usage.dist/reference.json: every command's usage, options and examples, for the docs site.docs/, which the package ships for the docs site (excalidraw-plus#3498).Fixes
.--timeout.--all-frameswrites each frame as it's drawn, and--timeoutapplies per frame.--fonts-urlmistakes (trailing comma,nonewith mirrors, missinghttps://) are errors, not folders.socks4://, is skipped with a warning instead of failing every request.renderandmermaidwork without a key.Screenshots
excalidraw loginexcalidraw --helpexcalidraw render --helpmermaid flow.mmd --out flow.pngmermaid seq.mmd --out seq.svg --theme dark--all-frames: first slideNotes
@excalidraw/mermaid-to-excalidraw@3.6.0and@excalidraw/element@0.18.0-4ce8305(latestlacksconvertToExcalidrawElements). They becomedist/mermaid.js(1 MB), loaded only bymermaid.undiciloads only when a proxy is set. Withsocks5://, Node prints a warning that SOCKS support is experimental.dist/wasm/(1.7 MB) and loads only for SVGs. Package: 2.0 MB packed, 4.8 MB unpacked.Testing
pnpm run test: 64/64.pnpm run test:render(Chrome): 26/26. The SVG, frame, font and Mermaid tests also pass with Firefox.scenes shareandshare-slides, skip in CI without a key, so they haven't run yet.