Skip to main content

Configuration Reference

This document lists all configurable options in Elftia, grouped by functional domain.


Environment Variables

Frontend (Vite / VITE_*)

Frontend environment variables are exposed with the VITE_ prefix and can be accessed in React code via import.meta.env.

VariableTypeDefaultDescription
VITE_APP_TITLEstring'Elftia'Application title
VITE_DEV_PORTnumber5375Vite Dev Server port

Backend (Main Process)

VariableTypeDefaultDescription
LOG_LEVELstring'info'Log level (debug / info / warn / error)
NODE_ENVstring'development'Runtime environment
ELECTRON_IS_DEVstring'1'Whether running in development mode

App Preferences (AppPreferences)

Read/write via window.api.appPreferences. Stored in the SQLite database.

FieldTypeDefaultDescription
sendByCtrlEnterbooleanfalseSend messages with Ctrl+Enter
autoScrollToBottombooleantrueAuto-scroll to the bottom on new messages
showThinkingbooleantrueShow the model's thinking process
autoExpandToolsbooleanfalseAuto-expand tool call details
showRawParametersbooleanfalseShow raw parameters for tool calls

Theme Configuration (Theme)

Read/write via window.api.theme. Full state structure:

Mode

FieldTypeDefaultDescription
mode'light' | 'dark' | 'system''system'Theme mode

User Custom Theme (UserTheme)

FieldTypeDescription
colorsRecord<string, string>Custom color token overrides
fonts{ ui?: string; code?: string; display?: string }Custom fonts

Custom CSS

FieldTypeDefaultDescription
customCssstring''User-injected custom CSS

Wallpaper

All wallpaper-related fields reside in ThemePreferencesSchema (packages/desktop/app/main/services/platform/config/store/configSchema.ts), stored at config.theme, and partially updated via IPC theme:setWallpaperPreferences. See packages/desktop/app/shared/contracts/settings-types.ts → ThemePreferences for the source definition.

Wallpaper Source (Image / Gradient)

FieldTypeDefaultDescription
wallpaper{ light?: string; dark?: string }{}Image wallpaper source; supports file://, wallpaper:// protocols, data: URLs, or whitelisted https:// URLs
wallpaperGradient{ stops: string[1..4]; angle?: number 0..360 }null1–4 color linear gradient; takes priority over wallpaper; enabling it temporarily hides the image
disableWallpaperInCompactWindowsbooleanfalseDisable wallpaper in compact windows (Mini/Selection)
wallpaperOverlayEnabledbooleanfalseEnable translucent surfaces (better suited for wallpaper mode)

Frosted Glass & Overlay

FieldTypeRangeDefaultDescription
wallpaperBlurIntensitynumber0–306Frosted glass blur in px
wallpaperDimmingnumber0–10070Overall overlay opacity %
wallpaperDimmingHuenumber0–3600Overlay HSL hue (decoded from hex color picker)
wallpaperDimmingSaturationnumber0–1000Overlay HSL saturation %
wallpaperDimmingLightnessnumber-1–100-1Overlay HSL lightness %; -1 = auto (white in light mode, black in dark mode); 0–100 = manual
wallpaperDimmingGradientWallpaperGradient | nullnullGradient overlay; when enabled it overrides the HSL above, but wallpaperDimming still controls overall opacity

Element Background Tint (Sidebar / Cards / Tabs and other translucent surfaces)

