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

homebridge-linky

v0.15.0

Published

A Homebridge plugin to remotely list and control your HomeKit devices over the internet via a secure API key.

Downloads

39

Readme

Linky

A simple Homebridge plugin to remotely list and control your HomeKit devices over the internet via a secure API key.


Features

  • 📋 List all HomeKit devices with metadata
  • 🔄 Get real-time device states
  • 🎛️ Control devices (On/Off/Set characteristics)
  • 🔐 API Key authentication (secure and rotatable)
  • 📊 Built-in /metrics Prometheus endpoint
  • 📡 Auto-detects device reachability and status
  • ⚡ Fully configurable inside Homebridge UI
  • 🚀 Fully automated GitHub Actions release pipeline (with ChatGPT Release Notes!)

Installation

npm install -g homebridge-linky

Configuration (inside Homebridge UI)

| Field | Description | |:------|:------------| | port | Port the Linky server listens on (default: 8081) | | apiKey | (Optional) Predefined API key. If blank, a secure random key is generated. |


API Reference

All API requests require the header:

x-linky-key: YOUR_API_KEY

| Endpoint | Method | Description | |:---------|:-------|:------------| | / | GET | Welcome route with Linky status | | /healthz | GET | Health check route | | /metrics | GET | Prometheus-formatted metrics | | /config | GET | Current server config | | /rotate-key-secret | GET | Get the secret for rotating the API key | | /rotate-key | POST | Rotate the API key (requires x-linky-admin header) | | /devices | GET | List all HomeKit devices | | /device/:id | GET | Get state of specific device | | /device/:id/on | POST | Turn a device ON | | /device/:id/off | POST | Turn a device OFF | | /device/:id/set | POST | Set a specific characteristic |


🧠 Auto-Generated API Key Support

If apiKey is omitted from the config, Linky will:

  • Automatically generate a secure API key
  • Persist it to Homebridge config using the Homebridge UI API (default port: 8581)
  • Log a warning in the console with a message about key generation

To override this behavior:

  • Provide your own apiKey in the config
  • Or change the uiPort in config if your UI runs on a different port

Authentication

  • All normal API requests require a valid x-linky-key header.
  • API keys can be rotated at runtime securely via the /rotate-key endpoint.

Metrics

Exposes a Prometheus-friendly /metrics endpoint:

| Metric | Description | |:-------|:------------| | linky_uptime_seconds | Server uptime | | linky_device_count | Total registered devices | | linky_device_reachable_count | Currently reachable devices | | linky_memory_heap_total_bytes | Node.js heap memory total | | linky_memory_heap_used_bytes | Node.js heap memory used | | linky_cpu_load_average_1m/5m/15m | CPU load averages |


Contributing & Release Process

Linky uses a fully automated release pipeline powered by GitHub Actions:

  • Every push to the main branch triggers:
    • npm version minor bump (e.g., v0.2.0 → v0.3.0)
    • Builds and publishes a new version to NPM
    • Generates GitHub Release Notes automatically using ChatGPT (if available)
    • Creates a new GitHub Release with the generated notes
    • Cleans up version bumps after publish, even on failure

Pre-commit hooks (powered by Husky) automatically run:

  • Code formatting via Prettier
  • Linting via ESLint
  • TypeScript compilation
  • Build script validation

💬 If your OpenAI API quota is exceeded, Linky falls back to static release notes ("Minor improvements and bug fixes.") to ensure uninterrupted publishing.

Requirements

  • GitHub Secrets:
    • NPM_TOKEN — for publishing to NPM.
    • OPENAI_API_KEY — (optional) for generating smarter release notes.

Manual Publishing (Optional)

If needed, you can manually trigger a build and publish:

npm run build
npm version minor
npm publish

✅ Otherwise, everything happens automatically when you push to main!


License

MIT © 2025 oorrwullie


🤝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines before submitting a pull request.

🛡️ Code of Conduct

We expect all contributors to follow our Code of Conduct to foster a welcoming environment.

🔒 Security

If you discover a vulnerability, please follow our Security Policy for responsible disclosure.

🙌 Contributors

Thanks to these amazing people for helping improve Linky!

Contributors