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 πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

open-hook

v1.0.6

Published

πŸ“¦ A developer-friendly CLI to install and manage reusable πŸͺ React custom hooks directly from a centralized GitHub repository. Supports βš™οΈ configuration, πŸ“₯ hook installation, πŸ“ƒ listing with metadata, and works with both TypeScript and JavaScript.

Downloads

14

Readme

open-hook 🎣

A CLI tool to manage and install reusable React custom hooks from a centralized repository
Supercharge your React development with community-vetted hooks!

npm license node typescript PRs Welcome


πŸš€ Quick Start

Installation

npm install -g open-hook
# or 
pnpm add -g open-hook

Basic Usage

# Initialize your project
npx open-hook init

# Browse and add hooks interactively
npx open-hook add

# Or add specific hooks
npx open-hook add useFetch useLocalStorage --language ts

πŸ˜„ Fun Break

πŸ’‘ open-hook pro tip:
"Why did the React dev bring a fishing rod to work?"
Because they heard there were custom hooks to catch! 🎣


✨ Features

| Feature | Description | |---------|-------------| | πŸ“¦ Hook Management | Install, update, and manage hooks effortlessly | | βš™οΈ Configurable | Customize installation directory and language | | πŸ”„ Conflict Resolution | Smart prompts when hooks exist | | πŸ“œ Manifest Support | Structured hook repository format | | 🌐 GitHub Integration | Directly fetches from raw GitHub URLs | | πŸ’» CLI Interface | Intuitive command-line experience |


πŸ“– Detailed Usage

init Command

Initialize your project configuration:

npx open-hook init

Creates open-hooks.config.json with:

  • Default hooks directory (e.g. src/hooks)
  • Preferred language (TypeScript/JavaScript)
  • Repository URL

add Command

Install hooks with options:

# Interactive mode
npx open-hook add

# Direct installation
npx open-hook add ClickOutside LocalStorage --language ts

# Custom directory
npx open-hook add useDebounce --dir src/utils/hooks

Conflict Handling:
πŸ”„ Replace existing | ⏭️ Skip hook | ❌ Cancel all


list Command

View available hooks:

npx open-hook list

Displays a formatted table with:

  • Hook names
  • Available versions (JS/TS)
  • Brief descriptions

βš™οΈ Configuration

Example open-hooks.config.json:

{
  "hooksDir": "src/hooks",
  "defaultLanguage": "ts",
  "repoUrl": "https://github.com/****/OpenHooks"
}

πŸ› οΈ Development Roadmap

Planned Features

  • πŸ”— Custom repository support via --repo flag
  • πŸ“¦ Automatic dependency installation
  • πŸ‘€ Hook preview before download
  • πŸ” Search functionality for hooks
  • 🏷️ Version management for hooks

🀝 Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create your feature branch
  3. Submit a pull request

Hook Submission Guidelines:

  • Include both JS and TS versions
  • Add proper TypeScript types
  • Include usage examples
  • Document dependencies

πŸ“œ License

MIT Β© Rajeshkumar S & Vigneshwar


Enjoying open-hook?
Give us a ⭐ on GitHub and share with your team!