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

cloud-buddy

v0.1.1

Published

Buddy to bootstrap and work with an artifactory and deployer.

Readme

Cloud Buddy

NodeJS script for local or CI execution, helper scripts to upload and execute stuff on servers.

With heavy duty done by:

  • node-fetch
  • simple-ssh
  • ssh2-sftp-client
  • tar

Contents:

execSSH

Execute SSH commands on a remote server.

import {execSSH} from 'cloud-buddy/execSSH'

const target = {
   username: targetUsername,
   host: targetHost,
   port: targetPort,
}

getSshSocket()
    .then((sshSocketAgent) =>
        execSSH(
            {
                ...target,
                agent: sshSocketAgent,
            },
            `sudo -su devops echo $(whoami)`,
        ),
    )
    .then(() => {
        console.log('✓ Finished echo')
    })
    .catch((e) => {
        console.log('X Failed echo')
        process.exit(1)
    })

getSshSocket

Automatically finds open ssh-agents, e.g. to use with sftpUpload or execSSH

import {getSshSocket} from 'cloud-buddy/getSshSocket'

getTerraOutput

Fetches output from terraform states, uses JSON, must have terraform in path.

import {getTerraOutput} from 'cloud-buddy/getTerraOutput'

packAndUpload

Pack a folder into .tgz (tar with gzip) archive, save that into local tmp, upload it to the server and extract it there.

import {packAndUpload} from 'cloud-buddy/packAndUpload'

packAndUpload({
    host: targetHost,
    username: targetUsername,
    port: targetPort,
    from: path.join(__dirname, 'build'),
    to: '/var/www/files',
    // creates a subfolder with a hash & time stamp based naming
    makeFolder: true,
    // optional callback to execute afterwards with the same context values
    execAfter: async ({
                    host, username, port, agent,
                    from, to, fileName, fileNameHash,
                }) => {},
    tmpFolder: path.resolve(__dirname, 'tmp'),
})
    .then()
    .catch()

packer

Functions to pack a folder into a .tgz archive, named using a hash and timestamp.

  • packIntoTmp and packer excludes files and folders matching: - ['.git', '.idea', '_dev', '_ci', ] - can not be changed atm.
import path from 'path'
import {scanner, packer, packIntoTmp} from 'cloud-buddy/packer';

packIntoTmp(path.join(__dirname, 'build'), path.join(__dirname, 'tmp'))
    .then(({
               fileNameHash, fileName, filePath,
               fileStats, timestamp,
          }) => {})
    .catch()

packer(path.join(__dirname, 'build'), 'archive-name', path.join(__dirname, 'tmp'))
    .then(fileStats => {})

scanner(path.join(__dirname, 'build'), (err, fileNames) => {
    if(err) {
        console.error(err)
        return
    }
    fileNames = fileNames.map(fileName => {})
})

sftpUpload

Upload something with sftp using an SSH agent.

import {sftpUpload} from 'cloud-buddy/sftpUpload'

sftpUpload(host, username, to, filePath, sshSocketAgent, port)
    .then(filename => {})
    .catch()

License

MIT License

Copyright (c) 2021 Michael Becker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.