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

gbck

v1.1.0

Published

Intuitive lightweight tool for easy and seamless backup of your files into Git repository

Downloads

3

Readme

Table of Contents

Introduction

Gbck is an intuitive lightweight tool for an easy and seamless backup of your files e.g. various config files. It's built to be an easy and flexible as possible. All you have to do is just to create the config file containing all files (and/or commands' stdouts) you desire to back up.

👉 Read gbck— an easy way how to back up your dotfiles on Medium.com

Install

npm i -g gbck

Requirement: You need to have Node 7.5+ and Git installed on your machine

Usage

Usage: gbck [projects]

Options:
-i, --init                Create new project
-f, --force               Along with -i create new project even if already exists
-l, --list                List all project sorted by its latest updates
-v, --version             Print version
-h, --help                Show this help
--auto-commit             Don't ask for commit message and use default one

Note: gbck stores every information under ~/.gbck

Create a new project

For a creation of a new project just run gbck --init.

You project will be saved inside ~/.gbck/<project-name>/

  • config
  • README.md
  • .vsc - the actual Git repository folder

If you use --force or -f option you will be able to rewrite already existing project.

Now it's time to configure it, so open a ~/.gbck/<project-name>/config and go on.

Check out this example configuration 💪

config has to be valid JSON:

  • Fields url: string, readme: string, entities: Array are mandatory.
  • Field syncConfig: boolean is optional and defaults to true.
  • Field branch: string is optional and defaults to "master".

next, entities has to be an array:

  • If the item is type of string it has to point to file or directory if so the file or directory will by backed up.

  • If the item is a type of array, the first item of that array is the final file name and the second item is the command which will be run and its stdout will be backed up into this file.

  • If the item is a type of object. The i:string and o:string property are mandatory, i is input file / folder, o is output name. There could be also options: object property defined. Possible options are:

    • symlinks: boolean, defaults to true
    • exclude: Array<glob> defaults to []
    • include: Array<glob> defaults to []
{
  "url": "[email protected]:jukben/dotfiles.git",
  "readme": "README.md",
  "syncConfig": false,
  "entities": [
    {
      "i": "~/.config/fish",
      "o": ".config/fish",
      "options": {
        "symlinks": false,
        "exclude": ["fishd.dca90476d2cf"]
      }
    },
    {
      "i": "~/Library/Application Support/Code/User/settings.json",
      "o": "vscode/settings.json"
    },
    "~/.tmux.conf",
    "~/.gitignore",
    "~/.vimrc",
    ["brew-cask.txt", "brew cask list"]
  ]
}

List available projects

Run gbck --list to see a list of available projects even with information when where lastly updated.

Back up a project

For back up all project just simply run gbck. If you want to back up particular project run e.g. gbck dotfiles private-dotfiles

If you run this command along with --auto-commit you won't be asked for a commit message. This could be good for some types of automatization.

Contributing

Do you miss something? Open an issue, I'd like to hear more about your use case. You can also fork this repository run yarn and send a PR! ❤️

Currently, tests are missing. 😥 But you can help me to fix this!

License

The MIT License (MIT) 2018 - Jakub Beneš