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

hyper-visual

v2.2.1

Published

Frequently Used CLI command now listed in a clickable GUI.

Downloads

86

Readme

hyper-visual

CLI commands from the history and the context now listed in a clickable GUI. A plugin for hyper.

Auto Command Recommendations

screenshot

As you type recommendation from these place will show up:

  1. ~/.bash_history and ~/.zsh_history
  2. scripts from nearest package.json
  3. history in current context WIP
  4. followed colleague's gist WIP

Install

  • Put hyper-visual into .hyper.js's plugin list.
  • Or run hyper i hyper-visual if you have hyper cli installed.

Then you can filter result with typing in terminal, click on any command to execute it.

Config

Then add config if needed, they are all optional. Belows are the default values of configs:

{
    config: {
        // ...others
        visual: {
            // is panel default opened
            opened: true,
            // panel's margin-top
            top: '35px',
            // panel's margin-bottom
            bottom: '1px',
            // hotkey to toggle panel (broken)
            hotkey: 'Ctrl+G',
            // setting of contexts
            context: {
                // setting for npm scripts
                node: {
                    // choose npm or yarn
                    tool: 'npm',
                },
            }
        }
    }
}

Changing margin-bottom makes hyper-visual works better with other plugins likes hyper-search:

work-with-hyper-search

Context

Some command will only be used in specific circumstance.

Say you have a folder like this:

.(my-docker-project)
├── CHANGELOG.md
├── backend
│   └── Dockerfile
├── docker-compose.yml
└── frontend
    └── Dockerfile

Then you will frequently type docker-compose rm -f && docker-compose pull && docker-compose up --build -d in ./my-docker-project. But you won't type it in ./my-docker-project/frontend, where you will frequently type yarn start.

This is folder path based context, another possible context is git context. If you are inside a folder with ./.git, then git related command that you used before will come into recommendation.

And sure there are some command that you will use globally, likes ssh some-server. They are not belong to any local context.

Existing task runner

Task runner like yarn is depended on some config file likes package.json. If current folder contains any of those config file, tasks inside will come into recommendation.

Folder with those config file is a kind of context.

SSH to a server (WIP)

It maybe tricky to read userHome/.bash_profile on the server you ssh to. So we regard remote server as another global context.

Upload sharable context (WIP)

You may have collect tons of context for different situation. If you want, you can share it with your colleague! So just after your colleague handing his project to you, you get to know how to get his project run immediately.

Publish (WIP)

Local context knowledge resides in ~/.hyper-visual.json.

You can publish it to a github gist for a backup. You can also select your favorite parts and publish them separately, so others will subscript some of them as needed.

Subscript (WIP)

If you want to adopt others context file, just add its gist address to .hyper.js:

{
    config: {
        // ...others
        visual: {
            ...
            gists: ['some gist id']
        }
    }
}

Hotkey (WIP)

Quickly select suggestion by pushing number keys.

Reference

This project is heavily inspired by hyper-history's implementation and autoJump's concept. And I found that xiki hub have a similar vision.

And I also read code from these projects: