Gathering detailed insights and metrics for electron-manager
Gathering detailed insights and metrics for electron-manager
Gathering detailed insights and metrics for electron-manager
Gathering detailed insights and metrics for electron-manager
@bentley/electron-manager
iTwin.js ElectronHost and ElectronApp
@lynker-desktop/electron-window-manager
electron-window-manager
@imohuan/electron-manager
- 监听编译 `pnpm dev` - `Esbuild`监听编译 `pnpm esbuild:dev` - 项目编译 `pnpm build` - 编译预览 `pnpm preview` - 执行测试 `pnpm test` - 发布 `npm login && npm publish`
electron-dl-manager
A library for implementing file downloads in Electron with 'save as' dialog and id support.
An NPM module with tools, helper functions, and utilities for building a flawless Electron app 🚀
npm install electron-manager
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
47 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Apr 19, 2025
Latest Version
0.0.295
Package Id
electron-manager@0.0.295
Unpacked Size
399.20 kB
Size
88.89 kB
File Count
76
NPM Version
8.15.0
Node Version
16.17.0
Published on
May 16, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
33
1
Site | NPM Module | GitHub Repo
Electron Manager is an NPM module for Electron developers with tools, helper functions, and utilities for building a flawless Electron app 🚀
Install with npm:
1npm install electron-manager
Note: This module requires a peer dependency of Electron. The required version can be found in the package.json.
setAsDefaultProtocolClient
, getApplicationNameForProtocol
, isDefaultProtocolClient
, and moreAfter installing via npm, simply require
the library and begin enjoying this simple tool 🧰.
1// In your main.js file 2const Manager = new (require('electron-manager'))({ 3 appName: 'Electron', 4 appId: 'electron', 5})
appName
: This should be the name of your app and what end users would see, such as Electron.
appName
is used to get/set things on Windows so it should be whatever your Applications\\*.exe
file's name is.appId
: This should be the id of your app such as electron.
appId
is used to get/set protocols on Linux so it should be whatever your *.desktop
file's name.environment
: Can be either development
or production
(uses electron-is-dev
).isLinux
: Will be true if your app is running on Linux.isSnap
: Will be true if your app is running as a Linux Snap (uses electron-is-snap
).storeName
: Can be either mac
, windows
, snap
, or none
.This library practically replaces some methods of Electron's app
API. You don't need to use these and the original APIs as these methods can replace the existing ones.
Correctly sets your app as the default handler for a protocol
. Calls xdg-mime default
and xdg-settings set
under the hood which Electron fails to do for Linux.
1await Manager.app().setAsDefaultProtocolClient('electron');
2
3// Output: null (for now)
Correctly gets the app name that handles a protocol
. Protocol must include ://
just like normal. Calls xdg-settings get default-url-scheme-handler
under the hood which Electron fails to do for Linux.
1await Manager.app().getApplicationNameForProtocol('electron');
2
3// Output: String
Correctly checks whether your app is the default handler for a protocol
. Calls xdg-settings get default-url-scheme-handler
under the hood which Electron fails to do for Linux.
1await Manager.app().isDefaultProtocolClient('electron');
2
3// Output: Boolean
This is how you get an auto-launching app!. Automatically adds a super helpful flag: --was-opened-at-login="true"
.
The only distros this doesn't seem to work on are MAS and Linux Snap. RIP.
1await Manager.app().setLoginItemSettings({
2 openAtLogin: true,
3});
4
5// Output: null (for now)
Correctly sets your app as a default browser for every platform. Yes, even on Windows!.
1await Manager.app().setAsDefaultBrowser();
2
3// Output: null (for now)
Note: If you want to do this on Windows, you need to somehow distribute a helper executable called SetUserFTA and then supply the path to this in the option setUserFTAPath
. This option has no effect on other platforms since other platforms work more easily.
1const { app } = require('electron'); 2const path = require('path'); 3const appDataPath = path.resolve(app.getPath('appData'), 'set-user-fta.exe') 4await Manager.app().setAsDefaultBrowser({ 5 setUserFTAPath: appDataPath, 6}); 7 8// Output: null (for now)
Correctly returns whether your app is the default browser on any platform.
1await Manager.app().isDefaultBrowser();
2
3// Output: Boolean
Correctly returns whether your app was opened at login. Remember that --was-opened-at-login="true"
flag we set earlier when we called await Manager.app().setLoginItemSettings()
? Wow this is so easy!.
1await Manager.app().wasOpenedAtLogin();
2
3// Output: Boolean
Note: Before you get your hopes too high, there's no way to set or get the --was-opened-at-login="true"
flag on Linux or Windows Store yet. To compensate, this method will check to see if the app was opened within 120
seconds of the OS booting up or the user logging in. Thus, it's best to call this as early as possible in your app.
It's by no means a perfect solution but it will work 90% of the time. You can change the threshold
to whatever seconds you want:
1await Manager.app().wasOpenedAtLogin({
2 threshold: 60, // Don't go too low (most people have slow-ass computers)
3});
4
5// Output: Boolean
brand-name-element
: Set to productName
in package.json
app-id-element
: Set to name
in package.json
current-version-element
: Set to version
in package.json
current-year-element
: Set to the current yearmanager-initialized-element
: Removed when ElectronManager
finishes initializing.upgrade-account-btn
: Enabled if user.plan.id
=== basic
Use arguments like npm start -- --name="value"
to test and streamline your development
--useDevelopmentURLs="true"
(true
): Will use localhost:4000 instead of live URLS
true
or false
--enableLiveSentry="false"
(false
): Will actually send errors to Sentry if true
true
or false
--was-opened-at-login="false"
(false
): Change Electron Manager's behavior for handling if the app was opened at login.
true
or false
--devUpdateStatus="available"
(available
): Change the electron-updater
flow.
available
: Will show an update is available and "install" itunavailable
: Will show an update is unavailableerror
: Will show an errorThis is just the beginning. More great features and fixes will be coming soon
If you are still having difficulty, we would love for you to post a question to the Electron is Snap issues page. It is much easier to answer questions that include your code and relevant files! So if you can provide them, we'd be extremely grateful (and more likely to help you find the answer!)
Somiibo: A Social Media Bot with an open-source module library. JekyllUp: A website devoted to sharing the best Jekyll themes. Slapform: A backend processor for your HTML forms on static sites. Sniips: A modern, hackable snippet manager Proxifly: An API to get free proxies for your services. Optiic: A free OCR image processing API. SoundGrail Music App: A resource for producers, musicians, and DJs.
Ask us to have your project listed! :)
node-powertools: An NPM module for backend and frontend developers that exposes powerful utilities and tools. electron-is-snap: An NPM module for checking if your app is running in a snap environment optiic: An OCR image processing API. proxifly: An API to find proxies for your apps. slapform: A form backend API.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More