Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Release notes
Changelog
Elyra

Settings store

A small persistent key-value store for app settings and light state — always available, no feature flag. Values are arbitrary JSON, saved to a settings.json file in the OS config directory (keyed by the About name). For real data, use the database feature instead.

Frontend API (@elyra/runtime)

import { store } from "@elyra/runtime";

await store.set("theme", "dark");
await store.set("window", { pinned: true, tab: 3 });

const theme = await store.get<string>("theme");   // "dark" | null
const all = await store.all();                     // Record<string, unknown>

await store.delete("theme");
await store.clear();

Rust API

The store is bound in the container, so commands can use it too:

use elyra::Store;

#[command]
async fn remember(ctx: Ctx, key: String, value: serde_json::Value) {
    ctx.get::<Store>().set(key, value);
}

Store exposes get, set, delete, all, clear, flush and path.

Durability

Writes are atomic: the file is written to settings.json.tmp and renamed over the target, so a crash mid-write can't leave a truncated settings file. The previous good version is kept as settings.json.bak and used automatically if the main file can't be parsed.

Write coalescing

set() / delete() update memory immediately and schedule a debounced flush (250ms) on a blocking task, so a frontend that persists on every keystroke doesn't write the file per keystroke. clear() writes through immediately, flush() forces a write, and the last owner flushes on drop.

Capability

/__store/* is reachable from the frontend with the Store capability (granted by default); store.clear() additionally needs Capability::StoreClear, which is opt-in — see security.

Location and tests

The store lives in the app's data directory (settings.json). Store::at(path) opens a specific file instead, and Store::fake() is an in-memory store that is never written — swap it in with App::swap(Store::fake()) so a test doesn't write into the real app-data directory.

Related

  • Database — for structured, queryable data.
  • Windows — persist_window_state uses the same config directory.