Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tauri Commands Reference

All commands are invoked from the frontend via invoke(command, args). In browser mode, these map to HTTP endpoints (see HTTP API).

PTY Session Management (pty.rs)

CommandArgsReturnsDescription
create_ptyconfig: PtyConfigString (session ID)Create PTY session
create_pty_with_worktreepty_config, worktree_configWorktreeResultCreate worktree + PTY
write_ptysession_id, data()Write to PTY
resize_ptysession_id, rows, cols()Resize PTY
pause_ptysession_id()Pause reader thread
resume_ptysession_id()Resume reader thread
close_ptysession_id, cleanup_worktree()Close PTY session
can_spawn_sessionboolCheck session limit
get_orchestrator_statsOrchestratorStatsActive/max/available
get_session_metricsJSONSpawn/fail/byte counts
list_active_sessionsVec<ActiveSessionInfo>List all sessions
list_worktreesVec<JSON>List managed worktrees
update_session_cwdsession_id, cwd()Update session working directory (from OSC 7)
get_session_foreground_processsession_idJSONGet foreground process info
get_kitty_flagssession_idu32Get Kitty keyboard protocol flags for session
get_last_promptsession_idOption<String>Get last user-typed prompt from input line buffer
get_shell_statesession_idOption<String>Get current shell state (“busy”, “idle”, or null)
has_foreground_processsession_id: StringboolChecks if a non-shell foreground process is running
debug_agent_detectionsession_id: StringAgentDiagnosticsReturns diagnostic breakdown of agent detection pipeline
set_session_namesession_id, name()Set custom display name for a session

Git Operations (git.rs)

CommandArgsReturnsDescription
get_repo_infopathRepoInfoRepo name, branch, status
get_git_diffpathStringFull git diff
get_diff_statspathDiffStatsAddition/deletion counts
get_changed_filespathVec<ChangedFile>Changed files with stats
get_file_diffpath, fileStringSingle file diff
get_git_branchespathVec<JSON>All branches (sorted)
get_recent_commitspathVec<JSON>Recent git commits
rename_branchpath, old_name, new_name()Rename branch
check_is_main_branchbranchboolIs main/master/develop
get_initialsnameString2-char repo initials
get_merged_branchesrepo_pathVec<String>Branches merged into default branch
get_repo_summaryrepo_pathRepoSummaryAggregate snapshot: worktree paths + merged branches + per-path diff stats in one IPC
get_repo_structurerepo_pathRepoStructureFast phase: worktree paths + merged branches only (Phase 1 of progressive loading)
get_repo_diff_statsrepo_pathRepoDiffStatsSlow phase: per-worktree diff stats + last commit timestamps (Phase 2 of progressive loading)
run_git_commandpath, argsGitCommandResultRun arbitrary git command (success, stdout, stderr, exit_code)
get_git_panel_contextpathGitPanelContextRich context for Git Panel (branch, ahead/behind, staged/changed/stash counts, last commit, rebase/cherry-pick state). Cached 5s TTL.
get_working_tree_statuspathWorkingTreeStatusFull porcelain v2 status: branch, upstream, ahead/behind, stash count, staged/unstaged entries, untracked files
git_stage_filespath, files()Stage files (git add). Path-traversal validated
git_unstage_filespath, files()Unstage files (git restore --staged). Path-traversal validated
git_discard_filespath, files()Discard working tree changes (git restore). Destructive. Path-traversal validated
git_commitpath, message, amend?String (commit hash)Commit staged changes; optional --amend. Returns new HEAD hash
get_commit_logpath, count?, after?Vec<CommitLogEntry>Paginated commit log (default 50, max 500). after is a commit hash for cursor-based pagination
get_stash_listpathVec<StashEntry>List stash entries (index, ref_name, message, hash)
git_stash_applypath, index()Apply stash entry by index
git_stash_poppath, index()Pop stash entry by index
git_stash_droppath, index()Drop stash entry by index
git_stash_showpath, indexStringShow diff of stash entry
git_apply_reverse_patchpath, patch, scope?()Apply a unified diff patch in reverse (git apply --reverse). Used for hunk/line restore. scope="staged" adds --cached. Patch passed via stdin (no temp files). Path-traversal validated
get_file_historypath, file, count?, after?Vec<CommitLogEntry>Per-file commit log following renames (default 50, max 500)
get_file_blamepath, fileVec<BlameLine>Per-line blame: hash, author, author_time (unix), line_number, content
get_branches_detailpathVec<BranchDetail>Rich branch listing: name, ahead/behind, last commit date, tracking upstream, merged status
delete_branchpath, name, force()Delete a local branch. force=false uses safe -d; force=true uses -D. Refuses to delete the current branch or default branch
create_branchpath, name, start_point, checkout()Create a new branch from start_point (defaults to HEAD). checkout=true switches to it immediately
get_recent_branchespath, limitVec<String>Recently checked-out branches from reflog, ordered by recency

