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

node-red-contrib-super-config

v1.0.0

Published

Centralized configuration node for Node-RED with Monaco editor autocomplete, type hints, and real-time value preview

Readme

node-red-contrib-super-config

A centralized configuration node for Node-RED with Monaco editor autocomplete, type hints, and real-time value preview.

Define your configuration once — get IntelliSense everywhere.

Node-RED npm license

Features

  • Autocomplete in Function nodes — type cfg. and see all config keys with descriptions and live values
  • Nested objects — config supports arbitrary depth (cfg.email.smtp.host)
  • Environment variables — use ${ENV_VAR} in any string value, resolved automatically at deploy time
  • Visual tree editor — add/remove/nest keys directly in the node UI
  • JSON editor — switch to raw JSON editing with one click
  • Type safety — generates TypeScript interfaces injected into Monaco editor

Installation

Via Node-RED Palette Manager

  1. Open Node-RED
  2. Go to Menu → Manage Palette → Install
  3. Search for node-red-contrib-super-config
  4. Click Install

Via npm

cd ~/.node-red
npm install node-red-contrib-super-config

Restart Node-RED after installation.

Quick Start

1. Add the node

Drag super config from the palette onto your flow. You'll find it in the Super Config category.

2. Define your configuration

Double-click the node to open the editor:

| Key | Type | Value | Description | |-------------|--------|--------------------------|----------------------| | email | object | | Email service config | | → host | string | ${SMTP_HOST} | SMTP server host | | → sender | string | [email protected] | Default sender | | apiToken | string | ${API_TOKEN} | External API token | | debugMode | boolean| false | Enable debug logging | | allowedRoles| array | ["admin","editor"] | Permitted roles |

3. Deploy

Click Deploy. The config is written to context and types are generated.

4. Use in Function nodes

/** @type {SuperConfig} */
const cfg = global.get("config");

const smtpHost = cfg.email.host;      // autocomplete works here
const sender = cfg.email.sender;       // hover shows description + value
const token = cfg.apiToken;

After deploy, refresh the browser (F5) to load updated type definitions. Then autocomplete will show all your config keys with descriptions and real values on hover.

Value Types

| Type | Description | Example value | |---------|------------------------------------------|----------------------------| | string | Text value. Supports ${ENV_VAR} syntax | https://${API_HOST}/v1 | | number | Numeric value | 8080 | | boolean | true or false | true | | array | JSON array | ["admin","user"] | | object | Nested object with child keys | (use tree editor) |

Environment Variables

Any string value containing ${VAR_NAME} will be automatically resolved from environment variables at deploy time.

Value: https://${API_HOST}/api/v1
Result: https://production.example.com/api/v1

If the variable is not set, the ${VAR_NAME} placeholder remains as-is.

Scope

| Scope | Access in Function nodes | |--------|------------------------------| | Global | global.get("config") | | Flow | flow.get("config") |

JSON Editor

Click the JSON button in the node editor to switch to raw JSON editing mode. Format:

{
  "email": {
    "_type": "object",
    "_desc": "Email service config",
    "_children": {
      "host": {
        "_type": "string",
        "_desc": "SMTP server host",
        "_value": "${SMTP_HOST}"
      }
    }
  },
  "debugMode": {
    "_type": "boolean",
    "_desc": "Enable debug logging",
    "_value": "false"
  }
}

How Autocomplete Works

The node generates TypeScript interface definitions from your config structure and injects them into the Monaco editor using two mechanisms:

  1. addExtraLib injection — types are injected into Monaco when the editor opens
  2. func.d.ts append — types are written to Node-RED's built-in type definition file

After deploy + browser refresh, writing /** @type {SuperConfig} */ before global.get("config") enables full autocomplete with descriptions and live values.

Requirements

  • Node-RED >= 2.0.0
  • Monaco editor (default in Node-RED since v2.0)

License

MIT