Skip to content

martintrojer/xdraw

Repository files navigation

xdraw

Minimal Excalidraw file editor.

No database. No list page. One job only:

  • open one .excalidraw file 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/xdraw

Use

Open existing file:

xdraw diagram.excalidraw

Create new file:

xdraw new sketch.excalidraw

Both 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.excalidraw

Develop

Install dependencies:

npm install

Build the browser bundle:

npm run build

Run directly without global install:

npm start -- diagram.excalidraw

Link 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:check

Notes

  • Ctrl+S / Cmd+S saves
  • closing/reloading the tab warns when there are unsaved changes
  • the local server exits after the browser tab closes unless --keep-alive is passed
  • file path without extension gets .excalidraw added
  • new fails if file already exists
  • frontend assets are built into dist/client by Vite
  • set XDRAW_NO_OPEN=1 to skip browser launch during testing

About

Minimal Excalidraw file editor.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors