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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@moodboom/cloudflare-sync-dns

v6.1.8

Published

A script to track external IP, and update cloudflare DNS when a change is observed. A command is provided that can be called often from cron to monitor for and act on IP changes.

Downloads

505

Readme

cloudflare-sync-dns

This command can be called regularly (e.g. via cron) to keep your DNS records up to date when your ISP assigns you a new IP address.

Specifically, the script will:

  1. maintain a local copy of the IP that was last set in your cloudflare DNS records
  2. check your external IP address, comparing it to the cloudflare DNS record
  3. if the external IP has changed:
  • load cloudflare settings and keys from a local JSON file
  • call the cloudflare API to get all DNS record ids
  • call the cloudflare API for each DNS record and update it to the new external IP
  • optionally run firewall and LAN scripts, and ensure all hosts are resolving
  • only after everything is verified, update the local copy of the IP

Installation

  • Install a recent version of node.js
  • Install this module globally
  • a) You can clone the repository then do an [npm install -g]
  • b) Or you can just do a global install [npm install -g cloudflare-sync-dns]
  • Copy cloudflareSettings-template.json (in project folder) outside of the module to where you store configurations, and adjust accordingly
  • Specify the settings file when you run, eg: cloudflare-sync-dns /path/to/my/settings.json
  • Add a cron job to run the script regularly. Every minute should work well, as most of the time it just does a local check.

NOTE that you can use this nvm-based bash script to run npm commands from cron:

#!/bin/bash
export NVM_DIR="/home/myhome/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
cloudflare-sync-dns /path/to/settings.json

Documentation | News

Note there is also a command console for a few admin commands.

Usage: csd [command]

cmd+options short description

sync [sy] (admin-only) sync this module, ie: pull, commit, tag, push, publish to npm public-ip [ip] display the current public IP address

Most recent commits... 9a8efb5 4 months ago Provide command line public ip extraction HEAD -> mai.. Michael Behrns-Miller [cast] 732bab1 4 months ago Upgrade npm to 22.18 and modules tag: 6.1.6 Michael Behrns-Miller [cast] 02756ac 8 months ago Firewall script remove exit code check tag: 6.1.5 Michael Behrns-Miller [cast] f3eef17 11 months .. Really Comment on running node command from cron tag: 6.1.4 Michael Behrns-Miller [cast]

Version 6.1.8