@martintrojer/xdraw
v0.4.3
Published
Minimal Excalidraw CLI that opens files in your system browser
Readme
xdraw
Minimal Excalidraw file editor.
No database. No list page. One job only:
- open one
.excalidrawfile in system browser - save back to same file
- create new file when needed
Requirements
- Node.js 24+
- npm 11+ (bundled with Node 24)
Install
From npm:
npm install -g @martintrojer/xdrawUse
Open existing file:
xdraw diagram.excalidrawCreate new file:
xdraw new sketch.excalidrawBoth commands launch the default browser and keep a tiny local Node.js server running for save/load.
By default, the server exits shortly after the opened browser tab is closed. Pass --keep-alive to keep it running:
xdraw --keep-alive diagram.excalidrawDevelop
Install dependencies:
npm installBuild the browser bundle:
npm run buildRun directly without global install:
npm start -- diagram.excalidrawLink the local checkout globally while developing:
npm install -g .npm install -g . links the xdraw command globally to this local checkout. Re-run npm run build after frontend changes.
Typecheck and format:
npm run typecheck
npm run format:checkNotes
Ctrl+S/Cmd+Ssaves- closing/reloading the tab warns when there are unsaved changes
- the local server exits after the browser tab closes unless
--keep-aliveis passed - file path without extension gets
.excalidrawadded newfails if file already exists- frontend assets are built into
dist/clientby Vite - set
XDRAW_NO_OPEN=1to skip browser launch during testing
