Skip to main content

krema.toml Reference

The krema.toml file is the central configuration for your Krema application. This page documents all available options.

[package]

Application metadata and identity.

[package]
name = "my-app"
version = "1.0.0"
identifier = "com.example.myapp"
description = "My Krema Application"
OptionTypeDefaultDescription
namestring"krema-app"Application name (used in bundle, window title)
versionstring"0.1.0"Semantic version string
identifierstring"com.example.app"Reverse-domain bundle identifier
descriptionstring""Application description

[window]

Main window configuration.

[window]
title = "My App"
width = 1200
height = 800
min_width = 800
min_height = 600
resizable = true
fullscreen = false
decorations = true
OptionTypeDefaultDescription
titlestring"Krema App"Window title
widthint1024Initial window width in pixels
heightint768Initial window height in pixels
min_widthint0Minimum window width (0 = no limit)
min_heightint0Minimum window height (0 = no limit)
resizablebooltrueAllow window resizing
fullscreenboolfalseStart in fullscreen mode
decorationsbooltrueShow window decorations (title bar, borders)

[build]

Build and development settings.

[build]
frontend_command = "npm run build"
frontend_dev_command = "npm run dev"
frontend_dev_url = "http://localhost:5173"
out_dir = "dist"
java_source_dir = "src-java"
main_class = "com.example.Main"
assets_path = "assets"
OptionTypeDefaultDescription
frontend_commandstring"npm run build"Command to build frontend for production
frontend_dev_commandstring"npm run dev"Command to start frontend dev server
frontend_dev_urlstring"http://localhost:5173"URL of frontend dev server
out_dirstring"dist"Output directory for built assets
java_source_dirstring"src-java"Directory containing Java source files
main_classstringnullMain class (auto-detected if not specified)
assets_pathstring"assets"Path to static assets directory

[bundle]

Platform bundling configuration.

[bundle]
icon = "icons/icon.icns"
identifier = "com.example.myapp"
copyright = "Copyright 2024 Example Inc."
OptionTypeDefaultDescription
iconstringnullPath to application icon
identifierstringnullBundle identifier (overrides package.identifier)
copyrightstringnullCopyright notice

[bundle.macos]

macOS-specific bundling options.

[bundle.macos]
signing_identity = "Developer ID Application: Example Inc."
entitlements = "entitlements.plist"
notarization_apple_id = "[email protected]"
notarization_team_id = "ABCDEF1234"
OptionTypeDefaultDescription
signing_identitystringnullCode signing identity for macOS
entitlementsstringnullPath to entitlements.plist file
notarization_apple_idstringnullApple ID for notarization
notarization_team_idstringnullTeam ID for notarization

[bundle.windows]

Windows-specific bundling options.

[bundle.windows]
signing_certificate = "cert.pfx"
timestamp_url = "http://timestamp.digicert.com"
OptionTypeDefaultDescription
signing_certificatestringnullPath to code signing certificate (.pfx)
timestamp_urlstring"http://timestamp.digicert.com"Timestamp server URL

[permissions]

Permission system configuration. Controls which native APIs are accessible.

[permissions]
allow = [
"fs:read",
"fs:write",
"clipboard:read",
"clipboard:write",
"notification",
"dialog",
"shell:open"
]

Available Permissions

PermissionDescription
fs:readRead files from the filesystem
fs:writeWrite files to the filesystem
fs:*Full filesystem access
clipboard:readRead from clipboard
clipboard:writeWrite to clipboard
notificationShow desktop notifications
shell:executeExecute shell commands
shell:openOpen files/URLs with default app
system-traySystem tray access
system-infoRead system information
networkNetwork requests
dialogFile dialogs
window:manageMulti-window management
sql:readSQL plugin read access
sql:writeSQL plugin write access
websocket:connectWebSocket connections
upload:sendFile uploads
autostart:manageAutostart management

[updater]

Auto-update configuration.

[updater]
pubkey = "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXkK..."
endpoints = [
"https://releases.example.com/latest.json"
]
check_on_startup = true
timeout = 30
OptionTypeDefaultDescription
pubkeystringnullEd25519 public key for verifying updates
endpointsstring[]nullURLs to check for update manifests
check_on_startupbooltrueAutomatically check for updates on launch
timeoutint30HTTP timeout in seconds

See the Auto Updates guide for details on setting up updates.

Deep link / custom URL scheme configuration.

[deep-link]
schemes = ["myapp", "myapp-dev"]
OptionTypeDefaultDescription
schemesstring[]nullCustom URL schemes to register (e.g., myapp://)

[splash]

Splash screen configuration.

[splash]
enabled = true
image = "splash.png"
width = 480
height = 320
show_progress = true
OptionTypeDefaultDescription
enabledboolfalseShow splash screen during startup
imagestringnullPath to splash screen image
widthint480Splash window width
heightint320Splash window height
show_progressboolfalseShow loading progress indicator

[env.*]

Environment-specific configuration overrides. Profiles are selected via the --profile CLI flag.

[env.development]
[env.development.build]
frontend_dev_url = "http://localhost:3000"

[env.development.window]
title = "My App (Dev)"

[env.staging]
[env.staging.updater]
endpoints = ["https://staging.example.com/updates.json"]

[env.production]
[env.production.updater]
endpoints = ["https://releases.example.com/updates.json"]

Environment profiles can override settings in these sections:

  • build
  • window
  • package
  • updater

Using Profiles

# Development
krema dev --profile development

# Staging build
krema build --profile staging

# Production bundle
krema bundle --profile production

Complete Example

[package]
name = "my-app"
version = "1.0.0"
identifier = "com.example.myapp"
description = "My awesome desktop application"

[window]
title = "My App"
width = 1200
height = 800
min_width = 800
min_height = 600
resizable = true
fullscreen = false
decorations = true

[build]
frontend_command = "npm run build"
frontend_dev_command = "npm run dev"
frontend_dev_url = "http://localhost:5173"
out_dir = "dist"
java_source_dir = "src-java"
assets_path = "assets"

[bundle]
icon = "icons/icon.icns"
identifier = "com.example.myapp"
copyright = "Copyright 2024 Example Inc."

[bundle.macos]
signing_identity = "Developer ID Application: Example Inc. (ABCDEF1234)"
notarization_apple_id = "[email protected]"
notarization_team_id = "ABCDEF1234"

[bundle.windows]
signing_certificate = "certs/signing.pfx"

[permissions]
allow = [
"fs:read",
"fs:write",
"clipboard:*",
"notification",
"dialog",
"shell:open"
]

[updater]
pubkey = "your-base64-encoded-public-key"
endpoints = ["https://releases.example.com/latest.json"]
check_on_startup = true
timeout = 30

[deep-link]
schemes = ["myapp"]

[splash]
enabled = true
image = "splash.png"
width = 480
height = 320

[env.development]
[env.development.window]
title = "My App (Dev)"

[env.production]
[env.production.updater]
endpoints = ["https://releases.example.com/updates.json"]