https://github.com/rin2yh/pumlv
A Go-based local PlantUML preview server. Renders in the browser without Java/Docker, with auto-reload on file save.
https://github.com/rin2yh/pumlv
go plantuml plantuml-preview react
Last synced: 11 days ago
JSON representation
A Go-based local PlantUML preview server. Renders in the browser without Java/Docker, with auto-reload on file save.
- Host: GitHub
- URL: https://github.com/rin2yh/pumlv
- Owner: rin2yh
- License: mit
- Created: 2026-05-13T03:56:18.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-06-24T13:47:58.000Z (14 days ago)
- Last Synced: 2026-06-24T15:21:43.490Z (14 days ago)
- Topics: go, plantuml, plantuml-preview, react
- Language: TypeScript
- Homepage:
- Size: 679 KB
- Stars: 14
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pumlv
A Go-based local preview server for PlantUML. Just run `pumlv ` and the diagram opens in your browser, re-rendering automatically whenever you save the file. No Java, no Docker, no external server required.
- Renders entirely in the browser via PlantUML's TeaVM build — your source never leaves your machine
- Live re-render over SSE the moment you save
- Standalone process — works regardless of which editor you use
## Installation
Download a pre-built binary from the [releases page](https://github.com/rin2yh/pumlv/releases).
Or with [mise](https://mise.jdx.dev/) ([GitHub backend](https://mise.jdx.dev/dev-tools/backends/github.html)):
```sh
mise use -g github:rin2yh/pumlv
```
## Usage
```sh
pumlv ./docs # watch a directory recursively
pumlv ./design/seq.puml # a single file
pumlv ./docs ./design/seq.puml # multiple arguments are allowed
```
### Flags
| Flag | Default | Description |
|------|---------|-------------|
| `--port` | `0` (pick a free port) | TCP port |
| `--host` | `127.0.0.1` | Bind host |
| `--no-open` | `false` | Do not launch the browser automatically |
| `--ext` | `.puml,.plantuml,.iuml,.wsd` | File extensions to watch |
On startup pumlv prints `pumlv listening on http://127.0.0.1:` and opens the URL in your default browser. Press `Ctrl+C` for a graceful shutdown.
## Background
Existing PlantUML preview options have a few rough edges:
- Most tools are editor plugins (VSCode / IntelliJ / Vim, etc.) that stop working the moment you switch editors. pumlv runs as a standalone process, independent of any editor.
- Local rendering typically requires installing Java and Graphviz, or running Docker as separate infrastructure. pumlv has no runtime dependencies beyond the binary itself.
- Web-based tools (e.g. plantuml.com) send your diagram source to an external server. pumlv renders entirely in the browser via PlantUML's TeaVM build; your source never leaves your machine.
- Editor plugins can only preview the file currently open in that editor. pumlv accepts any file or directory path on the command line, regardless of what you have open.
pumlv aims to remove all of these pain points.
> This repository is inspired by [k1LoW/mo](https://github.com/k1LoW/mo) (a local preview server for Markdown).
## About PlantUML rendering
To keep everything in the browser, this project bundles PlantUML's official TeaVM build (`plantuml.js` ~7 MB + `viz-global.js` ~1.4 MB). `internal/frontend/scripts/fetch-plantuml-core.mjs` downloads `js-plantuml-SNAPSHOT.zip` from the [plantuml/plantuml releases](https://github.com/plantuml/plantuml/releases/tag/snapshot), extracts the two files, Vite copies them into `internal/static/dist/`, and `go:embed` then bundles them into the final binary. PlantUML source is never sent to any external service.
## License
MIT. See [LICENSE](./LICENSE).
Third-party license texts are bundled in [`CREDITS`](./CREDITS); run `pumlv credits` to print them.