Hacker GitHub

← All repos

d2lang/d2

View on GitHub ↗ ★ 25,781 Go

D2 is a modern diagram scripting language that turns text to diagrams.

46 mentions on Hacker News by 9 people: 10 stories, 36 comments · first 2022-11-22 · latest 2026-04-15

Mentions per year 46 mentions · busiest year 2022 (27)
20082026
  1. …to this comment on an issue, folks in their discord say it's not being actively maintained. https://github.com/terrastruct/d2/issues/2735#issuecomment-4...
    comment by 16bitvoid · 2026-04-15 · in Pretty Fish: A better mermaid diagram editor
  2. …and more powerful, but it's a little concerning it hasn't had any commits in the past 6 months: https://github.com/terrastruct/d2/commits/master/
    comment by neuronexmachina · 2026-04-15 · in Pretty Fish: A better mermaid diagram editor
  3. …capabilities. I think out loud a bit here, and if you have thoughts, would love to hear them: https://github.com/terrastruct/d2/discussions/2677
    comment by alixanderwang · 2025-10-26 · in D2: Diagram Scripting Language
  4. I always liked D2 more than mermaid, except IMO, this makes grid layouts essentially useless: https://github.com/terrastruct/d2/issues/1164 Having to figure out the exact pixel widths defeats the point of these tools, at least for me.
  5. It switches to ELK: https://github.com/terrastruct/d2/blob/master/d2cli/main.go#...
  6. ▲ 8
    D2: Modern diagram scripting language that turns text to diagrams
    story by klaussilveira · 2025-04-02 · 1 comment
  7. …our code for calling RoughJS ([1]) from Go in order to produce the hand-drawn diagram look: [2] [0] https://github.com/terrastruct/d2 [1] https://roughjs.com/ [2] https://github.com/terrastruct/d2/blob/master/d2renderers/d2...
    comment by alixanderwang · 2024-09-06 · in Goja: A Golang JavaScript Runtime
  8. D2 is my current favorite: https://github.com/terrastruct/d2
  9. Looks great! Giving it a try, posted a $220 bounty: https://github.com/terrastruct/d2/issues/921
    comment by alixanderwang · 2023-04-02 · in Show HN: Algora – Paid open-source contributions
  10. we embed some CSS in SVG outputs to make animated diagrams for our text-to-diagram language: https://github.com/terrastruct/d2/releases/tag/v0.3.0
  11. ▲ 9
    D2 0.3: text to animated diagrams
    story by alixanderwang · 2023-03-30 · 0 comments
  12. …our text-to-diagram language, users need to be able to reproduce their docs even if we shut down ( https://github.com/terrastruct/d2 ).
  13. https://github.com/terrastruct/d2
  14. ▲ 1
    D2 v0.2.5 (text-to-diagram language)
    story by alixanderwang · 2023-03-17 · 0 comments
  15. ▲ 2
    D2 v0.2 (open-source text-to-diagram language)
    story by alixanderwang · 2023-03-06 · 0 comments
  16. ▲ 3
    D2 v0.2.2 (text-to-diagram language)
    story by alixanderwang · 2023-03-06 · 0 comments
  17. ▲ 1
    Diagrams that change colors for dark mode preference
    story by alixanderwang · 2023-02-25 · 0 comments
  18. ▲ 2
    D2 0.2.1
    story by alixanderwang · 2023-02-24 · 0 comments
  19. …in Terrastruct ( https://www.youtube.com/watch?v=EhxVVkxv2Ns ), which uses the open-source D2 ( https://github.com/terrastruct/d2 ) for its code
    comment by alixanderwang · 2023-01-12 · in Architecture diagrams should be code
  20. ▲ 1
    D2 v0.14
    story by alixanderwang · 2022-12-31 · 0 comments
  21. …y.d2lang.com/?script=PNCxCsJADIfxPU_xH1uk4NzBJwlI... I'm not familiar with EPS. Will investigate, ty. https://github.com/terrastruct/d2/issues/489
    comment by alixanderwang · 2022-12-21 · in D2 language, open source alternative to PlantUML
  22. …it's been almost 100% fixing/improving things the community's surfaced. Long list of stuff here: https://github.com/terrastruct/d2/releases . Re fonts: that README is for contributing fonts. I'm not sure what the best solution is for…
    comment by alixanderwang · 2022-12-21 · in D2 language, open source alternative to PlantUML
  23. …fonts, one has to recompile the code with appropriate .tff files? It's shortly mentioned [1]. [1] https://github.com/terrastruct/d2/tree/master/d2renderers/d2...
  24. ▲ 2
    D2 0.1
    story by alixanderwang · 2022-12-08 · 0 comments
  25. You can trivially sidestep this with a main shell function called at the end of your script. https://github.com/terrastruct/d2/blob/729b12685af79bbdaf4b3...
    comment by nhooyr · 2022-12-02 · in The Audacity of Piping Curl to Bash
  26. …be packed with features/improvements/fixes that came from feedback received on HN from the launch: https://github.com/terrastruct/d2/blob/master/ci/release/cha... https://github.com/terrastruct/d2/pull/259
    comment by alixanderwang · 2022-12-01 · in Text to Diagram Tools
  27. Since it's not mentioned, we also use as TODOs/issue-tracker. https://github.com/terrastruct/d2/issues We actually switched from Linear to Github Issues because of how nice it is to have the TODOs colocated with PRs and code. I suspect…
    comment by alixanderwang · 2022-11-28 · in Open Source and Saying “No”
  28. …so latex would just be another language tag. you can follow here and be notified when it's ready: https://github.com/terrastruct/d2/issues/135
  29. …windows now has a POSIX shell interpreter? We're likely going to add a chocolatey package too. See https://github.com/terrastruct/d2/issues/96 See https://github.com/terrastruct/d2/blob/master/docs/INSTALL.m...
  30. …to help, we're trying to figure some of these configs here in case something stands out to you! https://github.com/terrastruct/d2/pull/95
  31. elkjs is an alternative! https://github.com/terrastruct/d2#plugins . we haven't gotten the defaults to look as good though
  32. ty for the suggestion, our designer will come up with some! https://github.com/terrastruct/d2/issues/158
  33. …API, so you should be able to transpile from other graph libraries easily. see the second half of https://github.com/terrastruct/d2#d2-as-a-library
  34. we'll get this up next week. https://github.com/terrastruct/d2/issues/96
  35. love this idea. https://github.com/terrastruct/d2/issues/153
  36. Whoops, sorry. I opened https://github.com/terrastruct/d2/issues/140 to address. For now, we zoomed the gif in so you can see it better. And we added a syntax example front and center.
  37. …subsantially older, you'll probably have to install from source due to the c dependencies. See https://github.com/terrastruct/d2/blob/master/docs/INSTALL.m...
  38. yeah there's overhead with the fonts bundled in. we might change this, https://github.com/terrastruct/d2/discussions/132 i wasn't aware you could selectively choose characters for fonts, but that'd be ideal
  39. this is coming soon to D2: https://github.com/terrastruct/d2/pull/91
  40. …(if any) to D2's plugin system to make integration easy. (created a Github Discussion to track. https://github.com/terrastruct/d2/discussions/138 . if there's enough demand, we'll do it ourselves)
  41. …until it's publicly released. if this is a blocker, feel free to watch this issue to be notified! https://github.com/terrastruct/d2/issues/99
  42. …the importance of ecosystem. e.g. a proof of concept plugin to make diagrams look hand-drawn: https://github.com/terrastruct/d2/pull/91
  43. …are a wip, but to the larger point, D2 has a plugin system which enables extensions like this ( https://github.com/terrastruct/d2/pull/91 ). there's still some fleshing out to do with the API, but once it's up, it should be a…
  44. …alternative to Mermaid etc. Thanks for open-sourcing your core! I really like the cheat sheet: https://github.com/terrastruct/d2/blob/master/docs/assets/ch...
  45. …are plans for Win* release? yep. should be in a week or so, along with other installation stuff: https://github.com/terrastruct/d2/blob/master/docs/INSTALL.m...
  46. ▲ 629
    D2, a diagram scripting language that turns text to diagrams, is now open source
    story by alixanderwang · 2022-11-22 · 155 comments