Monorepo for the NiiVue ecosystem — browser-based medical image visualization.
| Package | Description | npm |
|---|---|---|
@niivue/niivue | Core WebGPU/WebGL2 medical image viewer | |
@niivue/nvreact | React bindings for NiiVue | |
@niivue/uikit | Rulers, crosshairs, annotations, and an on-canvas control layer (buttons, menus, sliders, text fields, dialogs) for NiiVue | |
@niivue/nv-ohif | NiiVue viewport extension for the OHIF Viewer | |
@niivue/nv-web-component | Lit-based Web Components for NiiVue | |
@niivue/nv-ext-drawing | Drawing interpolation and segmentation tools | |
@niivue/nv-ext-image-processing | Image processing (Otsu thresholding, haze removal, etc.) | |
@niivue/nv-ext-save-html | Export a NiiVue scene as a self-contained HTML file | |
@niivue/nv-ext-tile | Tiled formats: /tiff streams tiled/pyramidal TIFF, OME-TIFF and SVS slides (geotiff-rs; JPEG 2000 via dcm2niix) by HTTP Range; /dicom opens DICOM-WSI folders or hosted manifests (JPEG 2000 / JPEG-LS via dcm2niix); /zarr loads or streams OME-Zarr volumes | |
@niivue/nv-mcp | MCP server and page client so an agent can drive a NiiVue scene | |
@niivue/web-bridge | Typed two-way JSON-envelope bridge between a NiiVue web view and a native (WKWebView) host | — |
NiiVueKit | Swift package (BridgeCore + NiiVueKit) pairing with @niivue/web-bridge to embed NiiVue in SwiftUI apps via WKWebView | — |
@niivue/dev-images | Shared test volumes, meshes, and tractography files (Git LFS) | — |
ipyniivue | Jupyter widget wrapping NiiVue (anywidget) — Python wheel |
| App | Description |
|---|---|
demo-ext-drawing | Demo app for the drawing extension |
demo-ext-image-processing | Demo app for the image processing extension |
demo-ext-save-html | Demo app for the save-to-HTML extension |
demo-ext-fullstack | Fullstack demo wiring NiiVue to a Bun server that runs the niimath native binary |
demo-ext-tile | Pan/zoom a tiled TIFF / SVS, DICOM-WSI or 2D OME-Zarr slide streamed by HTTP Range, or local files, via @niivue/nv-ext-tile; plus OME-Zarr pages (ome.zarr.html, range.html, vox.block.pick.zarr.html) |
demo-mcp | Demo page and Bun server for the MCP package, drivable from Claude Code |
demo-nv-web-component | Demo app for the Web Components package |
iiif-volumetric-server | IIIF Image API + Presentation API server for volumetric NIfTI and OME-Zarr fixtures |
iiif-volumetric-demo | Browser demos for the IIIF volumetric server, including slices, volume sheets, fly-through, desktop, and OME-Zarr views |
medgfx | Native macOS/iOS SwiftUI app embedding NiiVue in a WebView |
Use the hot-reloadable live demos for local development—they provide the fastest feedback loop while working on the project.
git clone git@github.com:niivue/mono.git
cd mono
bun install
bunx nx build niivue
git lfs install
git lfs pull
bun run devCore commands include
bun install # Install all dependencies
bunx nx build <project> # Build a single project (builds deps first)
bunx nx run-many -t build # Build all projects
bunx nx run-many -t test # Run all testsSee CONTRIBUTING.md for detailed setup, tooling, and development instructions.
Packages are versioned and published using Nx Release via the Release GitHub workflow:
- Release candidates are published automatically on every push to
main. Each merged PR that contains releasable conventional commits produces newx.y.z-rc.Nversions on the npmnextdist-tag. - Stable releases are manual. Run the Release workflow from the Actions tab on
mainwith the "release candidate" box unchecked to publishx.y.zversions on the npmlatestdist-tag.
See the Releases section of CONTRIBUTING.md for details. To publish by hand instead, ensure you are logged in to npm (npm login) and have publish access to the @niivue scope:
# 1. Version — bumps package.json and updates workspace deps
# Use --first-release if no git tags exist yet for the project
bunx nx release version <version> --projects=<project>
# 2. Changelog (optional) — generate from conventional commits
bunx nx release changelog <version> --projects=<project>
# 3. Build
bunx nx run-many -t build --projects=<project1>,<project2>
# 4. Publish — run from each package directory
# bun publish resolves workspace:* dependencies automatically
cd packages/<project> && bun publish --tag next --access publicUse --tag next for prerelease versions (e.g. 1.0.0-rc.1). Omit --tag for stable releases (defaults to latest). The --access public flag is required for scoped @niivue/* packages.
Pushing to main automatically builds and deploys all examples and demo apps to GitHub Pages. To preview the site locally:
.github/build-pages.sh --serve # build and serve at http://localhost:8080/