Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/devv-shayan/Trueears/llms.txt

Use this file to discover all available pages before exploring further.

Settings are stored in a JSON file (settings.json) managed by the Tauri store plugin. Values persist across application restarts.

get_store_value

Retrieves a value from the persistent settings store by key.
import { invoke } from '@tauri-apps/api/core';

const value = await invoke<string | null>('get_store_value', { key: 'GROQ_API_KEY' });

if (value) {
  console.log('API key is configured');
} else {
  console.log('No API key set');
}

Parameters

key
string
required
The settings key to retrieve. Any string is valid. Keys that contain KEY, TOKEN, SECRET, or PASSWORD (case-insensitive) are automatically redacted in application logs.

Returns

Promise<string | null> — The stored value, or null if the key has not been set.
Keys that contain KEY, TOKEN, SECRET, or PASSWORD in their name are logged with a redacted value and length indicator (e.g., <redacted len=40>) to prevent secrets from appearing in log files.

set_store_value

Saves a value to the persistent settings store and persists it to disk immediately.
import { invoke } from '@tauri-apps/api/core';

// Save a plain setting
await invoke('set_store_value', { key: 'theme', value: 'dark' });

// Save a sensitive credential
await invoke('set_store_value', { key: 'GROQ_API_KEY', value: apiKey });

Parameters

key
string
required
The settings key to write. Keys containing KEY, TOKEN, SECRET, or PASSWORD are redacted in logs.
value
string
required
The string value to store.

Returns

Promise<void>

Side effects

After saving, set_store_value emits a settings-changed event to all open windows. Any window listening to this event should re-read the values it depends on.
import { listen } from '@tauri-apps/api/event';

// In any window — re-load config when another window saves a setting
const unlisten = await listen('settings-changed', () => {
  reloadConfig();
});

Common setting keys

KeyDescription
GROQ_API_KEYGroq API key for Whisper STT and chat LLM
themeUI color theme (light | dark)
Trueears_ONBOARDING_COMPLETEWhether the user has completed onboarding ("true")
app_profilesJSON-serialized array of app profile configurations

Build docs developers (and LLMs) love