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

@bettercms-ai/pull

v0.1.0

Published

Pull the live BetterCMS build onto a machine you own. One shot: fetch, verify, unpack, exit.

Readme

@bettercms-ai/pull

Put the live BetterCMS build in a directory on a machine you own.

npx @bettercms-ai/pull --token bcms_dt_… --dir /var/www/mysite

It fetches the current live release, checks it against the checksum BetterCMS recorded at build time, unpacks it into a staging directory beside --dir, and swaps it in. Then it exits.

Get the token from Project → Settings → Custom hosting → Add target → Local machine. It is shown once. Losing it means creating a new target; that is also how you rotate it.

Options

| Flag | Env | | |---|---|---| | --token | BCMS_PULL_TOKEN | the deploy token | | --dir | BCMS_DIR | directory to unpack into | | --api | BCMS_API | API base URL (default https://api.bettercms.ai) | | --quiet | | only print on error |

Exit code is 0 when it deployed or when the directory already held that build, and 1 otherwise. Running it twice is safe and cheap: the second run reads the .bcms-release stamp, sees the same sha, and does nothing.

Deploying on every publish

bcms-pull runs once and exits — scheduling belongs to whatever already supervises this machine.

cron — every five minutes:

*/5 * * * * /usr/local/bin/bcms-pull --quiet --token bcms_dt_… --dir /var/www/mysite

systemd — a oneshot service plus a timer:

# /etc/systemd/system/bcms-pull.service
[Service]
Type=oneshot
Environment=BCMS_PULL_TOKEN=bcms_dt_…
Environment=BCMS_DIR=/var/www/mysite
ExecStart=/usr/local/bin/bcms-pull --quiet
# /etc/systemd/system/bcms-pull.timer
[Timer]
OnBootSec=1min
OnUnitActiveSec=5min
[Install]
WantedBy=timers.target
systemctl enable --now bcms-pull.timer

Windows — Task Scheduler:

schtasks /create /sc minute /mo 5 /tn bcms-pull ^
  /tr "npx @bettercms-ai/pull --quiet --token bcms_dt_… --dir C:\inetpub\mysite"

Serving the directory

--dir should be the web root, and it should belong to the agent. Point nginx/Caddy/IIS at it:

root /var/www/mysite;
try_files $uri $uri/ /index.html;

The directory is replaced by rename, so a request is served either entirely by the old build or entirely by the new one — never a mixture.

Windows caveat. A rename fails while another process holds a file under the directory open. When that happens the agent falls back to copying files over the old ones and deleting what is no longer in the build, prints a warning, and the site is briefly a mix of two builds. Give the agent a directory of its own rather than sharing one with something that keeps handles open.

What lands in the directory

The exact bytes the hosted site serves — the same artifact the BetterCMS pipeline unpacks, and the same one a Vercel or Netlify target receives. .git/, node_modules/, .gitignore and .DS_Store are excluded, and an archive containing a path that escapes --dir is refused rather than rewritten.

One extra file is written: .bcms-release, holding the sha and checksum of what is deployed. That is what makes re-running a no-op. Deleting it forces the next run to redeploy.

No token? Download it instead

Every project has Hosting → Download build, which hands back the same .tgz over a signed link. Unpack it yourself if this machine cannot run Node.