https://github.com/oberwager/d2-live
An open-source service to generate image URLs for diagrams based on the provided D2 code. 99.99% Uptime
https://github.com/oberwager/d2-live
d2 d2lang diagram kubernetes
Last synced: 2 months ago
JSON representation
An open-source service to generate image URLs for diagrams based on the provided D2 code. 99.99% Uptime
- Host: GitHub
- URL: https://github.com/oberwager/d2-live
- Owner: oberwager
- License: mit
- Created: 2023-04-22T03:06:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-04-01T19:13:41.000Z (3 months ago)
- Last Synced: 2026-04-02T06:37:58.382Z (3 months ago)
- Topics: d2, d2lang, diagram, kubernetes
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 19
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
D2-Live
Generate Live Diagram URLs with D2
[](https://github.com/oberwager/d2-live/actions/workflows/docker-publish.yml)
[](https://github.com/oberwager/d2-live/actions/workflows/build.yml)
[](https://uptime.lucas.tools/)
[](https://github.com/oberwager/d2-live/blob/master/LICENSE)
[](https://coveralls.io/github/oberwager/d2-live?branch=master)
[](https://www.buymeacoffee.com/lucasobe)
## Aboout
D2-Live is a dynamic tool for creating live, embeddable diagrams using the D2 language.
## Key Features and Benefits
- **Effortless Diagram Generation**: Convert text to diagrams instantly.
- **Live URLs**: Share and embed your diagrams anywhere with live URLs.
- **SVG Output**: High-quality, scalable vector graphics ensure your diagrams look sharp at any size.
## How to Use D2-Live
1. **Create a Diagram**: Start with a text-based diagram in D2 language. Example:
```
x: That's got to be the best pirate I've ever seen
x -> y
y: So it would seem...
y -> z: Jack Sparrow's theme starts
z: Fade into horizon
```
2. **Use D2-Playground**: Paste your diagram into [d2-playground](https://play.d2lang.com/).
3. **Generate Live URL**: Change the URL domain to `d2.lucas.tools`. For example, `https://d2.lucas.tools/?script=` gives you an SVG of your diagram.
4. **Embed and Share**: The SVG diagram can be embedded and shared anywhere.

You can use any of the [D2-Themes](https://d2lang.com/tour/themes) to customize the look of your diagram, just add `&theme=` to the URL.
## Contributing to D2-Live
We welcome contributions! Please refer to our [Contribution Guidelines](https://github.com/oberwager/d2-live/CONTRIBUTING.md) for details on how to submit changes, coding standards, and testing procedures.
## License
D2-Live is MIT licensed. For more information, please refer to the [LICENSE](https://github.com/oberwager/d2-live/blob/master/LICENSE) file.