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

o-o

v1.0.2

Published

Terminal-cli for browser bookmarks (pronounced "oh oh")

Downloads

15

Readme

a cli for opening things like url's and files (pronounced "oh oh")

Install

$ npm install --global o-o

Usage

$ o <alias>

Opens the path associated with <alias>.

For example:

$ o o
# opens https://github.com/dawsbot/o-o in your browser

Print saved aliases:

$ o ls
# {
#   "o": "https://github.com/dawsbot/o-o",
#   "so": "https://stackoverflow.com/search?q={{o0}}",
#   "g": "https://github.com/{{o0}}/{{o1}}"
# }

o can also be used with dynamic path's:

$ o so "that thing I can never remember how to do"
# opens https://stackoverflow.com/search?q=that%20thing%20I%20can%20never%20remember%20how%20to%20do in your browser

Add your own:

$ o new
# spawns an informative prompt for you to save a new alias

The verbose way

$ o new https://facebook.com fb

It's not just for url's:

$ o new /Users/dawsbot/code/o-o/readme.md or

$ o or
# opens file with default application

Help:

$ o --help

  Usage
    $ o [alias|command] [, arguments]

  Examples
    $ o # create new alias
    $ o new # create or rename alias
    $ o ls # print list of saved aliases
    $ o rm <alias> # delete an alias
    $ o clear # delete all
    $ o path # print file path to alias file

Dynamic Templating

Aliases can (optionally) have handlebars templates. This allows arguments to be dynamically inserted into a path. If you have never used handlebars, don't fear. It's simple.

o handlebars templates are 0-indexed, just like an array. They begin at o0 and continue to o1, o2, etc.

Here's another example:

$ o so "how to do something"
# o retrieves "https://stackoverflow.com/search?q={{o0}}" and
# replaces "{{o0}}" with url-encoded "how to do something"

Here's a fun example of making a sub-reddit alias

$ o new https://reddit.com/r/{{o0}} reddit
# ✔ Created new alias reddit

$ o reddit node
# opens https://www.reddit.com/r/node in browser

Backup important aliases

Are you saving important aliases or a large amount of them? If so, back these up, it's always possible they get corrupted.

Backup to Dropbox

First find the path your config file is saved in:

$ o path
# /Users/dawsonbotsford/Library/Preferences/o-o-nodejs/config.json

This file needs to be moved into Dropbox and symlinked back to the original location

mv /Users/dawsonbotsford/Library/Preferences/o-o-nodejs/config.json ~/Dropbox/
ln -s ~/Dropbox/config.json /Users/dawsonbotsford/Library/Preferences/o-o-nodejs/config.json

Backup to git

Alternatively, use git to manually version control.

$ o path
# /Users/dawsonbotsford/Library/Preferences/o-o-nodejs/config.json
$ cd /Users/dawsonbotsford/Library/Preferences/o-o-nodejs/
$ git init
# add remote, and push!

License

MIT © Dawson Botsford