v0.1.3 Apache-2.0 open source VS Code + DevEco Studio plugins

Turn one sentence into a standard diagram for your HarmonyOS project

HarmonyAIDraw is an AI diagramming agent for HarmonyOS flowcharts and UML: built on open-source draw.io, it closes the loop between design and AI coding inside your IDE — natural language to diagrams, code reverse-engineering to diagrams, and diagrams to code verified by real hvigor compilation. It compresses a 30-minute hand-drawn flowchart down to about one minute.

HarmonyAIDraw chat-to-diagram: the AI panel generates a JWT login sequence diagram inside DevEco Studio while the canvas updates incrementally
30min→1minflowchart authoring
<60smid-size project reverse-engineering
<15sfirst token to first shape
6sDemoApp compile loop
1000+nodes, still fluid
12MB→0ArkTS parser dependencies
Core capabilities

Four pipelines, design through code

The HarmonyOS AI-coding stack has long lacked professional diagramming — drawings made in external tools, architectures reconstructed in your head, AI coding without a visual spec. HarmonyAIDraw fills the gap.

F1

Chat-to-diagram

Generate flowcharts, sequence diagrams, use-case diagrams, architecture diagrams and class diagrams from natural language. Watch the agent paint progressively with a live step trace; refine over multiple turns; Ctrl+Z reverts every single step. Drop in an image, PDF or sketch and say "recreate the flow in this picture" to get a standard editable diagram.

  • 5 UML/flowchart types
  • Multimodal attachments
  • Incremental refinement
  • Step-by-step undo
F2

Code-to-diagram

Scan a HarmonyOS project (module.json5 / oh-package.json5 / .ets sources) and get the three-layer module architecture (entry/har/hsp), flowcharts, sequence and class diagrams — with the scan result as the single source of truth. Architecture onboarding drops from days to one conversation.

HarmonyAIDraw code reverse-engineering: the entry/har three-layer architecture diagram generated from a 5-module HarmonyOS DemoApp project
F3

Diagram-to-code with a real compile loop

Diagram → ArkTS code (pages + ViewModels + auto-registered routes) → real hvigor compile verification, with failure logs fed back for automatic repair (≤2 rounds), producing an -unsigned.hap. Generation is not the finish line — a green build is. Java/Spring, Python and React skeletons are also supported.

$ hvigor assembleHap --no-daemon
# diagram-to-code: read graph semantics → write pages/ViewModels/routes
BUILD SUCCESSFUL in 6s
✔ artifact: entry-default-unsigned.hap
F4

One engine, two IDEs

DevEco Studio and VS Code share the same web assets and engine — zero duplicated business logic. Model configs, session history and panel state carry across both; sessions bind to .drawio pages and migrate automatically when files are renamed or moved, so refactors never break the link.

  • Shared config across IDEs
  • SQLite-persisted sessions
  • Bilingual UI (EN/中文)
  • Path sandboxing
Architecture

One four-layer architecture, zero duplicated code

One set of web assets, one engine, one protocol, two thin plugin shells — new engine capabilities reach both IDEs with zero shell changes.

HarmonyAIDraw four-layer shared architecture: L1 web assets (host-page + drawio), L2 engine (engine-server), L3 protocol (HostBridge), L4 plugin shells (VS Code and DevEco Studio)
Four-layer shared architecture (dashed boxes: built in-house; solid boxes: reused / third-party)
Four-layer architecture responsibilities
LayerComponentsResponsibility
L4 Plugin shells vscode (TS) · deveco (Kotlin) Host integration: webview, process/port management, file I/O
L3 Protocol drawio embed protocol + HostBridge Message routing: canvas messages, RPC, LLM tool round-trips
L2 Engine engine-server (Node) LLM gateway, dual SQLite stores, project scanner, hvigor builder
L1 Web assets host-page + drawio v32.2.0 Same-page drawio integration, 100% shared across hosts
draw.io, zero fork 28 agent tools on canvas 0 duplicated business code Local-first design Only 2 runtime dependencies
Install

Two IDEs, one minute each

VS Code users install from the Marketplace in one click; DevEco Studio users grab the plugin zip from the Release page and install from disk.

