Omniform’s Rust backend exposes five commands over Tauri’s IPC bridge. The React frontend calls them withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/damianiglesias/omniform/llms.txt
Use this file to discover all available pages before exploring further.
invoke() from @tauri-apps/api/core. All commands are registered in src-tauri/src/lib.rs via the tauri::generate_handler! macro. Commands that perform I/O or spawn subprocesses are async; synchronous commands return immediately. Errors are surfaced as rejected promises containing a plain string message.
check_dependencies
Returns the current readiness state of yt-dlp and ffmpeg without attempting to download or install anything. Call this on startup to decide whether to show the dependency setup banner.
Injected automatically by Tauri — do not pass this from the frontend.
DependencyStatus
true if the yt-dlp binary is present and executable.true if the ffmpeg binary is present and executable.true if a dependency download is currently in progress.Optional human-readable status string, e.g.
"Downloading yt-dlp…". null
when there is nothing to report.ensure_dependencies
Checks whether yt-dlp and ffmpeg are present and downloads any that are missing. This is an async command that emits deps://status events throughout the process so the UI can show progress. Resolves when both tools are ready; rejects with a string error if setup fails.
Injected automatically by Tauri — do not pass this from the frontend.
Promise<void> — throws a string on failure.
Listen for
deps://status events in parallel with this call to display
real-time progress in the UI. The promise will not resolve until both
binaries are confirmed ready.get_default_output_dir
Returns the absolute path to the system Downloads folder, falling back to the user’s home directory if the Downloads folder cannot be determined. Used to pre-populate the output folder field on startup.
Returns: Promise<string> — throws a string error if no valid path can be resolved.
start_download
Starts downloading a single URL by spawning a yt-dlp child process. Returns immediately after the process is spawned — it does not await completion. Progress, metadata, and results are communicated through the download://info, download://progress, download://done, and download://error events.
The spawned process is tracked internally by id so it can be cancelled with cancel_download.
A unique identifier for this download job. This value is echoed back in every
event payload so the frontend can correlate events with the correct item in
the download queue.
The URL of the media to download. Any URL supported by yt-dlp is valid —
YouTube, TikTok, Instagram, and thousands of other platforms.
The desired output format. Must be one of:
mp4, webm, mp3, wav,
flac, m4a, ogg. See Supported Formats
for details.The desired quality preset. Video formats accept
best, 1080p, 720p, or
480p. Audio formats accept high, medium, or low. The audio-only
value is also part of the Quality type but is used internally to represent
quality-agnostic audio extraction — pair it with an audio format only. See
Supported Formats for the yt-dlp arguments
each value maps to.Absolute path to the directory where the finished file will be saved. The
directory must exist and be writable.
Promise<void> — throws a string error if yt-dlp is not installed or the process cannot be spawned.
cancel_download
Kills the yt-dlp process associated with the given id. If the ID is not found — because the download has already finished or was never started — this call is a no-op and still resolves successfully.
After cancellation the download status transitions to "cancelled". No download://error event is emitted for a clean cancellation.
The ID of the download to cancel. Must match the
id passed to
start_download.Promise<void>
Cancellation is best-effort. If the yt-dlp process has already exited between
the time you call
cancel_download and when the kill signal is sent, the
command still resolves without error.