#tauri-plugin #automatic #applications #launch #macos #application-at-startup

sys tauri-plugin-autostart

Automatically launch your application at startup

27 releases (7 stable)

2.5.1 Oct 27, 2025
2.5.0 Jun 25, 2025
2.3.0 Apr 2, 2025
2.2.0 Dec 9, 2024
2.0.0-alpha.0 May 24, 2023

#1488 in GUI

Download history 37595/week @ 2025-09-22 24341/week @ 2025-09-29 20324/week @ 2025-10-06 20650/week @ 2025-10-13 19027/week @ 2025-10-20 17999/week @ 2025-10-27 17142/week @ 2025-11-03 15428/week @ 2025-11-10 14662/week @ 2025-11-17 15805/week @ 2025-11-24 16069/week @ 2025-12-01 16239/week @ 2025-12-08 16788/week @ 2025-12-15 16054/week @ 2025-12-22 17420/week @ 2025-12-29 21205/week @ 2026-01-05

73,526 downloads per month
Used in 2 crates (via pytauri-core)

Apache-2.0 OR MIT

87KB
192 lines

plugin-autostart

Automatically launch your application at startup.

Platform Supported
Linux
Windows
macOS
Android x
iOS x

Install

This plugin requires a Rust version of at least 1.77.2

There are three general methods of installation that we can recommend.

  1. Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked)
  2. Pull sources directly from Github using git tags / revision hashes (most secure)
  3. Git submodule install this repo in your tauri project and then use file protocol to ingest the source (most secure, but inconvenient to use)

Install the Core plugin by adding the following to your Cargo.toml file:

src-tauri/Cargo.toml

[dependencies]
tauri-plugin-autostart = "2.0.0"
# alternatively with Git:
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }

You can install the JavaScript Guest bindings using your preferred JavaScript package manager:

pnpm add @tauri-apps/plugin-autostart
# or
npm add @tauri-apps/plugin-autostart
# or
yarn add @tauri-apps/plugin-autostart

Usage

First you need to register the core plugin with Tauri:

src-tauri/src/lib.rs

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_autostart::Builder::new()
            .args(["--flag1", "--flag2"])
            .app_name("My Custom Name")
            .build())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Afterwards all the plugin's APIs are available through the JavaScript guest bindings:

import { enable, isEnabled, disable } from '@tauri-apps/plugin-autostart'

await enable()

console.log(`registered for autostart? ${await isEnabled()}`)

disable()

Contributing

PRs accepted. Please make sure to read the Contributing Guide before making a pull request.

Partners

CrabNebula

For the complete list of sponsors please visit our website and Open Collective.

License

Code: (c) 2015 - Present - The Tauri Programme within The Commons Conservancy.

MIT or MIT/Apache 2.0 where applicable.

Dependencies

~16–64MB
~870K SLoC