Home

Awesome

<img src="assets/workflow.png" alt="logo" width="25"/> Excalidraw Converter

A command line tool for porting Excalidraw diagrams to Gliffy and draw.io.

Excalidraw is great for sketching diagrams as part of a design process, but chances are that you have to redo those sketches for documentation. This tool is made to bridge those tasks.

Excalidraw Converter ports Excalidraw diagrams to a Gliffy compatible format, which can be imported directly into services like Gliffy, Gliffy for Confluence, draw.io or draw.io for Confluence.

Excalidraw vs. Gliffy comparison

Getting started

Installation

MacOS with Homebrew

brew install sindrel/tap/excalidraw-converter

Installation for other OSes

Download a compatible binary from the Releases page.

If you're a Linux or MacOS user, move it to your local bin folder to make it available in your environment (optional).

How to convert diagrams

First save your Excalidraw diagram to a file.

Then, to do a conversion, simply execute the binary by specifying the gliffy command, and the path to your Excalidraw file.

exconv gliffy -i ~/Downloads/my-diagram.excalidraw
<details> <summary>MacOS example</summary>
$ exconv gliffy -i ~/Downloads/my-diagram.excalidraw
Parsing input file: ~/Downloads/my-diagram.excalidraw
Adding object: com.gliffy.shape.basic.basic_v1.default.rectangle
Adding object: com.gliffy.shape.basic.basic_v1.default.text
[...]
Adding object: com.gliffy.shape.basic.basic_v1.default.text
Adding object: com.gliffy.shape.basic.basic_v1.default.line
Converted diagram saved to file: my-diagram.gliffy
</details> <details> <summary>Linux example</summary>
$ ./exconv gliffy -i ~/Downloads/my-diagram.excalidraw
Parsing input file: ~/Downloads/my-diagram.excalidraw
Adding object: com.gliffy.shape.basic.basic_v1.default.rectangle
Adding object: com.gliffy.shape.basic.basic_v1.default.text
[...]
Adding object: com.gliffy.shape.basic.basic_v1.default.text
Adding object: com.gliffy.shape.basic.basic_v1.default.line
Converted diagram saved to file: my-diagram.gliffy
</details> <details> <summary>Windows example</summary>
C:\> exconv.exe gliffy -i C:\Downloads\my-diagram.excalidraw
Parsing input file: C:\Downloads\my-diagram.excalidraw
Adding object: com.gliffy.shape.basic.basic_v1.default.rectangle
Adding object: com.gliffy.shape.basic.basic_v1.default.text
[...]
Adding object: com.gliffy.shape.basic.basic_v1.default.text
Adding object: com.gliffy.shape.basic.basic_v1.default.line
Converted diagram saved to file: my-diagram.gliffy
</details>

Importing

Animation demonstrating use

After converting your diagram(s), import them into Gliffy (or draw.io) using the standard Import dialog.

Commands

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  gliffy      Convert an Excalidraw diagram to Gliffy format
  help        Help about any command
  version     Output the application version

Flags:
  -h, --help   help for exconv

Gliffy conversion options

When an output file path is not provided, it will be determined automatically based on the filename of the input file. If you provide the input file path ./subfolder/your_file.excalidraw, the default output file path will be ./your_file.gliffy.

This can be overridden using the -o flag.

Example:
  exconv gliffy -i your_file.excalidraw

Usage:
  exconv gliffy [flags]

Flags:
  -h, --help            help for gliffy
  -i, --input string    input file path
  -o, --output string   output file path (default "your_file.gliffy")

Features

All fixed shapes and most styling and text options are supported.

Shapes

Text

Styling

Library graphics are not fully supported (experimental).

Compatibility with draw.io

Converted Gliffy diagrams should also work in the online version of draw.io.

In draw.io, you can import a diagram by simply opening the file from your device. If you're using draw.io for Confluence, you should be able use the import dialog.

Note that this is only supported in the online version of draw.io, not the desktop app.

Contributing

See something you'd like to improve? Great! See the contributing guidelines for instructions.

Attributions

Development

<details> <summary>Instructions</summary>

Prerequisites:

Download dependencies

go mod download

Run tests

go test -v ./...

Compile and run

go run ./cmd/main.go <command> <arguments>
</details>