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 🙏

© 2024 – Pkg Stats / Ryan Hefner

best-github-backup

v2.0.2

Published

the best GitHub backup program (trust me bro)

Downloads

84

Readme

Best GitHub Backup

test

this is the best GitHub backup program. it does not suck, and here is why:

  • robust and resilient implementation
    • network failed in the middle of the operation? computer went to sleep? no problem. it will pick up where it left off when you run it again
      • no more worrying about having to start the entire process over again 🙊
  • flat file database
    • all records are MessagePack files
    • if you're feeling adventurous you can JSON.stringify() the entire database 🙈
      • go on. do it.
  • efficient use of the GitHub API
    • makes as few requests as possible
    • only fetches new data since the last successful run
      • it won't miss anything if there was a failure at any point. checkpoints get updated on a per-repo, per-type basis and only after all records were successfully saved
    • only fetches the important stuff
      • if it's not included, you don't need it. probably. 🙉

Install

npm i -g best-github-backup

Use

you'll need a GitHub API token with at least repo and read:org scopes 🔭

BEST-GITHUB-BACKUP(1)       General Commands Manual       BEST-GITHUB-BACKUP(1)

NAME
     best-github-backup - the best GitHub backup program (trust me bro)

SYNOPSIS
     best-github-backup -t token -o organization [-afgv] [-d daysThreshold]
                        [-e repo1,repo2,...]
     best-github-backup --help
     best-github-backup --version
     (See the OPTIONS section for alternate option syntax with long option
     names.)

DESCRIPTION
     Takes a backup for a given GitHub organization of all repositories that
     the provided token can access.
     It will run in one of two modes:
       1. Backup mode (default), where information is pulled from GitHub, or
       2. Archive mode (option -a), where compressed files are created for
       backups that have been taken already with backup mode.

OPTIONS
     -a, --archive
            Create compressed files for archiving.

     -d daysThreshold, --days daysThreshold
            Skip backup for repos that have been successfully backed up within
            the last daysThreshold days.

     -e repo1,repo2,..., --exclude repo1,repo2,...
            Exclude specified repos from backup.

            Note: this option is ignored in archive mode (option -a).
            Archive mode will process whatever exists from the previously taken
            backup(s). If you want to exclude anything from the archive, it
            must have been excluded from all backups. If you are uncertain, you
            should delete the data folder (data/orgName) and take a new backup
            with the exclude option.

     -f, --force
            Force update GitHub content. (By default, we only query for new
            content since the last successful backup was taken.)

     -g, --git
            Clone (or update existing clone of) git repos.

     -h, --help
            🆘 HELP!

     -o org, --org org
            GitHub organization to backup.

     -t token, --token token
            GitHub token to use for authentication.

     -v, --verbose
            Verbose logging.

     --version
            Show version.

EXAMPLES
     best-github-backup -t token -o organization
            Backup an organization.

     best-github-backup -t token -o organization -a
            Create compressed files for archiving.

     best-github-backup -t token -o organization -g
            Backup an organization, including git repositories.

     best-github-backup -t token -o organization -ag
            Create compressed files for archiving, including git repositories.

     best-github-backup -t token -o organization -g -e repo1,repo2,...
            Backup an organization, including git repositories, but excluding
            some repositories.

License

GNU GPLv3