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

@hatchworksai/stella-cursor-install

v1.0.0

Published

Install Cursor hooks and git hooks for Stella dashboard (projectId + upload URL).

Readme

@hatchworksai/stella-cursor-install

Install Cursor IDE hooks and git hooks for Stella so developer activity is sent to your Stella dashboard.

Usage

From your project root (a git repo):

npx @hatchworksai/stella-cursor-install --project-code <code> --token <token> --url <url>

Parameters:

  • --project-code: Your repository's project code (e.g. GN, GVH) from the Stella dashboard
  • --token: A one-time installation token generated from the Stella dashboard (repository setup guide)
  • --url: The full cursor-history endpoint URL (e.g. https://stella-dev-nextjs-gue66h5uyq-uc.a.run.app/api/cursor-history)

You can obtain the project code, token, and URL from the repository setup guide in the Stella dashboard when you first access a repository.

Mirror scripts: The installer copies these files from stella-cursor-install/hooks/. When you change any script in .cursor/hooks/ in this repo, update the same file under stella-cursor-install/hooks/ so the published installer stays in sync.

| Script | Purpose | |--------|---------| | clear-events-after-push.js | Clears event CSVs after pre-push upload | | log-after-agent-response.js | Logs agent response timestamps to after-agent-response.csv | | log-before-submit-prompt.js | Logs prompt submit timestamps to before-submit-prompt.csv | | log-edits.js | Logs file edits for Cursor edit events | | log-session.js | Session logging (sessionStart/sessionEnd); writes .cursor/events/sessions.csv with session type (agent | ask | edit) | | post-commit.js | Writes commit history (.cursor/history/<sha>.json) and the full upload payload (.cursor/history/<sha>-payload.json) for debugging | | upload-history.js | On pre-push, reads .cursor/history/*-payload.json and POSTs each; payload sent is the same as the file written at commit time |

The installer will:

  • Validate the installation token with the Stella API
  • Create .cursor/hooks/ with the scripts in the table above
  • Create .cursor/hooks.json so Cursor runs the hooks
  • Create .cursor/hooks/upload-config.json with the provided API URL and project code
  • Install git hooks: post-commit (writes commit history and payload file for debugging) and pre-push (uploads payload files to Stella)
  • Add Cursor-related entries to .gitignore if not already present (so .cursor/events/, .cursor/history/, and upload-config.json are not committed)

After each commit, .cursor/history/<sha>-payload.json contains the exact request body that will be sent on the next push, so you can inspect sessions and duration before pushing.

Requirements

  • Node.js 18+
  • Git (for git hooks)
  • A repository already added in Stella dashboard
  • An installation token generated from the repository setup guide in the Stella dashboard

Verifying that CSV events are written

The prompt/response hooks write to .cursor/events/before-submit-prompt.csv and after-agent-response.csv. If those files stay empty (headers only):

  1. Confirm Cursor is using project hooks
    Cursor reads .cursor/hooks.json from the workspace root. If you opened a parent folder or a different root, that folder’s hooks.json is used (or none). Open the repo that contains .cursor/hooks.json as the workspace root.

  2. Run the hook by hand (from the repo root):

    echo "{\"conversation_id\":\"test\",\"generation_id\":\"test\"}" | node .cursor/hooks/log-before-submit-prompt.js

    Then check .cursor/events/before-submit-prompt.csv for a new row. If you see it, the script and path are fine; Cursor may not be invoking the hook (e.g. hook support or config location).

  3. Check Cursor’s output
    If the hook runs but gets bad input (e.g. encoding on Windows), you may see [log-before-submit-prompt] Invalid JSON: in the terminal or Cursor’s developer tools.

Configuration

You can also provide parameters via environment variables instead of command-line arguments:

  • CURSOR_HISTORY_PROJECT_CODE – project code
  • CURSOR_HISTORY_INSTALLATION_TOKEN – installation token
  • CURSOR_HISTORY_UPLOAD_URL – full cursor-history endpoint URL

Note: The installation token is validated during installation and must be valid and not expired. Tokens expire 24 hours after generation.

Publishing

Publishing is done by the GitHub workflow Publish Stella Cursor Installer (push to production, tag stella-cursor-install-v*, or manual dispatch). It requires the NPM_TOKEN secret.

If publish fails with 404 Not Found for @hatchworksai/stella-cursor-install:

  1. Create the npm organization hatchworksai at npmjs.com/org/create if it does not exist.
  2. Add the npm user whose token is in NPM_TOKEN to that org with a role that can publish (e.g. Developer).
  3. Use a token that can publish (e.g. Automation token or Classic token with "Publish packages").

License

MIT