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

@skypager/sheets-monorepo

v1.2.4

Published

sync your packages with google spreadsheets.

Downloads

13

Readme

Monorepo Sheets Sync

Edit all of your portfolio's package.json files in a single google spreadsheet.

Demo

This is an example of a script which uses the following skypager components:

  • Package Manager - manage all of the package.json files and folders in your portfolio
  • Google Sheet Helper - turn any google sheet into javascript objects, change the object, change the sheet.

It creates a Google Spreadsheet where each row is a project in your portfolio or monorepo. We keep track of name, version, description, license, keywords, and a project type and category attribute as well.

You can sync the spreadsheet with your code or vice versa with this script.

Required Setup

You'll need

  1. a Service Account JSON
  2. The Google Drive and Google Sheets APIs
  3. Google Sheets shared with the client_email from the service account.

Server to Server Auth

Using this module requires using interacting with Google APIs using their server to server auth method, which is powered by Service Account credentials.

A Service Account credential looks like:

{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "your-private-key-id",
  "private_key": "-----BEGIN PRIVATE KEY-----\nYOUR-PRIVATE_KEY\n-----END PRIVATE KEY-----\n",
  "client_email": "[email protected]",
  "client_id": "your-client-id",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-project-id.iam.gserviceaccount.com"
}

You can manage your Service Accounts by going to the Google Cloud Console and creating a project or selecting the one you want to work with.

Once you are there, under the IAM & admin section you can click on Service Accounts. (e.g. https://console.cloud.google.com/iam-admin/serviceaccounts?project=your-project-id)

Create a service account, and download the JSON to secrets/serviceAccount.json, or some other path.

You'll use this service account when activating the helper, as you'll see in USAGE.

Enable Google APIs

You'll also need to enable the Google Drive and Google Sheets APIs.

In the Google Cloud Console, under APIs and Services choose Library (e.g. https://console.cloud.google.com/apis/library?project=your-project-id)

Share Your Sheets

With the server to server auth set up, the last step is to share the sheets you want to load with the service account client email you'll be using to access them.

You can find the email address in client_id property of the service account json

Usage

Get Help

$ node scripts/sync.js help

Running the following will read all of the package.json manifests in your project, and publish them to google sheets.

$ node scripts/sync.js 

Running the following will read the google sheet, and apply any changes it needs to the package.json manifests so that they are in sync.

$ node scripts/sync.js inbound

Highlights

The sheet represents the google sheet itself

The sheet name projects contains rows of attributes, whose names match the column headers.

The Project class will have getters and setters for each column header. We're taking keywords from a package.json, which are an array of strings, and saving them in the sheet as strings on their own line. We're reading them from the sheet the same way, and then converting them back to an array of strings.

const sheet = runtime.sheet('skypagermonorepo')

function registerEntityClasses(sheet) {
  class Project extends sheet.RowEntity {
    set keywords(list) {
      const keywordsCell = this.attributesToCellsMap['keywords']     

      if (keywordsCell) {
        keywordsCell.value = list.join("\n")
      }
    }

    get keywords() {
      const keywordsCell = this.attributesToCellsMap['keywords']     
      if (keywordsCell) {
        return String(keywordsCell.value).split("\n").map(k => String(k).trim())
      } else {
        return []
      }
    }
  }

  try {
    return sheet.registerEntity(sheetName, () => Project)
  } catch (error) {
    console.log(sheet.worksheetIds, sheet.worksheetTitles)
  }
}

The Package Manager feature provides a similar entity class called Package, which has similar behavior. Getters and setters for package.json fields. When you set a value, it saves the json to disk.

const sheetRow = sheet.findByName('@skypager/web')
const project = packageManager.findByName('@skypager/web')

sheetRow.description = project.description  
project.keywords = sheetRow.keywords

await sheetRow.save()
await project.save()

Next Steps

This example shows how the [@skypager/node] runtime can load data from anywhere, combine it with metadata and knowledge that skypager has about your file and project structure, and programatically sync with the content of any file in your project. The package.json manifests were the easiest to demo, since they're just JSON.

However, you can use the Document Helper to do the same thing with your JavaScript or Markdown source code.

You can even use the Sketch Helper to sync sketchfiles with a google spreadsheet AND with your CSS code!

COMING SOON: Sync UI Copy and Labels in your React Components with a google spreadsheet