VS Code extension

≥ 1.85 · v0.1.3

Published on the VS Code Marketplace — search HarmonyAIDraw in the Extensions panel or install from the CLI:

$ code --install-extension Jiangbing321.harmonyaidraw-vscode

DevEco Studio plugin

≥ 26.0.0.851 · v0.1.3

Download the plugin zip from the AtomGit Release page and install from disk:

  1. File → Settings → Plugins
  2. Install Plugin from Disk → pick harmonyaidraw-deveco-0.1.3.zip
  3. Restart the IDE, then right-click → New → HarmonyAIDraw Diagram

Prerequisite: an API key from any LLM provider (GLM / DeepSeek / Qwen / Claude all work), entered on first launch; privately deployed models are supported.

Quick start

Your first AI diagram in three steps

From install to diagram, without ever leaving the IDE.

Install the plugin

From the Marketplace in VS Code, or from disk in DevEco Studio — see Install.

Configure a model

On first launch, enter any API key: GLM / DeepSeek / Qwen / Claude or a private endpoint.

Chat a diagram

Open or create a .drawio file, describe your need in the AI panel, and watch it paint.

$ code --install-extension Jiangbing321.harmonyaidraw-vscode
# DevEco Studio: File → Settings → Plugins
#                → Install Plugin from Disk → *.zip
$ mkdir demo && code demo
# create login.drawio → type in the AI panel:
"Draw a sequence diagram for user login with JWT issue & verify"
Draw a sequence diagram for user login verification, including JWT issue and verify
  1. ✓ Search sequence shapes (UML stencil index)
  2. ✓ Insert 5 role nodes
  3. ✓ Draw 8 message edges (merged incrementally)
  4. ✓ Self-check: crossings / overlaps
Sequence diagram ready (5 roles · 8 messages, live on canvas and editable). Make JWT issue async, or export a PNG? Every step is Ctrl+Z revertible.
FAQ

Frequently asked questions

What is HarmonyAIDraw?

HarmonyAIDraw is an AI diagramming agent for HarmonyOS flowcharts and UML: built on open-source draw.io (v32.2.0), it provides chat-to-diagram, code reverse-engineering, and diagram-to-code pipelines inside your IDE, shipped as both a VS Code extension and a DevEco Studio plugin. Open source under Apache-2.0.

Which LLMs are supported?

Through a self-built LLM gateway (OpenAI-compatible + Anthropic dual protocols) it supports GLM, DeepSeek, Qwen, Claude and privately deployed models — any single provider API key is enough.

Is my code or data uploaded anywhere?

No. HarmonyAIDraw is local-first: diagrams, sessions and model configs are stored in local SQLite, and project scanning runs locally. Only the LLM inference requests you send go to the cloud — and private models close the loop entirely.

How much does it cost?

It is free and open source under the Apache-2.0 license — free to use, modify and commercialize.

What are the system requirements?

Windows 10/11; VS Code ≥ 1.85 or DevEco Studio 26.0.0.851+; and an API key from any LLM provider (GLM / DeepSeek / Qwen / Claude all work).

Which diagram types are supported?

Flowcharts, sequence diagrams, use-case diagrams, software architecture diagrams and class diagrams. Project reverse-engineering additionally produces the HarmonyOS three-layer module architecture (entry/har/hsp). All output is standard .drawio, exportable to PNG/SVG/XML.

Does generated code really compile?

Yes. The diagram-to-code pipeline treats real hvigor compilation as the final judge: after generating ArkTS pages + ViewModels + auto-registered routes, it runs assembleHap, reads failure logs and self-repairs (up to 2 rounds), and finally produces an -unsigned.hap. DemoApp compiles in 6 seconds; a real project in 21 seconds.

Is draw.io forked?

No. draw.io is referenced as a git submodule (v32.2.0) and integrated via its embed protocol with zero fork, respecting its original Apache-2.0 license. Upstream upgrades can be swapped in as a whole.

Let your next architecture diagram start with a sentence

The diagramming infrastructure for 11M+ HarmonyOS developers — now installable in your IDE.