Commit Graph (git_graph.rs)

CommandArgsReturnsDescription
get_commit_graphpath, count?Vec<GraphNode>Lane-assigned commit graph for visual rendering. Default 200, max 1000. Returns hash, column, row, color_index (0–7), parents, refs, and connection metadata (from/to col/row) for Bezier curve drawing

GitHub Authentication (github_auth.rs)

CommandArgsReturnsDescription
github_start_loginDeviceCodeResponseStart OAuth Device Flow, returns user/device code
github_poll_logindevice_codePollResultPoll for token; saves to keyring on success
github_logout()Delete OAuth token from keyring, fall back to env/CLI
github_auth_statusAuthStatusCurrent auth: login, avatar, source, scopes
github_disconnect()Disconnect GitHub (clear all tokens from keyring and env cache)
github_diagnosticsJSONDiagnostics: token sources, scopes, API connectivity

GitHub Integration (github.rs)

CommandArgsReturnsDescription
get_github_statuspathGitHubStatusPR + CI for current branch
get_ci_checkspathVec<JSON>CI check details
get_repo_pr_statusespath, include_mergedVec<BranchPrStatus>Batch PR status (all branches)
approve_prrepo_path, pr_numberStringSubmit approving review via GitHub API
merge_pr_via_githubrepo_path, pr_number, merge_methodStringMerge PR via GitHub API
get_all_pr_statusespathVec<BranchPrStatus>Batch PR status for all branches (includes merged)
get_pr_diffrepo_path, pr_numberStringGet PR diff content
fetch_ci_failure_logsrepo_path, run_idStringFetch failure logs from a GitHub Actions run for CI auto-heal
check_github_circuitpathCircuitStateCheck GitHub API circuit breaker state

Worktree Management (worktree.rs)

CommandArgsReturnsDescription
create_worktreebase_repo, branch_nameJSONCreate git worktree
remove_worktreerepo_path, branch_name, delete_branch?()Remove worktree; delete_branch (default true) controls whether the local branch is also deleted. Archive script resolved from config (not IPC).
delete_local_branchrepo_path, branch_name()Delete a local branch (and its worktree if linked). Refuses to delete the default branch. Uses safe git branch -d
check_worktree_dirtyrepo_path, branch_nameboolCheck if a branch’s worktree has uncommitted changes. Returns false if no worktree exists
get_worktree_pathsrepo_pathHashMap<String,String>Worktree paths for repo
get_worktrees_dirStringWorktrees base directory
generate_worktree_name_cmdexisting_namesStringGenerate unique name
list_local_branchespathVec<String>List local branches
checkout_remote_branchrepo_path, branch_name()Check out a remote-only branch as a new local tracking branch
detect_orphan_worktreesrepo_pathVec<String>Detect worktrees in detached HEAD state (branch deleted)
remove_orphan_worktreerepo_path, worktree_path()Remove an orphan worktree by filesystem path (validated against repo)
switch_branchrepo_path, branch_name()Switch main worktree to a different branch (with dirty-state and process checks)
merge_and_archive_worktreerepo_path, branch_nameMergeResultMerge worktree branch into base and archive
finalize_merged_worktreerepo_path, branch_name()Clean up worktree after merge (delete branch + worktree)
list_base_ref_optionsrepo_pathVec<String>List valid base refs for worktree creation
run_setup_scriptrepo_path, worktree_path()Run post-creation setup script in new worktree
generate_clone_branch_name_cmdbase_name, existing_namesStringGenerate hybrid branch name for clone worktree

