> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skyvexsoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ctx.config

> Persistent per-plugin key-value storage from a background module.

`ctx.config` (`PluginConfigStore`) is a persistent key-value store namespaced to your plugin. All methods are async, and values survive shell restarts.

```ts theme={null}
const interval = await ctx.config.get<number>("refresh_interval", 30);
const links = await ctx.config.get<object[]>("quick_links", []);

await ctx.config.set("last_sync", Date.now());
await ctx.config.delete("stale_key");

const all = await ctx.config.getAll();
```

Note: `config.get()` is async in the background context. In the UI context (via [`usePluginContext()`](/sdk/hooks/use-plugin-context)), it's synchronous.

**When to use it:** store small amounts of plugin state that must outlive a restart — sync cursors, cached metadata, user-set preferences. For larger or relational data, reach for [`ctx.database`](/sdk/background/context/database) instead.
