npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cartman640/spooky-lights

v0.0.1

Published

A spooky lighting automation for Philips Hue lights

Downloads

157

Readme

Spooky Lights

Spooky Lights is a quick script to add a spooky, haunted house vibe to your Philips Hue home lighting. Currently it supports two effects, flicker and breathe.

It is mostly auto discovering and quite easy to configure. The base setup of the lights is done through the Hue app (or your existing home automation system) and Spooky Lights just reads the existing state of each light. If lights are turned off, they will be ignored.

Installation

Installing can be done via NPM:

npm install -g @cartman640/spooky-lights

Spooky Lights should then be avaiable on your command line with the command spooky-lights.

Configuration

1. Authentication

Spooky Lights needs to be able to talk to your Hue Bridge. It expects a .env file in the directory that you are running it from containing a HUE_USER variable.

To register a new user on your Hue Bridge, just select the register-user option:

? Choose command
  run
  list-lights
> register-user

Spooky Lights will prompt you to press the link button on the top of your Hue Bridge, then press Enter to proceed.

? Press the link button on your Hue bridge (Y/n)

Once registered, you will be given a username to put into the .env file.

2. Setting up rules

Spooky Lights reads its rules from a rules.json file that lives in the current working directory. The basic format of this is an array of objects:

[
    {
        "name": "Kitchen",
        "command": "flicker",
        "frequency": 20
    },
    { ... }
]

Where name is the name of the light from the Hue app, command is either "flicker" or "breathe" and frequency is a number between 0 and 100.

Frequency is the chance that this light will be included in the "effect lottery". If all lights are the same (e.g. 20) then there is a 20% chance that an effect will be run, and a 1/n where n is the number of lights that this particular light will be used.

The rules are evaluated every second.

You can list the available lights for convenience from Spooky Lights, just select the list-lights option:

? Choose command
  run
> list-lights
  register-user

You will get a list of available lights, non RGB lights will only be able to use the flicker effect (as shown in the output).

Running

Once your .env and rules.json files have been setup, you can start Spooky Lights by selecting the run option:

? Choose command (Use arrow keys)
> run
  list-lights
  register-user

If everything has been configured correctly you should see a conneciton successful message:

? Choose command run
Found bridge: 10.16.2.7
Checking connection...
Connection successful

And your lights will begin to flicker.

Caveats

This relies on your network being configured in such a way that the Hue auto discovery works for finding the bridge, and it will always use the first bridge it finds.

Testing has only been completed on the regular Hue White lights, the Extended Color RGB lights and the light strips.