bellstate-vue

Vue composables for bellstate — machine-global state in Electron renderers
183
Install
npm install bellstate-vue
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Sep 17, 2026
Links: GitHub  ·  npm
Maintainer: kevinvera

bellstate-vue

Vue 3 composables for bellstate — machine-global state for Electron and Node processes, backed by a Rust daemon.

npm install bellstate bellstate-vue

Set up bellstate in your Electron main process (initBellstate) and preload (exposeBellstate) — see the bellstate README. Then, in any component:

<script setup>
import { useBellstate, useBellstateIncr, useBellstateStatus } from 'bellstate-vue';

const theme = useBellstate('theme', 'light');   // writable computed — v-model works
const incr = useBellstateIncr('counter');
const connected = useBellstateStatus();
</script>

<template>
  <input v-model="theme" />
  <button @click="incr()">+1 {{ connected ? '●' : '○' }}</button>
</template>
  • useBellstate(key, initial) → writable computed ref — updates when any process on the machine writes the key; assignment writes through the daemon.
  • setBellstate(key, value, opts?) / mergeBellstate(key, partial) — awaitable writes; resolve with the new store revision.
  • useBellstateIncr(key) — server-side atomic increment.
  • useBellstateStatus() / useBellstateRev() — read-only refs for connection state and store revision.

Works with Vite or any bundler — the composables talk to the window.bellstate bridge exposed by the preload script; nothing Node-specific runs in the renderer.

MIT

Related Packages

@vt7/vue2-composables

Vue2 composables

523 1
@shopware/composables

Shopware Frontends composables for Vue

141,216 230
@harlem/core

Powerfully simple global state management for Vue 3

39,073 515
vuex-electron

Vuex Electron

28,252 301
@tb-dev/vue

Vue utilities

12,617

Version History

Version Released Vue License
0.2.0 >=3 MIT