CLI tool and library that allows fetching Excalidraw diagrams as Plain text from the Excalidraw public API, which can be used for storage and combined with other tools to render the diagrams.
The library relies on the parameters obtained from Excalidraw shareable links, which have the following format
https://excalidraw.com/#json=documentID,decryptionKey
go install github.com/loveholidays/excalidraw-decrypt/cmd/excalidraw-decrypt@latest
brew install loveholidays/tap/excalidraw-decrypt
Grab the latest OS/Arch compatible binary from our Releases page.
Given an Excalidraw shareable link, for example https://excalidraw.com/#json=pJK6JcJMr7LGOuy1NbCKP,YneEARvxllEU6vlDQfz81A
you just need to run the tool in the command line, passing as an argument from the URL after #json=
.
excalidraw-decrypt pJK6JcJMr7LGOuy1NbCKP,YneEARvxllEU6vlDQfz81A > my_diagram.excalidraw
Simply create a decrypter client and pass the same argument as a single string. Find an example on this codebase.
decrypter := excalidrawdecrypt.CreateShareableExcalidrawDecrypter()
plaintext, err := decrypter.Decrypt("pJK6JcJMr7LGOuy1NbCKP,YneEARvxllEU6vlDQfz81A")
You can import back the fetched plaintext diagram to excalidraw to continue editing, opening the file in Excalidraw
To continue editing the original document, simply visit the Excalidraw shareable link in a browser
Requires go 1.22.2. Running make build
will create an excalidraw-decrypt
binary in the bin
directory.
Using a public Excalidraw API to download the ciphered diagram:
https://json.excalidraw.com/api/v2/documentID
The downloaded diagram is decrypted using the decryptionKey from the shareable link.
The diagram in this shareable link paints the picture of the steps required to get the Excalidraw file in plaintext: https://excalidraw.com/#json=pJK6JcJMr7LGOuy1NbCKP,YneEARvxllEU6vlDQfz81A