Configuration (config.rs)

CommandArgsReturnsDescription
load_app_configAppConfigLoad app settings
save_app_configconfig()Save app settings
load_notification_configNotificationConfigLoad notifications
save_notification_configconfig()Save notifications
load_ui_prefsUIPrefsConfigLoad UI preferences
save_ui_prefsconfig()Save UI preferences
load_repo_settingsRepoSettingsMapLoad per-repo settings
save_repo_settingsconfig()Save per-repo settings
check_has_custom_settingspathboolHas non-default settings
load_repo_defaultsRepoDefaultsConfigLoad repo defaults
save_repo_defaultsconfig()Save repo defaults
load_repositoriesJSONLoad saved repositories
save_repositoriesconfig()Save repositories
load_prompt_libraryPromptLibraryConfigLoad prompts
save_prompt_libraryconfig()Save prompts
load_notesJSONLoad notes
save_notesconfig()Save notes
save_note_imagenote_id, data_base64, extensionString (absolute path)Decode base64 image, validate ≤10 MB, write to config_dir()/note-images/<note_id>/<timestamp>.<ext>
delete_note_assetsnote_id()Remove note-images/<note_id>/ directory recursively (no-op if missing)
get_note_images_dirStringReturn config_dir()/note-images/ absolute path
load_keybindingsJSONLoad keybinding overrides
save_keybindingsconfig()Save keybinding overrides
load_agents_configAgentsConfigLoad per-agent run configs
save_agents_configconfig()Save per-agent run configs
load_activityActivityConfigLoad activity dashboard state
save_activityconfig()Save activity dashboard state
load_repo_local_configrepo_pathRepoLocalConfig?Read .tuic.json from repo root; returns null if absent or malformed

Agent Detection (agent.rs)

CommandArgsReturnsDescription
detect_agent_binarybinaryAgentBinaryDetectionCheck binary in PATH
detect_all_agent_binariesVec<AgentBinaryDetection>Detect all known agents
detect_claude_binaryStringDetect Claude binary
detect_installed_idesVec<String>Detect installed IDEs
open_in_apppath, app()Open path in application
spawn_agentpty_config, agent_configString (session ID)Spawn agent in PTY
discover_agent_sessionsession_id, agent_type, cwdOption<String>Discover agent session UUID from filesystem for session-aware resume
verify_agent_sessionagent_type, session_id, cwdboolVerify if a specific agent session file exists on disk (for TUIC_SESSION resume)

AI Chat (ai_chat.rs)

Conversational AI companion with terminal context injection. See docs/user-guide/ai-chat.md for the feature overview.

