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

uni

v0.0.6

Published

uni

Downloads

528

Readme

uni

uni unifies git, npm and github in to one single command line interface that was designed to get out of your way and make development and usage of these tools enjoyable again.

Your productivity will suffer once you get annoyed by the tools you are using on a daily basis. Thats why developer satisfaction and user experience are first class citizens in uni.

Typos

Typo's are human, when you want to have something done quickly and rush it there will be a higher chance of typo's than regularly. The last thing you want is that your tools start complaining git puhs is not a command, did you mean git push. They already know the command does not exists and it closely resembles a command that does exist.. We don't have this kind of bullshit in uni. We just execute the damned command as you intended.

less is more

Ever been annoyed by CLI applications that think it would be interesting for you as a user to know that they just make a HTTP GET request and got 304 response? I certainly did. In uni we simply ignore all this crap and only output the progress of a command. Just keeping it simple and short.

Silence is golden

Don't want any output at all because you simply don't care? Just append a --silence flag to your commands and it's gone. Need to be silenced for ever? Toggle the configuration flag and never be bothered again.

Installation

uni assumes that you have the node, npm and git binaries installed on your system. The CLI is distributed using npm and can be installed using:

npm install -g uni

Configuration

Everything in Uni has been designed to be extendible and configurable so it can be fully customized in the way you want it to behave. The configuration is stored in a .uni dot file which placed in the home folder of your user. The file is just JSON with prefixed keys. The configuration can be changed and updated using the uni config command.

As this module leans heavily on interaction with GitHub we make use of their developer API. Unfortunately this API is heavily rate limited by the folks over at GitHub, for unauthorized requests can only do 60 API requests per hour and 5000 per hour for authorized requests. When you reach this limit the functionality of uni will also be severely limited so it's best. In order to use authorized requests we need to have a GitHub access token. These tokens can be generated at: /settings/tokens/new on the GitHub site.

Once you've created a token you can either add it as ENV variable in your .profile/.bashrc/.zshrc or store it in your .uni file using:

uni config token <access-token-here>

Available commands

There are different commands available in uni. If you already have uni installed on your system you can simply run uni --help or uni help and you'll get something like this:

Usage: uni [command] [flags]

Commands:

  clone       clone and initialize a git repository
  config      set/get or list configuration values
  help        displays this help message
  init        interactively create a package.json file

Flags:

  --silence   completely silence the stdout output
  --help      displays help information for a given command

Each command also ships with it's own dedicated help page which can be triggered by calling uni <command> --help where <command> is one of the commands listed on the help page. If we run uni clone --help it will display something like:

Clone and initialize a git repository.

Usage: uni clone [flags] <repo> -- [git flags]

Flags:
  --create    create the folder of the user/orgs to clone the repositories in
  --silence   completely silence the stdout output
  --help      displays help information for a given command

uni clone

uni clone <repo>

The uni clone is a thin wrapper around the git clone that we all know in love. The problem with cloning is that it's not initializing repository that it has cloned nor does it support anything then actual git URL's.

The clone command understands the following repositories:

  • uni clone git/http/protocol Anything you would regularly clone with git clone
  • uni clone <user>/<repo> Clone the specified user's repository from GitHub
  • uni clone <user || org> Clone ALL repositories of the specified user that are listed on github.

License

MIT