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

@foundryapp/monitoring-cli

v1.0.6

Published

## Installation $ npm i -g @foundryapp/monitoring-cli

Readme

Monitoring CLI

Installation

$ npm i -g @foundryapp/monitoring-cli

CLI Usage

Enable monitoring of a function

This enables monitoring of a function <functionName> deployed in the default project (foundry-monitoring) and default region (us-central1).

$ monitoring enable <functionName>

If you want to monitor a function deployed in a different project then use the -p (--project) flag followed by the <projectId>.

$ monitoring enable <functionName> -p <projectId>

If you want to monitor a function deployed in a different region then use the -r (--region) flag followed by the region <region>.

$ monitoring enable <functionName> -r <region>

If you want to group functions to custom groups so you can later retrieve their data together then use the -t (--tag) flag followed by a tag <tag>. This is also a good place to specify the optimization you are testing. Currently a function monitoring can have only one tag.

$ monitoring enable <functionName> -t <tag>

You can use these flags together.

$ monitoring enable <functionName> -p <projectId> -r <region> -t <tag>

Disable monitoring of a function

This disables monitoring of a function <functionName> deployed in the default project (foundry-monitoring) and default region (us-central1).

$ monitoring disable <functionName>

If you want to disable monitoring of a function deployed in a different project then use the -p (--project) flag followed by the <projectId>.

$ monitoring disable <functionName> -p <projectId>

If you want to disable monitoring of a function deployed in a different region then use the -r (--region) flag followed by the region <region>.

$ monitoring disable <functionName> -r <region>

If you used a tag when enabling a function you need to add the -t (--tag) flag followed by the same tag <tag> you used to disable that function.

$ monitoring enable <functionName> -t <tag>

You can use these flags together.

$ monitoring disable <functionName> -p <projectId> -r <region> -t <tag>

Get monitoring data

This command will retrieve and print all saved monitoring data for functions deployed in the default project (foundry-monitoring) and default region (us-central1).

$ monitoring data

If you want to retrieve all the data regardless of a project and region use the -n (--no-default) tag.

$ monitoring data -n

If you want to retrieve data for a specific function add the [functionName] as an argument to get a query for the specified [functionName].

$ monitoring data [functionName]

If you want to retrive only data of functions from a specific project then use the -p (--project) flag followed by the <projectId> to query for the specified <projectId>.

$ monitoring data -p <projectId>

If you want to retrive only data of functions from a specific region then use the -r (--region) flag followed by the <region> to query for the specified <region>.

$ monitoring data -r <region>

If you want to retrieve only data of functions with a specific tag then use the -t (--tag) flag followed by the <tag> to query for the specified <tag>.

$ monitoring data -t <tag>

If you want to save the retrieved data as a JSON file then add the -f (--file) flag followed by a file path <file>.

$ monitoring data -f <file>

The saved JSON adhers to the following schema:

[{
    fn: {
        enabled: boolean;
        functionName: string;
        functionUrl?: string;
        tag?: string;
        region: string;
        projectId: string;
    },
    pings: [{
        responseDuration: number; // in ms
        timestamp: number; // as milliseconds since the epoch
    }],
}]

The pings are ordered in an ascending order by their timestamps.

You can use and combine the argument and the flags to make specific queries.

API Usage

You can use this as a library in the code like this:

$ npm i @foundryapp/monitoring-cli
const monitoring = require('@foundryapp/monitoring-cli');
// Use monitoring.enableMonitoring, monitoring.disableMonitoring, monitoring.getMonitoringData