CommandArgsReturnsDescription
load_ai_chat_configAiChatConfigLoad provider / model / base URL / temperature / context_lines from ai-chat-config.json
save_ai_chat_configconfig()Persist chat config
has_ai_chat_api_keyboolWhether an API key is stored in the OS keyring for the current provider
save_ai_chat_api_keykey: String()Store API key in OS keyring (service tuicommander-ai-chat, user api-key)
delete_ai_chat_api_key()Remove stored API key
check_ollama_statusOllamaStatusProbe GET /api/tags on the configured base URL (default http://localhost:11434/v1/); returns reachable + model list
test_ai_chat_connectionStringValidate API key + base URL with a minimal completion request
list_conversationsVec<ConversationMeta>List persisted conversations (id, title, updated_at, message count)
load_conversationid: StringConversationLoad a saved conversation body
save_conversationconversation: Conversation()Persist a conversation to ai-chat-conversations/<id>.json
delete_conversationid: String()Remove a saved conversation (idempotent)
new_conversation_idStringMint a fresh conversation UUID
stream_ai_chatsession_id, messages, chat_id, on_event: Channel<ChatStreamEvent>()Stream a turn. Events: chunk { text }, end, error { message }, tool_call / tool_result (agent mode). Context assembly pulls VtLogBuffer (capped at context_lines), SessionState, recent ParsedEvents, git context
cancel_ai_chatchat_id: String()Cancel an in-flight stream (idempotent)

AI Agent Loop (ai_agent/commands.rs)

ReAct-style agent loop driving a terminal session with ai_terminal_* tools, plus a Tauri-side query for the per-session knowledge store.

CommandArgsReturnsDescription
start_agent_loopsession_id, goalString (status message)Start a ReAct loop on the given terminal session with the given goal. Errors if an agent is already active for the session.
cancel_agent_loopsession_idStringCancel the active agent loop. Errors if no loop is active.
pause_agent_loopsession_idStringPause the active agent loop between iterations.
resume_agent_loopsession_idStringResume a paused agent loop.
agent_loop_statussession_id{ active: bool, state: AgentState?, session_id }Query whether an agent is active and its current state (running/paused/pending_approval).
approve_agent_actionsession_id, approvedStringApprove or reject the pending destructive command the agent wants to run. Errors if no agent is active.
get_session_knowledgesession_idSessionKnowledgeSummaryLightweight summary for the SessionKnowledgeBar UI: commands count, last 5 outcomes with kind badges, recent errors with error_type, TUI mode indicator, TUI apps seen. Returns an empty summary when the session has no recorded knowledge yet.
list_knowledge_sessionsfilter?: { text?, hasErrors?, since? }, limit?SessionListEntry[]Scan persisted ai-sessions/ and list sessions sorted by most recent activity. Filter by text (matches command/output/intent/error_type), errors-only, or UNIX-seconds since lower bound. limit clamps at 500 (default 100).
get_knowledge_session_detailsession_idSessionDetail?Full command history for one session — reads the in-memory store when active, falls back to disk otherwise. HistoryCommand rows include pre-extracted kind/error_type and the opt-in semantic_intent.

Agent Tools (ai_agent/tools.rs)

12 tools available to the ReAct agent loop and exposed via MCP as ai_terminal_*:

Terminal tools (require session_id):

ToolArgsDescription
read_screensession_id, lines?Read visible terminal text (default 50 lines). Secrets redacted.
send_inputsession_id, commandSend a text command to the PTY (Ctrl-U prefix + \r).
send_keysession_id, keySend a special key (enter, tab, ctrl+c, escape, arrows).
wait_forsession_id, pattern?, timeout_ms?, stability_ms?Wait for regex match or screen stability.
get_statesession_idStructured session metadata (shell_state, cwd, terminal_mode).
get_contextsession_idCompact ~500-char context summary.

Filesystem tools (sandboxed per session via FileSandbox):

ToolArgsDescription
read_filefile_path, offset?, limit?Paginated file read (default 200, max 2000 lines). Binary/10MB rejected. Secrets redacted.
write_filefile_path, contentAtomic create/overwrite (tmp+rename). Sensitive paths flagged.
edit_filefile_path, old_string, new_string, replace_all?Search-and-replace. Must be unique unless replace_all=true.
list_filespattern, path?Glob match (e.g. src/**/*.rs). Max 500 entries.
search_filespattern, path?, glob?, context_lines?Regex search, .gitignore-aware. Max 50 matches with context.
run_commandcommand, timeout_ms?, cwd?Shell command with captured stdout/stderr. Safety-checked. Env sanitized.

MCP OAuth 2.1 (mcp_oauth/commands.rs)

OAuth 2.1 authorization for upstream MCP servers. Full RFC 9728 (Protected Resource Metadata) + RFC 8414 (Authorization Server Discovery) flow with PKCE S256. Completion via the tuic://oauth-callback deep link.

CommandArgsReturnsDescription
start_mcp_upstream_oauthname: StringStartOAuthResponseBegin an OAuth flow for the named upstream. Transitions status to authenticating, returns the authorization URL + AS origin for the consent dialog. PKCE challenge is generated and stored per pending flow
mcp_oauth_callbackcode: String, oauth_state: String()Consume the tuic://oauth-callback?code=…&state=… deep link. Exchanges the code for tokens, persists OAuthTokenSet to the OS keyring, transitions upstream to connecting
cancel_mcp_upstream_oauthname: String()Abort an in-flight OAuth flow. Drops the pending entry and resets upstream status

MCP Upstream Proxy (mcp_upstream_config.rs, mcp_upstream_credentials.rs)

Commands for managing upstream MCP servers proxied through TUICommander’s /mcp endpoint.

CommandArgsReturnsDescription
load_mcp_upstreamsUpstreamMcpConfigLoad upstream config from mcp-upstreams.json
save_mcp_upstreamsconfig: UpstreamMcpConfig()Validate, persist, and hot-reload upstream config. Errors if validation fails
reconnect_mcp_upstreamname: String()Disconnect and reconnect a single upstream by name. Useful after credential changes or transient failures
get_mcp_upstream_statusVec<UpstreamStatus>Get live status of all upstream MCP servers. Status values: connecting, ready, circuit_open, disabled, failed, authenticating, needs_auth
save_mcp_upstream_credentialname: String, token: String()Store a Bearer token for an upstream in the OS keyring
delete_mcp_upstream_credentialname: String()Remove a Bearer token from the OS keyring (idempotent)

UpstreamMcpConfig schema

interface UpstreamMcpConfig {
  servers: UpstreamMcpServer[];
}

interface UpstreamMcpServer {
  id: string;              // Unique UUID, used for config diff tracking
  name: string;            // Namespace prefix — must match [a-z0-9_-]+
  transport: UpstreamTransport;
  enabled: boolean;        // Default: true
  timeout_secs: number;    // Default: 30 (0 = no timeout, HTTP only)
  tool_filter?: ToolFilter; // Optional allow/deny filter
}

type UpstreamTransport =
  | { type: "http"; url: string }
  | { type: "stdio"; command: string; args: string[]; env: Record<string, string> };

interface ToolFilter {
  mode: "allow" | "deny";
  patterns: string[];  // Exact names or trailing-* glob prefix patterns
}

Upstream status values

The live registry exposes status via SSE events (upstream_status_changed). Valid status strings:

ValueMeaning
connectingHandshake in progress
readyTools available
circuit_openCircuit breaker open, backoff active
disabledDisabled in config
failedPermanently failed, manual reconnect required

Agent MCP Configuration (agent_mcp.rs)

CommandArgsReturnsDescription
get_agent_mcp_statusagentAgentMcpStatusCheck MCP config for an agent
install_agent_mcpagentStringInstall TUICommander MCP entry
remove_agent_mcpagentStringRemove TUICommander MCP entry
get_agent_config_pathagentStringGet agent’s MCP config file path

Prompt Processing (prompt.rs)

CommandArgsReturnsDescription
extract_prompt_variablescontentVec<String>Parse {var} placeholders
process_prompt_contentcontent, variablesStringSubstitute variables
resolve_context_variablesrepo_path: StringHashMap<String, String>Resolve git context variables (branch, diff, changed_files, commit_log, etc.) for smart prompt substitution. Best-effort: variables that fail are omitted

Smart Prompt Execution (smart_prompt.rs)

CommandArgsReturnsDescription
execute_headless_promptcommand: String, args: Vec<String>, stdin_content: Option<String>, timeout_ms: u64, repo_path: String, env: Option<HashMap<String,String>>Result<String, String>Spawn a one-shot agent process in argv form (no shell — metacharacters in args are literal). Prompt content piped via stdin. Timeout capped at 5 minutes
execute_shell_scriptscript_content: String, timeout_ms: u64, repo_path: StringResult<String, String>Execute shell script content directly via platform shell (sh/cmd). No agent involved — runs the content as-is. Captures stdout. Timeout capped at 60 seconds

Claude Usage (claude_usage.rs)

CommandArgsReturnsDescription
get_claude_usage_apiUsageApiResponseFetch rate-limit usage from Anthropic OAuth API
get_claude_usage_timelinescope, days?Vec<TimelinePoint>Hourly token usage from session transcripts
get_claude_session_statsscopeSessionStatsAggregated token/session stats from JSONL transcripts
get_claude_project_listVec<ProjectEntry>List project slugs with session counts

scope values: "all" (all projects) or a specific project slug. days defaults to 7.

Uses incremental parsing with a file-size-based cache (claude-usage-cache.json) so only newly appended JSONL data is processed on each call. The cache is persisted across app restarts.

Voice Dictation (dictation/)

CommandArgsReturnsDescription
start_dictation()Start recording
stop_dictation_and_transcribeTranscribeResponseStop + transcribe. Returns {text, skip_reason?, duration_s}
inject_texttextStringApply corrections
get_dictation_statusDictationStatusModel/recording status
get_model_infoVec<ModelInfo>Available models
download_whisper_modelmodel_nameStringDownload model
delete_whisper_modelmodel_nameStringDelete model
get_correction_mapHashMap<String,String>Load corrections
set_correction_mapmap()Save corrections
list_audio_devicesVec<AudioDevice>List input devices
get_dictation_configDictationConfigLoad config
set_dictation_configconfig()Save config
check_microphone_permissionStringCheck macOS microphone TCC permission status
open_microphone_settings()Open macOS System Settings > Privacy > Microphone

Filesystem (fs.rs)

CommandArgsReturnsDescription
resolve_terminal_pathpathStringResolve terminal path
list_directorypathVec<DirEntry>List directory contents
fs_read_filepathStringRead file contents
write_filepath, content()Write file
create_directorypath()Create directory
delete_pathpath()Delete file or directory
rename_pathsrc, dest()Rename/move path
copy_pathsrc, dest()Copy file or directory
fs_transfer_pathsdestDir, paths, mode ("move"|"copy"), allowRecursiveTransferResult { moved, skipped, errors, needs_confirm }Move/copy OS paths into a destination directory. Skips silently on name conflicts; returns needs_confirm=true (no-op) when a source is a directory and allowRecursive=false. Used by the drag-drop handler when dropping files onto a folder in the file browser.
add_to_gitignorepath, pattern()Add pattern to .gitignore
search_filespath, queryVec<SearchResult>Search files by name in directory
search_contentrepoPath, query, caseSensitive?, useRegex?, wholeWord?, limit?()Full-text content search; streams results progressively via content-search-batch events. Binary files and files >1 MB are skipped. Supports cancellation.

Plugin Management (plugins.rs)

CommandArgsReturnsDescription
list_user_pluginsVec<PluginManifest>List valid plugin manifests
get_plugin_readme_pathidOption<String>Get plugin README.md path
read_plugin_dataplugin_id, pathOption<String>Read plugin data file
write_plugin_dataplugin_id, path, content()Write plugin data file
delete_plugin_dataplugin_id, path()Delete plugin data file
install_plugin_from_zippathPluginManifestInstall from local ZIP
install_plugin_from_urlurlPluginManifestInstall from HTTPS URL
uninstall_pluginid()Remove plugin and all files
install_plugin_from_folderpathPluginManifestInstall from local folder
register_loaded_pluginplugin_id()Register a plugin as loaded (for lifecycle tracking)
unregister_loaded_pluginplugin_id()Unregister a plugin (on unload/disable)

Plugin Filesystem (plugin_fs.rs)

CommandArgsReturnsDescription
plugin_read_filepath, plugin_idStringRead file as UTF-8 (within $HOME, 10 MB limit)
plugin_read_file_tailpath, max_bytes, plugin_idStringRead last N bytes of file, skip partial first line
plugin_list_directorypath, pattern?, plugin_idVec<String>List filenames in directory (optional glob filter)
plugin_watch_pathpath, plugin_id, recursive?, debounce_ms?String (watch ID)Start watching path for changes
plugin_unwatchwatch_id, plugin_id()Stop watching a path
plugin_write_filepath, content, plugin_id()Write file within $HOME (path-traversal validated)
plugin_rename_pathsrc, dest, plugin_id()Rename/move path within $HOME (path-traversal validated)

Plugin HTTP (plugin_http.rs)

CommandArgsReturnsDescription
plugin_http_fetchurl, method?, headers?, body?, allowed_urls, plugin_idHttpResponseMake HTTP request (validated against allowed_urls)

Plugin CLI Execution (plugin_exec.rs)

CommandArgsReturnsDescription
plugin_exec_clibinary, args, cwd?, plugin_idStringExecute whitelisted CLI binary, return stdout. Allowed: mdkb. 30s timeout, 5 MB limit.

Plugin Credentials (plugin_credentials.rs)

CommandArgsReturnsDescription
plugin_read_credentialservice_name, plugin_idString?Read credential from system store (Keychain/file)

Plugin Registry (registry.rs)

CommandArgsReturnsDescription
fetch_plugin_registryVec<RegistryEntry>Fetch remote plugin registry index

Watchers

CommandArgsReturnsDescription
start_head_watcherpath()Watch .git/HEAD for branch changes
stop_head_watcherpath()Stop watching .git/HEAD
start_repo_watcherpath()Watch .git/ for repo changes
stop_repo_watcherpath()Stop watching .git/
start_dir_watcherpath()Watch directory for file changes (non-recursive)
stop_dir_watcherpath()Stop watching directory

System (lib.rs)

CommandArgsReturnsDescription
load_configAppConfigAlias for load_app_config
save_configconfig()Alias for save_app_config
hash_passwordpasswordStringBcrypt hash
list_markdown_filespathVec<MarkdownFileEntry>List .md files in dir
read_filepath, fileStringRead file contents
get_mcp_statusJSONMCP server status (no token — use get_connect_url for QR)
get_connect_urlipStringBuild QR connect URL server-side (token stays in backend)
check_update_channelchannelUpdateCheckResultCheck beta/nightly channel for updates (hardcoded URLs, SSRF-safe)
clear_caches()Clear in-memory caches
get_local_ipOption<String>Get primary local IP
get_local_ipsVec<LocalIpEntry>List local network interfaces
regenerate_session_token()Regenerate MCP session token (invalidates all remote sessions)
fetch_update_manifesturlJSONFetch update manifest via Rust HTTP (bypasses WebView CSP)
read_external_filepathStringRead file outside repo (standalone file open)
get_relay_statusJSONCloud relay connection status
get_tailscale_statusTailscaleStateTailscale daemon status (NotInstalled/NotRunning/Running with fqdn, https_enabled)

Global Hotkey

CommandArgsReturnsDescription
set_global_hotkeycombo: Option<String>()Set or clear the OS-level global hotkey
get_global_hotkeyOption<String>Get the currently configured global hotkey

App Logger (app_logger.rs)

CommandArgsReturnsDescription
push_loglevel, source, message()Push entry to ring buffer (survives webview reloads)
get_logslevel?, source?, limit?Vec<LogEntry>Query ring buffer with optional filters
clear_logs()Flush all log entries

Notification Sound (notification_sound.rs)

CommandArgsReturnsDescription
play_notification_soundsound_type()Play notification sound via Rust rodio (types: completion, question, error, info)
block_sleep()Prevent system sleep
unblock_sleep()Allow system sleep