@gqv/pc-security-alarm
v2.0.0
Published
Police-style PC security alarm: full-screen red/blue strobe screen, loud siren that cannot be closed or turned down, and owner contact details. Stops only with the owner's secret shortcut.
Maintainers
Readme
🚓 @gqv/pc-security-alarm
A police-style anti-theft alarm for your own Windows PC.
Arm it before you step away. If anyone touches the mouse or keyboard, a full-screen police alarm takes over the screen with flashing red/blue lights and a loud siren, and shows your contact details so an honest finder can return your device.
- Only you can stop it, with a secret shortcut you choose.
- While it runs, the window can't be closed and the volume can't be turned down.
- If an intruder mashes keys trying to kill it, it quietly takes their photo with the webcam and encrypts it in a hidden folder that only your shortcut can open.
⚠️ Read "Stopping the alarm" and "If you forget your shortcut" before you use this.
Installation
npm install -g @gqv/pc-security-alarmRequirements: Windows 10/11, Node.js 16+, and Microsoft Edge or Google Chrome.
First-time setup (a window opens)
The first time you run it, a native Windows setup window opens on its own:
pc-alarmEverything is in one window, with a ready-made profile already filled in (John Doe) so you can try it in seconds:
- Owner details (shown on the alarm screen under FOR CONTACT): Name, Phone, Email, Address, and a Message. Edit them to your own, or leave a field empty to hide it.
- Arm delay — seconds to wait before arming (default 10), so you can step away.
- Stop shortcut — the box shows the default Ctrl + Shift + Q, already filled in. Click Change and press your own combo (hold Ctrl and/or Alt, Shift optional, then one key, e.g. Ctrl + Alt + K), or click Use default.
- Intruder photo folder — the name of the hidden folder where intruder photos are kept. Default is vault (so the folder is
.vault). You can rename it; it always lives next to your settings. - Start automatically when Windows starts — the checkbox at the top-right. Tick it and the alarm will arm itself every time you power on the PC.
Click Set & Start (or press Enter). A red warning window shows your shortcut in large text. Press OK — Start countdown (or Enter again) and the countdown begins.
Fastest start: just press Enter, then Enter again — it starts with the John Doe profile and the default shortcut. Change the details later with
pc-alarm setup.
Your settings are saved only on your PC at %USERPROFILE%\.pc-security-alarm\config.json. Nothing is sent over the internet.
Change anything later with:
pc-alarm setupNo desktop (rare)? Setup falls back to simple questions in the terminal.
How it works
- After the countdown, the PC is ARMED. The guard runs hidden in the background — you can close the terminal.
- Any mouse move, click, scroll or key press starts the alarm:
- A full-screen police alarm opens on top of every window: light bar, red/blue strobes, hazard tape, an incident report (case number, device, time) and your FOR CONTACT details.
- A loud wail + yelp siren plays.
- While the alarm runs:
- Closing the window → it reopens in seconds.
- Switching windows → the alarm comes back to the front.
- Lowering the volume or muting → it jumps back to 100%.
- Ending the background task → a second hidden process restarts it.
- Pressing only Ctrl / Alt / Shift never starts the alarm, so you can type your shortcut safely.
📸 Intruder photo (automatic)
When the alarm is sounding and someone mashes more keys at once than your shortcut uses, the app assumes they're trying to force it off and acts:
- It takes a photo with the front webcam.
- The photo is encrypted (AES-256) and saved to the hidden photo folder you named in setup (default
.vault). The key is your stop shortcut, so no one can open it without it.
Examples:
- Shortcut Ctrl + Alt + F4 (3 keys) → pressing more than 3 keys at once triggers a photo.
- A 5-key shortcut → pressing more than 5 keys at once triggers a photo.
See the photos after you stop the alarm:
pc-alarm unlockPress your shortcut when asked. The photos are decrypted into a folder and opened for you. A wrong shortcut can't decrypt them.
The webcam photo needs a working, un-covered camera. If there is no camera, the alarm still works — it just can't take a photo.
Stopping the alarm
Press your shortcut anywhere, any time — during the countdown, while armed, or while the siren is blaring. The window closes, the siren stops, the guard turns off, and a popup confirms it.
There is no other stop button and no stop command. Ctrl + C, closing windows and ending the task do not stop it.
The volume stays at 100% after stopping — turn it down yourself if needed.
⚠️ If you forget or lose your shortcut
Restart the PC (Ctrl + Alt + Delete → Power → Restart). The alarm does not start by itself after a restart unless you turned on auto-start — in that case it starts but still waits out the arm delay, giving you time to press your shortcut. Then set a new one:
pc-alarm setupTo see your saved settings (including the shortcut) while the alarm is not running:
pc-alarm infoCommands
| Command | What it does |
| --- | --- |
| pc-alarm | Start the alarm (first run opens the setup window) |
| pc-alarm setup | Open the setup window (details, delay, shortcut, auto-start) |
| pc-alarm test | Arm immediately with no countdown, to try it |
| pc-alarm unlock | Decrypt and open the intruder photos (needs your shortcut) |
| pc-alarm info | Show saved settings |
| pc-alarm readme | Open this guide in your browser |
| pc-alarm help | Show help |
Setup can't be changed while the alarm is running.
Limitations (please read)
This is a strong deterrent, not an unbreakable lock. Someone holding the PC can still restart it, or use Ctrl + Alt + Delete → Task Manager to end both background processes quickly. For real protection also use a Windows password, BitLocker and Find my device.
Shortcut rules: must include Ctrl or Alt; not allowed: the Windows key, Esc/Tab/Enter/Space/Backspace, Alt + F4, Ctrl + Alt + Delete, Ctrl + C/V/X/A/Z/S, and Ctrl + Shift + W/T/N.
Files on your PC
- Settings:
%USERPROFILE%\.pc-security-alarm\config.json - Encrypted intruder photos:
%USERPROFILE%\.pc-security-alarm\.vault\(hidden; folder name is what you set in setup) - Log:
%USERPROFILE%\.pc-security-alarm\alarm.log
Guide URL
https://www.npmjs.com/package/@gqv/pc-security-alarm
License
MIT
