@ops-ai/nuxt-toggly-core

Core feature flag utilities for Nuxt
2,645 5
Install
npm install @ops-ai/nuxt-toggly-core
Latest Version:1.16.1
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: scatteredcode

@ops-ai/nuxt-toggly-core

Core feature flag utilities for Nuxt

Install

npm install @ops-ai/nuxt-toggly-core

Optional gRPC transport (Node/Nitro server only):

npm install @grpc/grpc-js @grpc/proto-loader

Import gRPC helpers from @ops-ai/nuxt-toggly-core/telemetry/grpc — do not import that subpath from browser or Nitro edge bundles. Browser @ops-ai/nuxt-toggly-client injects the compact frontend reporter; trusted server usage/metrics and their identity-aware legacy methods stay on the server runtime.

Live updates

WebSocket live updates are enabled when enableLiveUpdates is unset or true (browser, Node with globalThis.WebSocket, or an injected webSocketImpl). Edge runtimes skip long-lived sockets. Pass webSocketImpl from the ws package on Node 18 when no global WebSocket exists (done automatically by @ops-ai/nuxt-toggly-server).

Documentation

Entity context

Pass a domain object on each isFeatureOn / evaluateFeatureGate call. setContext is the user, not the page entity. Register mappers with registerContext locally — this client does not PUT entity schemas.

Entity gates fail closed without context. See Nuxt SDK.

client.registerContext('Order', (order) => ({
  kind: 'Order',
  key: String(order.id),
  attributes: { Status: order.status },
}))

await client.isFeatureOn('OrderBadge', order, 'Order')

License

MIT — see also the repository LICENSE.

Issues

Use the structured issue templates.

SSR evaluated snapshots

client.hydrateEvaluatedFeatures({ MyFeature: true }) applies a trusted SSR boolean snapshot in remote evaluation mode. It updates actual core state and notifies feature-refresh subscribers without fetching or starting timers. It leaves featureDefaults unchanged; changing identity before initialization withholds the previous identity's snapshot. Use hydrateDefinitions for local raw-definition snapshots. This API trusts its caller and is not a replacement for verifying externally downloaded signed definitions.

Related Packages

@ops-ai/nuxt-toggly-server

Server-side feature flag utilities for Nuxt with Nitro support

1,631 5
@ops-ai/nuxt-toggly-client

Client-side feature flag composables and components for Nuxt/Vue 3

1,745 5
@ops-ai/nuxt-toggly

Feature flags for Nuxt 3 and 4 - composables, components, directives, and server...

1,502 5
@agrid/nuxt

Nuxt module for Agrid - Product analytics and feature flags

1,410 0
@application-kit/feature-flags

Фичефлаги из окружения: набор флагов параметром, порт с адаптером окружения, SSR...

0

Version History

Version Released License
1.16.1 MIT
1.15.2 MIT
1.14.0 MIT
1.13.0 MIT
1.12.1 MIT