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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hookieai/forms

v0.1.0

Published

Submit HTML forms to Hookie: a zero-dependency browser client with idempotent retries, readable field errors, progressive enhancement and a React hook.

Readme

@hookieai/forms

Submit HTML forms (contact, newsletter, waitlist, survey) to a Hookie endpoint. No dependencies, no backend: the endpoint's public URL is the only configuration.

<form id="contact" action="https://app.hookie.ai/acme/site/aBcXyz…" method="post">
  <input name="email" type="email" required />
  <textarea name="message" required></textarea>
  <input name="_gotcha" tabindex="-1" autocomplete="off" style="position:absolute;left:-9999px" aria-hidden="true" />
  <button>Send</button>
</form>
<script type="module">
  import { enhanceForm } from "https://cdn.jsdelivr.net/npm/@hookieai/forms/index.mjs";
  enhanceForm(document.getElementById("contact"), { onSuccess: () => alert("Thanks!") });
</script>

Without JavaScript the form still posts natively and Hookie shows its thank-you page (or redirects to the endpoint's redirect_url). With JavaScript, enhanceForm submits with fetch(), so the endpoint must list the page's origin in its cors_origins.

API

  • submitForm(url, data, opts?) → { ok, submissionId } or { ok: false, status, error, fieldErrors?, reason?, retryAfter? }. One Idempotency-Key per submission, reused on retry, so a double click stores one event.
  • enhanceForm(form, { onSuccess, onError, redirect, reset }) → an unsubscribe function.
  • useHookieForm(url) from @hookieai/forms/react → { submit, status, fieldErrors, error, reset }.
  • defineFields([...] as const) and FieldsOf<typeof fields> type a payload from the endpoint's form_fields.

The fastest way to set all of this up is npx @hookieai/cli forms init contact --to slack --origin https://example.com --json, which creates the endpoint and writes the form. Guide: https://docs.hookie.ai/forms

For AI agents

A coding agent can do all of this with no person involved: it registers itself on the Free plan (1,000 events a month, no card), then runs the command above. The machine-readable guide is https://hookie.ai/llms.txt and the signup steps are on https://hookie.ai/agents.