electron-squirrel-startup

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

Library
npm
v1.0.1
236 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
37 /100 Needs Attention
Development Activity 0
Maintenance 0
Community 68
Maturity 60
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
68 /100 Good
Architecture 60
Code Quality 65
Innovation 55
Learning Curve 92

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
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,784

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
64
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 6 days ago
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

33,741

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
TypeScript 95%
Updated 6 days ago
TypeScript
89%
MIT

Amical

AI Assistants · Note Taking · Voice AI

1,567

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

View details
81
Repo Health
82
Technical
67
Dependency
Built with
TypeScript 89%
Updated 2 weeks ago
TypeScript
99%
Apache 2.0

Colanode

Collaboration · Knowledge Management · Team Chat

5,170

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
46
Repo Health
73
Technical
67
Dependency
Built with
TypeScript 99%
Updated 6 months ago
TypeScript
96%
Other

Dyad

AI Assistants · AI Code Assistants · AI Development

22,046

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

View details
87
Repo Health
83
Technical
69
Dependency
Built with
TypeScript 96%
Updated 1 weeks ago
TypeScript
92%
MIT

GB Studio

Design Tools · Developer Tools · Game Development

9,434

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

View details
88
Repo Health
83
Technical
72
Dependency
Built with
TypeScript 92%
Updated 1 weeks ago
JavaScript
88%
GPL 3.0

Glass by Pickle

AI Assistants

7,604

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
43
Repo Health
76
Technical
68
Dependency
Built with
JavaScript 88%
TypeScript 12%
Updated 1 years ago
TypeScript
62%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

27,978

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
62
Dependency
Built with
TypeScript 62%
Svelte 34%
Updated 6 days ago
TypeScript
98%
Apache 2.0

rowboat

AI Assistants · AI Development

18,060

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
88
Repo Health
72
Technical
65
Dependency
Built with
TypeScript 98%
Updated 6 days ago

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