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

@mhosaic/feedback-cli

v0.16.1

Published

CLI to install @mhosaic/feedback into a host app, verify the integration, and drop a guided Claude Code skill (/integrate-feedback) into ~/.claude/skills.

Readme

@mhosaic/feedback-cli

CLI that wires the @mhosaic/feedback widget into a host app. Detects your framework, writes .env.local, updates .gitignore, auto-wraps a Vite + React entry, pings the backend to verify CORS/key/endpoint, and installs the guided integration skill into your global Claude Code skills directory.

npm i -g @mhosaic/feedback-cli@latest
# or, without installing:
npx @mhosaic/feedback-cli@latest <command>

Commands

init — set up the widget in this project

mhosaic-feedback init \
  --api-key <pk_proj_…> \
  --endpoint <https://your-backend.example.com> \
  --yes
  • Installs @mhosaic/feedback via your detected package manager (pnpm / yarn / npm)
  • Writes .env.local with VITE_FEEDBACK_API_KEY=… + VITE_FEEDBACK_ENDPOINT=… (wrapped in markers so re-running is idempotent)
  • Ensures .env.local is in .gitignore
  • For Vite + React entries: auto-wraps src/main.tsx with <FeedbackProvider> (marker comments preserved so eject cleans up cleanly)

Flags:

| Flag | Default | Notes | |---|---|---| | --api-key <key> | (prompt) | Required if --yes; must start with pk_proj_ | | --endpoint <url> | http://localhost:8000 | Must be http(s)://; no whitespace | | --yes, -y | false | Skip prompts; require --api-key | | --no-install | (install) | Skip npm install (useful in CI) | | --cwd <dir> | process.cwd() | Operate on a different project root |

Without --yes and --api-key, the CLI prompts interactively.

doctor — local health check

mhosaic-feedback doctor

Verifies (read-only):

  • A supported framework was detected
  • .env.local has VITE_FEEDBACK_API_KEY=…
  • .gitignore ignores .env.local
  • <FeedbackProvider> is wired in the entry file

Exits 0 if all pass, 1 otherwise. Run after init or whenever you suspect the integration drifted.

verify — end-to-end backend handshake

mhosaic-feedback verify --origin <dev-origin> [--with-test-report]

Reads .env.local, then checks:

  1. Both env vars present and well-formed
  2. Endpoint is http(s)://…
  3. Endpoint resolves and responds
  4. CORS preflight from --origin succeeds
  5. (with --with-test-report) Submits a synthetic [mhosaic-feedback verify] report and prints the resulting report.id

Use --origin to match your dev server (http://localhost:5173 for Vite, http://localhost:3000 for Next/Remix). The test report path is destructive — it adds one row to the project's report stream. Delete it from /reports in the admin SPA if you don't want the noise.

install-skill — drop the Claude Code skill in ~/.claude/skills/

mhosaic-feedback install-skill [--force] [--dry-run] [--dest <dir>]

Copies the bundled integrate-feedback skill into your global Claude Code skills directory. Run once after installing the CLI; the skill is then invokable as /integrate-feedback from any project. Use --force to overwrite existing files (e.g. after upgrading the CLI).

eject — strip the widget out of this project

mhosaic-feedback eject

Removes the marker-wrapped blocks init added: import + provider wrap in the entry file, and the env var block in .env.local. Won't touch anything outside those markers. To finish:

pnpm remove @mhosaic/feedback   # or npm/yarn equivalent

The guided skill

After install-skill, run /integrate-feedback inside Claude Code. The skill branches on operator vs consumer mode and walks you through provisioning a project, generating a public key, and wiring the widget into your specific framework — with explicit checkpoints, framework-aware snippets, and a smoke test that proves the end-to-end path works before declaring done.

Full details: skills/integrate-feedback/SKILL.md in this package, or installed at ~/.claude/skills/integrate-feedback/SKILL.md after install-skill.


Development

pnpm install
pnpm --filter @mhosaic/feedback-cli build       # tsup → dist/
pnpm --filter @mhosaic/feedback-cli exec vitest # unit tests
node packages/cli/dist/bin.js <command>          # exercise locally

The skill files at packages/cli/skills/integrate-feedback/ are bundled into the published npm package (files in package.json) and copied to the user's ~/.claude/skills/ by install-skill. Edits to the skill flow through the same npm publish pipeline as the CLI itself.