FieldTypeDefaultDescription
wallpaperElementTintstring (#RRGGBB or '')''Element surface tint; empty string = use theme default (warm cream / warm charcoal)
wallpaperElementGradientWallpaperGradient | nullnullElement gradient; overrides solid tint; each tier keeps its own alpha

Message Bubbles (User / Assistant independently)

FieldTypeDefaultDescription
wallpaperBubbleOverridebooleanfalseMaster switch: true = bubbles use the independent fields below; false = bubbles follow element background settings (color + default opacity)
wallpaperBubbleTintUserstring (#RRGGBB or '')''User bubble solid color; active when override is on
wallpaperBubbleTintAssistantstring (#RRGGBB or '')''Assistant bubble solid color; active when override is on
wallpaperBubbleGradientUserWallpaperGradient | nullnullUser bubble gradient; overrides solid color on this side
wallpaperBubbleGradientAssistantWallpaperGradient | nullnullAssistant bubble gradient; overrides solid color on this side
wallpaperBubbleOpacitynumber 0–10035Bubble fill alpha; only active when override is on

Overall Element Opacity

FieldTypeRangeDefaultDescription
wallpaperElementOpacitynumber0–1000Experimental: pushes translucent UI overall toward opaque
wallpaperTransparencynumber0–100100Surface tint intensity coefficient (0 = fully transparent surface; 100 = default alpha)

Hex / Gradient Validation

  • Hex fields (wallpaperElementTint / wallpaperBubbleTint*) Zod regex: /^(#[0-9a-fA-F]{6})?$/ (empty string or #RRGGBB).
  • WallpaperGradient.stops requires 1–4 strings; the backend ThemeService.setWallpaperPreferences also discards empty string stops and truncates the array to 4 items.
  • In the IPC payload for gradient fields, null = clear; omitting the key = keep current value. The backend distinguishes these via 'wallpaperDimmingGradient' in patch.

Priority (Rendering Override Order)

wallpaperGradient > wallpaper.{light,dark} // main wallpaper source
wallpaperDimmingGradient > wallpaperDimming{Hue,Saturation,Lightness} // overlay color
wallpaperElementGradient > wallpaperElementTint // element tint
wallpaperBubbleGradient{User,Assistant} > wallpaperBubbleTint{User,Assistant} // bubble color (only when override is on)

When wallpaperBubbleOverride=false, the downstream data-wp-bubble-override attribute is not written to body, and CSS falls back to the "bubbles inherit element tint" rule.


LLM Configuration

Provider (ProviderConfig)

Configuration structure for each LLM provider:

FieldTypeDescription
idstringUnique identifier
namestringDisplay name
typestringProvider type (openai / anthropic / google / deepseek, etc.)
apiKeystringAPI key (stored on the backend, not transmitted via IPC)
baseUrlstring?Custom API endpoint
modelsModel[]Available model list
enabledbooleanWhether enabled

Global Model Parameters (GlobalModelParameters)

FieldTypeRangeDefaultDescription
temperaturenumber0 - 2Provider defaultGeneration temperature
maxTokensnumber1 - model limitProvider defaultMaximum output token count
topPnumber0 - 1Provider defaultTop-P sampling
topKnumber1 - 100Provider defaultTop-K sampling (some providers)
frequencyPenaltynumber-2 - 20Frequency penalty
presencePenaltynumber-2 - 20Presence penalty

API Key Pool (ApiKeyEntry)

Configuration for each key entry:

FieldTypeDefaultDescription
idstringAuto-generatedUnique key identifier
providerIdstring-Owning provider ID
labelstring?-Key label
apiKeystring-Key value (encrypted storage)
weightnumber1Weight (1–100); affects round-robin distribution probability
enabledbooleantrueWhether enabled

Key pool behavior:

  • Uses Weighted Round-Robin to distribute keys
  • Session affinity: same session preferentially uses the same key
  • 429/529 responses automatically switch to the next key
  • Exponential backoff cooldown: 60s → 2min → 5min → 15min

Agent Configuration

TinyElf Engine Defaults

FieldTypeDefaultDescription
maxIterationsnumber40Maximum iteration count
temperaturenumber0.1Generation temperature
maxTokensnumber8192Maximum output token count
toolResultMaxCharsnumber50000Maximum characters in tool results

Claude SDK Engine

FieldTypeDescription
permissionModestringPermission mode (ask / auto-approve / deny)
maxTurnsnumberMaximum conversation turns
systemPromptAppendstring?Content to append to the system prompt

Security Configuration

GuardianAgent

FieldTypeDescription
mode'off' | 'monitor' | 'enforce'Operating mode
allowedCommandsstring[]Allowlist of commands that may be executed
blockedPathsstring[]Path patterns that are blocked from access

PromptGuardian

FieldTypeDescription
mode'off' | 'warn' | 'block'Operating mode

RateLimiter

FieldTypeDefaultDescription
maxRequestsPerMinutenumber60Maximum requests per minute
maxTokensPerMinutenumber100000Maximum tokens per minute

MCP Configuration (McpServerConfig)

Configuration structure for each MCP server:

FieldTypeDescription
idstringUnique identifier
namestringDisplay name
transport'stdio' | 'sse' | 'streamable-http'Transport protocol
commandstring?Startup command (stdio mode)
argsstring[]?Command arguments (stdio mode)
envRecord<string, string>?Environment variables (stdio mode)
urlstring?Server URL (sse / streamable-http mode)
enabledbooleanWhether enabled
autoConnectbooleanAuto-connect on app startup

Cron Scheduled Tasks

Schedule Configuration

FieldTypeDescription
schedulestringCron expression (5/6-field format)
timezonestring?Timezone identifier (e.g. Asia/Tokyo)
enabledbooleanWhether enabled

Action Types

TypeDescription
agent-runRun the specified Agent
channel-checkCheck Channel messages
custom-scriptRun a custom script

Channel Configuration

Trigger Modes

ModeDescription
mentionRespond only when @-mentioned
keywordRespond when a keyword is present
allRespond to all messages

Platform Message Length Limits

PlatformMax Characters
Discord2000
Telegram4096
Slack40000
Custom WebhookUnlimited

CSS Variables (Tailwind Tokens)

Defined in packages/renderer/src/app/index.css and mapped to utility classes via the Tailwind configuration.

Color Tokens

CSS VariableTailwind ClassDescription
--backgroundbg-backgroundPage main background
--foregroundtext-foregroundPrimary text color
--surface-0bg-surface-0L0 layer background
--surface-1bg-surface-1L1 layer background (cards/sidebar)
--surface-2bg-surface-2L2 layer background (inputs/secondary containers)
--surface-3bg-surface-3L3 layer background (popovers)
--text-strongtext-foregroundPrimary headings, body text (93% brightness)
--text-mutedtext-muted-foregroundSecondary text (65% brightness)
--text-subtletext-text-subtleAuxiliary hints (50% brightness)
--primarybg-primary / text-primaryTheme color
--secondarybg-secondarySecondary color
--destructivetext-destructiveError/destructive color
--successtext-successSuccess color
--warningtext-warningWarning color
--borderborder-borderBorder color
--ringring-ringFocus ring color
--mutedbg-mutedMuted background
--accentbg-accentAccent background
--popoverbg-popoverPopover background
--cardbg-cardCard background

Fonts

CSS VariableTailwind ClassFont
--font-sansfont-sansInter, system-ui
--font-monofont-monoJetBrains Mono, monospace
--font-displayfont-displayNoto Serif, Georgia, serif
--font-uifont-uiUser-customized UI font
--font-codefont-codeUser-customized code font

Border Radius

CSS VariableTailwind ClassValue
--radiusrounded-lg0.5rem (8px)
-rounded-md0.375rem (6px)
-rounded-sm0.25rem (4px)
-rounded-xl0.75rem (12px)

File Config (ConfigStore)

Read/write via window.api.config. Stored in a JSON file with hot-reload support.

When configuration changes, the main process notifies the frontend via the config:changed channel.

Common Config Keys

KeyTypeDescription
magiMagiConfigMagi/Claw Agent configuration
magi.promptVersion'v1' | 'v2' | 'v3' | 'v4'Prompt build version
cronCronConfigCron scheduled task configuration
channelChannelConfigChannel messaging configuration
securitySecurityConfigSecurity control configuration
tip

The full config file path can be retrieved via window.api.config.getPath().