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

hubspot-cms-sync

v0.24.0

Published

Git-backed bidirectional sync for HubSpot CMS themes, content, blogs, forms, and assets.

Downloads

5,646

Readme

hubspot-cms-sync

Git-backed bidirectional HubSpot CMS sync for themes, site pages, page module content, blogs, forms, and assets.

The package provides the hcms CLI. The long binary name hubspot-cms-sync is also installed, but examples use hcms for consistency. The tool reads account and site settings from hubspot-cms-sync.config.mjs, stores per-account identity in a gitignored .sync-state/ directory, and refuses to write to configured read-only portal ids.

See docs/CONTENT_LAYOUT.md for the repository layout, supported push surfaces, and a minimal example tree. A runnable fixture lives in examples/minimal-site/ and is validated by the unit tests.

Install

npm install --save-dev hubspot-cms-sync

For local development from a sibling checkout:

npm install --save-dev ../hubspot-cms-sync

Commands

hcms doctor
hcms pull dev
hcms preflight dev
hcms push dev --dry-run
hcms push dev --publish
hcms redirects dev
hcms redirects dev --apply
hcms republish dev --all --blog
hcms corpus
hcms manifest validate

hcms redirects is dry-run by default. Pass --apply to create or update HubSpot URL redirects from the configured redirectsFile, or pass --file to use a specific repo-stored CSV or JSON spec. Managed redirects default to 301 and isOnlyAfterNotFound: false, so they can intentionally take precedence over an existing live HubSpot page during a cutover.

Configuration

Copy examples/hubspot-cms-sync.config.mjs into the consuming repo, then set the theme name, manifest path, redirect spec path, read-only portal ids, and account registry path. Account keys live outside git at $HUBSPOT_KEY_DIR/<portalId>.key or ~/.hubspot/<portalId>.key.

export default {
  accountsFile: 'sync/accounts.json',
  contentDir: 'content',
  manifestPath: 'site.manifest.json',
  redirectsFile: 'content/redirects.csv',
  readOnlyPortalIds: ['529456'],
  theme: {
    name: 'seventh-sense-theme',
    dirs: ['templates', 'modules', 'css', 'js', 'images'],
    files: ['theme.json', 'fields.json']
  }
};

CSV redirects need at least these columns:

routePrefix,destination,redirectStyle
/old-page,/new-page,301

Optional columns accepted by the HubSpot URL Redirects API include isOnlyAfterNotFound, isMatchFullUrl, isMatchQueryString, isPattern, isProtocolAgnostic, isTrailingSlashOptional, and precedence.

Tests

npm test
npm run lint
npm pack --dry-run

Live HubSpot round-trip tests are skipped by default and require RUN_INTEGRATION=1 plus sandbox credentials.