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

ngit-cli

v1.3.1

Published

A collection of commands to add interactivity to git in the command line.

Downloads

24

Readme

NodeJS Git utilities

Purpose

Enhance the usage of git in the command line. In general this is achieved by providing a list of options when not giving the required arguments to git commands. The scripts in this repo do not aim to do anything that can be achieved through git aliases.

Scripts that replace git commands ( such as checkout ) attempt to act like superset commands, meaning that the checkout command can be used as the git equivalent. This is still not the case for all commands though.

Install

Run:

npm install -g ngit-cli

in your terminal to install the package globally. You can then use the program using the ngit-cli in the terminal. As this can be a bit verbose, it is recommended to create an alias for it, such as ngit.

You will then be able to use the ngit command similarly to git for the supported commands (see below) in any repo.

checkout

Works like checkout but prints out a selectable list if no parameters are passed.

ngit checkout screenshot

Branches are sorted by the date of the last commit.

erase

Shows a selectable list of branches you can delete. By default, it only deletes local branches but you can pass the --all or -a flag to also delete the branch(es) in the remote. This list is a multiselect, which allows deleting multiple branches at once.

ngit erase

Branches are sorted by the creation date of the branch.

Flags

  • --all or -a: to also delete the branch in the remote.
  • --gone or -g: to only show branches with a remote status of Gone (meaning the remote branch was deleted)

Warning: currently the script can't erase the remote branch if it has a different name than the local branch

stash

Differs from the usual git stash command as no passing any arguments will print out the modified files (git status). You can then select the files that you want to stash.

ngit stash

Flags

  • -m: similar to git stash push, you can label your stash entry with ngit stash -m <some-message>

add

Similar to ngit stash. Will print out a selectable list of files to stage.

ngit add

select-branch

Prints out a multi-select list of branches to copy to you clipboard. This allows to select a branch and then paste it in another git command.

select-status

Similar to select-branch but with files in the working tree. Select the branches you want to copy to your clipboard and paste them in another git command.

To do

I plan on adding more commands such as :

  • restore
  • cherry-pick

The scripts I make here are the ones I feel I'm missing when using git through the cli.

Contribution and feedback

Still very early days, so no contribution guide. But if you want to contribute or share some feedback, feel free to reach out via email or github;