Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.
Rust chatgptclaudeclidesktopdesktop-appelectron-alternativegeminilinuxmacosnativefierno-electronrusttauriweb-to-desktopwebsite-to-appwebviewwindowsyoutube
export type SupportedPlatform = 'win32' | 'darwin' | 'linux';
export type TauriPlatform = 'windows' | 'macos' | 'linux';
export interface PakeCliOptions {
// Application name
name?: string;
// Explicit app identifier / bundle id
identifier?: string;
// Window title (supports Chinese characters)
title?: string;
// Application icon
icon: string;
// Application window width, default 1200px
width: number;
// Application window height, default 780px
height: number;
// Whether the window is resizable, default true
resizable: boolean;
// Whether the window can be fullscreen, default false
fullscreen: boolean;
// Start window maximized, default false
maximize: boolean;
// Enable immersive header, default false. macOS only.
hideTitleBar: boolean;
// Show Back and Forward buttons in the title bar, default false. macOS only.
navigationButtons: boolean;
// Hide native window decorations, default false. Windows and Linux only.
hideWindowDecorations: boolean;
// Enable windows always on top, default false
alwaysOnTop: boolean;
// App version, the same as package.json version, default 1.0.0
appVersion: string;
// Force app to use dark mode (supports macOS, Windows, and Linux), default false
darkMode: boolean;
// Disable web shortcuts, default false
disabledWebShortcuts: boolean;
// Set a shortcut key to wake up the app, default empty
activationShortcut: string;
// Custom User-Agent, default off
userAgent: string;
// Enable system tray, default off for macOS, on for Windows and Linux
showSystemTray: boolean;
// Tray icon, default same as app icon for Windows and Linux, macOS requires separate png or ico
systemTrayIcon: string;
// Recursive copy, when url is a local file path, if this option is enabled, the url path file and all its subFiles will be copied to the pake static file folder, default off
useLocalFile: false;
// Multi arch, supports both Intel and M1 chips, only for Mac
multiArch: boolean;
// Build target architecture/format:
// Linux: "deb", "appimage", "rpm", "zst" and "*-arm64" variants; Windows: "x64", "arm64"; macOS: "intel", "apple", "universal"
targets: string;
// Windows Rust toolchain: 'msvc' (default, Tauri's recommended toolchain)
// or 'gnu' (MinGW/MSYS2, for machines without Visual Studio Build Tools).
// Undefined keeps today's msvc-only behavior. Windows only; ignored elsewhere.
windowsToolchain?: 'msvc' | 'gnu';
// Debug mode, outputs more logs
debug: boolean;
// Machine-readable mode: logs go to stderr, stdout carries one JSON result, default false
json: boolean;
// Path to a JSON config file whose fields mirror CLI options plus url
config?: string;
/** External scripts that need to be injected into the page. */
inject: string[];
// Download directory in the packaged app; empty uses the system default.
downloadDir: string;
// Set Api Proxy
proxyUrl: string;
// Prompt for HTTP Basic credentials at runtime on macOS, default false.
basicAuth: boolean;
// Installer language, valid for Windows users, default is en-US
installerLanguage: string;
// Hide window on close instead of exiting, platform-specific: true for macOS, false for others
hideOnClose: boolean | undefined;
// Launch app in incognito/private mode, default false
incognito: boolean;
// Restore the last main-window URL on launch, default true
restoreLastUrl: boolean;
// Enable native WebView2 password-save prompts on Windows, default false
passwordAutosave: boolean;
// Enable WebAssembly support (Flutter Web, etc.), default false
wasm: boolean;
// Enable drag and drop functionality, default false
enableDragDrop: boolean;
// Build the executable without packaging it into an installer (Linux only),
// default true. Set false via --no-bundle for RPM distros where the bundler aborts.
bundle: boolean;
// Keep raw binary file alongside installer, default false
keepBinary: boolean;
// Allow multiple instances, default false (single instance)
multiInstance: boolean;
// Allow opening multiple windows in one app instance, default false
multiWindow: boolean;
// Start app minimized to tray, default false
startToTray: boolean;
// Force navigation to stay inside the Pake window even for external links
forceInternalNavigation: boolean;
// Regex pattern to match URLs that should be considered internal
internalUrlRegex: string;
// Comma-separated domains kept inside the app, compiled into internalUrlRegex, default empty
safeDomain: string;
// Enable in-page Find UI and Cmd/Ctrl+F/G shortcuts, default false
enableFind: boolean;
// Initial page zoom level (50-200), default 100
zoom: number;
// Minimum window width, default 0 (no limit)
minWidth: number;
// Minimum window height, default 0 (no limit)
minHeight: number;
// Ignore certificate errors (for self-signed certs), default false
ignoreCertificateErrors: boolean;
// Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging
iterativeBuild: boolean;
// Allow sites to open new windows, default false
newWindow: boolean;
// Auto-install app to /Applications (macOS) after build, default false
install: boolean;
// Request camera entitlement on macOS, default false
camera: boolean;
// Request microphone entitlement on macOS, default false
microphone: boolean;
}
export interface PakeAppOptions extends PakeCliOptions {
identifier: string;
}
export interface PlatformSpecific<T> {
macos: T;
linux: T;
windows: T;
}
export interface WindowConfig {
url: string;
hide_title_bar: boolean;
navigation_buttons: boolean;
hide_window_decorations: boolean;
fullscreen: boolean;
maximize: boolean;
width: number;
height: number;
resizable: boolean;
url_type: string;
always_on_top: boolean;
dark_mode: boolean;
disabled_web_shortcuts: boolean;
activation_shortcut: string;
hide_on_close: boolean;
incognito: boolean;
restore_last_url: boolean;
password_autosave: boolean;
title?: string;
enable_wasm: boolean;
start_to_tray: boolean;
force_internal_navigation: boolean;
internal_url_regex: string;
enable_find: boolean;
zoom: number;
min_width: number;
min_height: number;
ignore_certificate_errors: boolean;
new_window: boolean;
}
export interface PakeConfig {
windows: WindowConfig[];
user_agent: PlatformSpecific<string>;
system_tray: PlatformSpecific<boolean>;
system_tray_path: string;
proxy_url: string;
download_dir: string;
basic_auth: boolean;
multi_instance: boolean;
multi_window: boolean;
inject?: string[];
}
export interface PakeTauriConfig {
productName?: string;
identifier?: string;
version?: string;
mainBinaryName?: string;
pake: PakeConfig;
bundle: {
icon?: string[];
resources?: string[];
targets?: string[];
linux?: {
deb: { files?: Record<string, string>; desktopTemplate?: string };
rpm?: { files?: Record<string, string>; desktopTemplate?: string };
[key: string]: unknown;
};
windows?: {
wix: { language: string[] };
[key: string]: unknown;
};
[key: string]: unknown;
};
app: {
security?: { headers?: Record<string, string> };
trayIcon?: unknown;
[key: string]: unknown;
};
build?: unknown;
[key: string]: unknown;
}