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

@buildo/hophop

v6.0.7

Published

![](https://img.shields.io/npm/v/@buildo/hophop.svg)

Downloads

95

Readme

Hophop

A minimal tool to accelerate the GitHub workflow from the command line.

Installation

npm install -g @buildo/hophop with a non-ancient version of npm

Setup

  • hophop gh setup to set the GitHub API access token
    • to generate a GitHub token click on the url printed by hophop in the terminal image with that link, the required permissions are already filled: all you need to do is click the green "Generate token" button at the bottom of the page

Requirements

hophop requires Git version 2.22.0 or higher to work correctly.

GitHub Workflow

hophop gh feature

to create a local branch referencing an open issue

hophop gh feature # if you don't know the issue number
hophop gh feature 123 # if you already know the issue number

hophop gh pr

to push the current feature branch and, if needed, open a Pull Request. The name of the pull request will cause GitHub to auto-close the issue when the PR is merged.

hophop gh pr # to open pull request on master
hophop gh pr --base # to open pull request on a different branch (hophop will ask you to select a branch)

hophop gh commit

to create a commit that closes an open issue.

hophop gh open

to open on Chrome the PR associated with current branch.

.hophoprc

add an optional .hophoprc file in your project root folder in order to set default answers to the hophop gh feature task questions.

Config:

type Option = 'ask' | 'no' | 'n' | 'nope' | 'yes' | 'y' | 'yep' | 'si' | 'of course' | 'youbetcha';

type Config = {
  apiUrl?: string; // default: 'https://api.github.com'
  branchSuffix?: Option; // default: 'ask'
  moveToWIP?: Option; // default: 'y'
  openPRWithTestPlanTemplate?: Option; // default: 'y'
  closeIssueWithPR?: Option // default: 'y',
  openPRAsDraft?: 'Option' // default: 'n'
  kaiten?: { // default: undefined
    boardId: number;
    backlogColumnId: number;
  };
};

example

branchSuffix: y

Kaiten support

hophop supports using Kaiten for issue tracking. To enable Kaiten add the kaiten section in .hophoprc, for example:

kaiten:
  - boardId: 123123
    backlogColumnId: 123123

You can configure as many combinations of boardId/backlogColumnId as you want:

kaiten:
  - boardId: 123123
    backlogColumnId: 123123
  - boardId: 456456
    backlogColumnId: 456456

You can retrieve board and column ids in the Kaiten UI by using the "copy link" functionality and getting the id from the resulting url

Once Kaiten is configured all hophop commands will automatically use it instead of GitHub. Note that, in this case, the command hophop gh feature will also push the newly created local branch to the remote repository in order to move the issue's card from Backlog to WIP.

zsh autocompletion

After installing the package, an autocompletion file is available at

NPM_PREFIX/lib/node_modules/@buildo/hophop/_hophop

where NPM_PREFIX is usually /usr/local and it can be retrieved using npm prefix -g

Installation using oh-my-zsh

If you use oh-my-zsh, installing the autocompletion is as easy as:

mkdir -p ~/.oh-my-zsh/custom/plugins/hophop
ln -s `(npm prefix -g)`/lib/node_modules/@buildo/hophop/bin/_hophop ~/.oh-my-zsh/custom/plugins/hophop/_hophop
touch ~/.oh-my-zsh/custom/plugins/hophop/hophop.plugin.zsh

Then enable the plugin in your .zshrc, for example:

plugins=(git brew hophop)