{"id":20145133,"url":"https://github.com/terrastruct/d2-obsidian","last_synced_at":"2025-09-11T14:14:36.256Z","repository":{"id":64489441,"uuid":"570408958","full_name":"terrastruct/d2-obsidian","owner":"terrastruct","description":"The official D2 plugin for Obsidian. D2 is a modern diagram scripting language thats turns text to diagrams.","archived":false,"fork":false,"pushed_at":"2024-06-06T21:57:37.000Z","size":1333,"stargazers_count":259,"open_issues_count":27,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-28T13:42:15.609Z","etag":null,"topics":["diagramming","diagrams","obsidian","software-architecture","text-to-diagram"],"latest_commit_sha":null,"homepage":"https://d2lang.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terrastruct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-25T05:43:32.000Z","updated_at":"2025-08-24T15:38:19.000Z","dependencies_parsed_at":"2025-01-22T21:10:33.124Z","dependency_job_id":"dd7dc34c-fa8c-43dc-a3f2-e6c274067a6a","html_url":"https://github.com/terrastruct/d2-obsidian","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/terrastruct/d2-obsidian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrastruct%2Fd2-obsidian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrastruct%2Fd2-obsidian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrastruct%2Fd2-obsidian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrastruct%2Fd2-obsidian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrastruct","download_url":"https://codeload.github.com/terrastruct/d2-obsidian/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrastruct%2Fd2-obsidian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274652761,"owners_count":25325139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diagramming","diagrams","obsidian","software-architecture","text-to-diagram"],"created_at":"2024-11-13T22:14:26.119Z","updated_at":"2025-09-11T14:14:36.180Z","avatar_url":"https://github.com/terrastruct.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./docs/assets/banner.png\" alt=\"D2\" /\u003e\n  \u003ch2\u003e\n    D2 Obsidian Plugin\n  \u003c/h2\u003e\n\nD2 is a modern diagram scripting language thats turns text to diagrams. The source code for D2, as well as install instructions and all other information, can be found at\n[https://github.com/terrastruct/d2](https://github.com/terrastruct/d2).\n\n[![ci](https://github.com/terrastruct/d2-obsidian/actions/workflows/ci.yml/badge.svg)](https://github.com/terrastruct/d2-obsidian/actions/workflows/ci.yml)\n[![ci](https://github.com/terrastruct/d2-obsidian/actions/workflows/daily.yml/badge.svg)](https://github.com/terrastruct/d2-obsidian/actions/workflows/daily.yml)\n[![license](https://img.shields.io/github/license/terrastruct/d2-obsidian?color=9cf)](./LICENSE.txt)\n[![discord](https://img.shields.io/discord/1039184639652265985?label=discord)](https://discord.gg/NF6X8K4eDq)\n\nhttps://user-images.githubusercontent.com/6413609/205414613-5b2559f1-0645-4432-bb7b-d980de527201.mp4\n\n\u003c/div\u003e\n\n## Installation\n\nSettings \u003e Community plugins \u003e Browse \u003e Search for \"D2\"\n\n**important**: [D2](https://github.com/terrastruct/d2) must be installed for this plugin to work currently. We will later on introduce a remote API as an option, but currently this plugin calls your local installation of D2.\n\n## Configurations\n\n- `Layout engine`: D2 supports multiple layout engines, which can significantly affect the look of your diagram.\n- `Theme ID`: For a list of available themes, visit the [D2 repository](https://github.com/terrastruct/d2/tree/master/d2themes).\n- `Pad`: Number of pixels padded around the rendered diagram.\n- `Sketch mode`: Render the diagram to look like it was sketched by hand.\n- `Container height`: Diagram max render height in pixels (Requires d2 v0.2.2 and up).\n- `Debounce`: Number of milliseconds to wait after a change has made to refresh the diagram (min 100).\n- `Path`: Customize the path to `d2` (optional). We check common places D2 might be installed, along with your system path. However, your OS or setup may require you to input your path to `d2` manually. To do so, type `where d2` into your terminal, and copy everything in the path up until `/d2` and paste it into this configuration.\n\n## Usage\n\nCreate a fenced codeblock with `d2` as the language tag:\n\n```d2\nHello -\u003e World\n```\n\n## How to run this plugin locally\n\n- Clone this repo.\n- Run `yarn` to install dependencies.\n- Run `yarn run dev` to start compilation in watch mode.\n- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `[VaultFolder]/.obsidian/plugins/d2/`.\n\n## FAQ\n\n- I have D2 installed but I'm running into `D2 Compilation Error: d2: command not found`\n  - The Obsidian plugin may not be able to locate your D2 installation. Get the path to the D2 installation by executing `where d2` in the command line, then copy that path minus the executable itself into the `Path` plugin setting (so if the path is `/usr/local/bin/d2`, then you want to copy `/usr/local/bin`).\n- I have a question or need help.\n  - The best way to get help is to ask on [D2 Discord](https://discord.gg/NF6X8K4eDq).\n- I'd like to contribute.\n  - We welcome contributions! Please pick one from an existing Issue, or open one if none exists.\n- I have a feature request, proposal, or bug report.\n  - Please open up a Github Issue. If it's D2-specific, please open it in the [D2 repository](https://github.com/terrastruct/d2). If it's specific to this plugin, please open it here.\n- I have a private inquiry.\n  - Please reach out at [hi@d2lang.com](hi@d2lang.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrastruct%2Fd2-obsidian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrastruct%2Fd2-obsidian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrastruct%2Fd2-obsidian/lists"}