Choose a Package
Pick the smallest GlucoseIQ package that owns the contract your application needs.
GlucoseIQ splits analytics from framework adapters. Start with
@glucoseiq/core, then add a package when your application needs its API.
| Package | Owns | Add it when | Runtime relationship |
|---|---|---|---|
@glucoseiq/core | Analytics, mapped ingestion, connectors, interoperability, and optional SVG renderers | You need glucose-data primitives or render-ready data | No runtime dependencies |
@glucoseiq/react | Memoized hooks and React wrappers for the core SVG renderers | Your client interface uses React 18 or newer | Depends on core; React is a peer |
@glucoseiq/tokens | Zone names, thresholds, palettes, trend glyphs, and CSS variables | You are building your own visual layer | No runtime dependencies |
@glucoseiq/testing | Seeded synthetic CGM-shaped fixtures | You need repeatable tests, demos, stories, or screenshots | Depends on core types and contracts |
@glucoseiq/cli | Mapped delimited-data reports, JSON output, and AGP-style SVG files | You need a terminal workflow or an injectable command runner | Depends on core; exposes the glucoseiq executable |
diabetic-utils | The 107-export compatibility bridge | You are migrating an existing diabetic-utils application | Version 2 re-exports core; 1.5 remains on the legacy tag |
All published packages require Node.js 24 or newer. The React package keeps a
react >=18 peer range and is the only package with a React boundary.
Start with core
Install only the engine when you own the UI, use another framework, or run analytics in a server process:
npm install @glucoseiq/coreThe root export covers the main data model and analytics. Four public subpaths group APIs by responsibility:
@glucoseiq/core/metricsfor individual metrics@glucoseiq/core/connectorsfor supported payload normalizers@glucoseiq/core/interopfor interoperability helpers@glucoseiq/core/renderfor optional SVG-string renderers
See the core API reference for the public contract.
Add packages by boundary
Use React when React owns presentation, tokens when your design system owns rendering, testing for synthetic fixtures, and the CLI for file-oriented terminal workflows. The API reference lists each package's public exports.
Install only the packages your application uses. The package boundaries show which code belongs in browser bundles and which dependencies affect upgrades.
Migrate existing applications
New applications should import @glucoseiq/core directly. Existing
diabetic-utils applications can move through the compatibility package
without losing the 1.5 public export surface. Follow the
migration guide for version, runtime, and import changes.