electron-squirrel-startup

Default Squirrel.Windows install/update event handler for Electron apps

Library
npm
v1.0.1
236stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
37/100Needs Attention
Development Activity0
Maintenance0
Community68
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
68/100Good
Architecture60
Code Quality65
Innovation55
Learning Curve92

electron-squirrel-startup is a tiny utility that handles the Squirrel.Windows installer lifecycle events (--squirrel-install, --squirrel-updated, --squirrel-uninstall, --squirrel-obsolete) that fire when an Electron app built for Windows is installed, updated, or removed. Requiring it at the top of an Electron app’s main process handles desktop shortcut creation/removal automatically and quits the app during these transient install-time launches, which would otherwise show a confusing flash of the app window during install.

Maintained by MongoDB (originally for Compass, MongoDB’s GUI), it has become one of the standard boilerplate dependencies scaffolded by Electron Forge and other Electron app generators for any project targeting Windows via Squirrel.

What You Get

  • Automatic desktop shortcut creation on --squirrel-install/--squirrel-updated
  • Automatic desktop shortcut removal on --squirrel-uninstall
  • Clean early exit on --squirrel-obsolete to avoid showing a stray window
  • A single boolean return value telling the caller whether to quit immediately
  • Debug logging via the debug package for troubleshooting installer events

Common Use Cases

  • Preventing an Electron app’s main window from flashing open during Windows install/update
  • Ensuring a desktop shortcut is created automatically when a Squirrel.Windows installer runs
  • Cleaning up shortcuts when a user uninstalls a Squirrel-packaged Electron app
  • Standard boilerplate included by Electron Forge’s Squirrel.Windows maker template

Under The Hood

Architecture — The entire implementation is a single index.js file: a check() function inspects process.platform and process.argv[1] for the four Squirrel command flags, and a run() helper spawns the Squirrel-provided Update.exe (located relative to the running executable) with the appropriate --createShortcut/--removeShortcut argument, quitting the Electron app once the spawned process closes. Tech Stack — Plain CommonJS JavaScript with a single runtime dependency (debug) and Electron itself as an implicit peer (via require('electron').app); tested with electron-mocha and CI’d historically via Travis and AppVeyor for cross-platform coverage. Code Quality — Given its narrow, install-time-only responsibility, the codebase is intentionally minimal (well under 50 lines) with a small dedicated test/ directory; there is no ongoing feature development expected since the Squirrel.Windows event contract it implements is stable and unchanging. API Design — The API is a single require() call whose return value doubles as a boolean signal (if (require('electron-squirrel-startup')) app.quit();), which is about as low-friction as an integration can get — it requires no configuration and is typically the very first line of an Electron app’s main process.

Used by 10 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
TypeScript
84%
MIT

Amical

Note Taking · AI Assistants

1,495

Local-first AI dictation that understands your active app — private, offline, and built for speed.

View details
79
Repo Health
82
Technical
67
Dependency
Built with
TypeScript84%
Updated 3 weeks ago
TypeScript
99%
Apache 2.0

Colanode

Knowledge Management · Team Chat · Collaboration

5,018

Local-first, self-hosted workspace that combines real-time chat, Notion-style pages, and structured databases — all synced via CRDTs so you work offline without losing a keystroke.

View details
47
Repo Health
73
Technical
73
Dependency
Built with
TypeScript99%
Updated 4 months ago
TypeScript
96%
Other

Dyad

AI Development · Productivity · AI Code Assistants

21,279

Build AI-powered apps locally with your own keys, your own models, and zero cloud lock-in.

View details
88
Repo Health
83
Technical
70
Dependency
Built with
TypeScript96%
Updated today
TypeScript
91%
MIT

GB Studio

Developer Tools · Game Development · Design Tools

9,372

Drag-and-drop retro Game Boy game creator that compiles real ROMs — no coding required.

View details
89
Repo Health
83
Technical
80
Dependency
Built with
TypeScript91%
Updated today
JavaScript
88%
GPL 3.0

Glass by Pickle

AI Assistants

7,577

A privacy-first desktop AI assistant that sees your screen, hears your meetings, and turns live context into structured summaries—without sending a single byte to the cloud.

View details
46
Repo Health
76
Technical
68
Dependency
Built with
JavaScript88%
TypeScript12%
Updated 9 months ago
TypeScript
61%
EPL-2.0

Huly Platform

Project Management · Team Chat · Collaboration

27,384

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
64
Dependency
Built with
TypeScript61%
Svelte34%
Updated 1 weeks ago
TypeScript
98%
Apache 2.0

rowboat

AI Assistants · AI Development

17,323

Build, test, and deploy multi-agent AI workflows with a visual editor, RAG data sources, MCP tool integration, and a production-ready REST API.

View details
85
Repo Health
72
Technical
65
Dependency
Built with
TypeScript98%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search