Skip to content

Vibe coding a plugin? 😎 Teach your agent Modlumi first. Works with Claude Code, Codex, Cursor and more.

PluginSettings

A plugin’s settings for the current user, such as preferences, kept outside models. Values are stored as JSON, as JSON.stringify writes them, so get returns a copy. Changes are saved right away and are not undoable. A plugin’s settings can take up to 1 MiB of JSON.

const segments = context.settings.get("segments", 24);
context.settings.set("segments", segments * 2);

get<T>(key): T | undefined

Returns the value stored under key, or undefined when there is none.

T = unknown

string

T | undefined

get<T>(key, defaultValue): T

Returns the value stored under key, or defaultValue when there is none.

T

string

T

T


set(key, value): void

Stores a JSON value under key; undefined removes it.

string

unknown

void