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

hookmod-assist

v1.0.1

Published

CLI to generate AI prompts for HookMod projects

Readme

HookMod-Assist: CLI Tool for HookMod Development

HookMod-Assist is a zero-dependency Node.js CLI companion for HookMod, a lightweight modular JavaScript framework. It simplifies project setup, template management, and AI-assisted workflows by generating starter projects, exporting templates from existing setups, and creating optimized prompts for language models (e.g., Grok, ChatGPT) to generate or refine HookMod modules.

Designed for developers building hierarchical, reusable web apps with HookMod, it enforces best practices like 'man' folder documentation for AI maintainability. No external dependencies—uses only Node.js built-ins (fs/promises, path).

Features

  • Project Initialization: Create ready-to-run HookMod projects with server extensions (e.g., Express for static serving, auto-watcher for bundling).
  • Template Creation: Scan a project directory to export a JSON template, excluding generated files (e.g., hookmod_out.js and .map via content/name checks).
  • AI Prompt Generation: Build self-contained Markdown prompts with HookMod guide, source files, project context, and user queries for LLM module generation/debugging.
  • Priming Mode: Send initial context to LLMs for understanding verification before tasks.
  • Modular and Extensible: Commands in /commands/ for easy additions; customizable via flags (e.g., --output for prompts).

Installation

Install globally for CLI access:

npm install -g hookmod-assist

Or locally in a project:

npm install hookmod-assist
npx hookmod-assist [command]

Requires Node.js >=14. No other deps.

Usage

Run hookmod-assist --help for quick reference. Commands assume you're in a project directory (with package.json for some).

1. Initialize a Project

Creates a starter HookMod project with server (Serve-like via extensions), modules, and bundling watcher.

hookmod-assist init [kind]
  • [kind]: Optional template (default: 'default' – basic with Express, Bootstrap, Start module).
  • Example: hookmod-assist init – Generates /run.js, /private/extensions/ (hookmod.js, server.js, router.js), /public/ (index.html, js/start.js, modules/Start/main.js with man/).
  • Then: npm install && npm start – Runs server at port 39232; auto-bundles on changes.

2. Create a Template from Project

Scans current project to export JSON template (excludes node_modules, generated hookmod_out.js/.map via signatures like SHARE).

hookmod-assist create-template <name>
  • : Template name (outputs to /templates/.json in assist install dir).
  • Example: hookmod-assist create-template myproj – Scans dir, skips generated, logs "Template created: .../templates/myproj.json".
  • Use for custom kinds in init (e.g., hookmod-assist init myproj).

3. Generate AI Prompt

Creates Markdown prompt with HookMod guide/sources, project files (excluding generated), and query for LLM pasting (e.g., Grok).

hookmod-assist prompt "Your query here" [--output file.md]
  • "query": Task (e.g., "Add auth module with login template").
  • --output: Custom MD filename (default: hookmod-prompt.md).
  • Example: hookmod-assist prompt "Refine Start module" – Outputs MD with system rules, HookMod README/sources, project code, query.

4. Prime LLM with Context

Variant of prompt for initial priming (default query: Summarize project, prove understanding).

hookmod-assist prime [optional query]
  • Example: hookmod-assist prime – Generates priming MD; paste to LLM for alignment before tasks.

Contributing

Fork on GitHub: https://github.com/s-p-n/hookmod-assist (assuming repo; create if needed). Submit PRs for new commands/templates. Test: npm test (runs init).

Issues: Report bugs/features on GitHub issues.

License

MIT License. See LICENSE file or MIT details.

Author: Spencer A. Lockhart.

For HookMod framework docs, see NPM or GitHub. Feedback welcome!