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

pi-wakatime

v1.1.1

Published

WakaTime plugin for Pi Coding Agent

Readme

WakaTime for Pi

Track your Pi usage, lines of code generated, time spent prompting the agent, and file activity with WakaTime.

WakaTime is an open source plugin ecosystem for metrics, insights, and automatic time tracking generated from your programming activity.

This project is intentionally modeled after wakatime/claude-code-wakatime, adapted for Pi's extension event model.

Installation

pi install npm:pi-wakatime

Then add your WakaTime API key to ~/.wakatime.cfg:

[settings]
api_key = your_wakatime_api_key

How It Works

Because Pi uses extension lifecycle events instead of Claude hook scripts, this plugin maps Pi events onto the same heartbeat concepts where possible:

  • turn_start → prompt / AI activity heartbeat
  • tool_call → pre-tool activity heartbeat
  • tool_result → post-tool activity heartbeat
  • session_before_compact → pre-compact activity heartbeat
  • session_shutdown → session end heartbeat
  • read / write / edit tool results → file heartbeats

The plugin also:

  • finds a global wakatime-cli when available
  • installs a local wakatime-cli into ~/.wakatime/ when needed
  • checks for updates to the local CLI periodically
  • respects WakaTime proxy and no_ssl_verify settings
  • stores throttle state in ~/.wakatime/pi-wakatime-state.json
  • writes extension logs to ~/.wakatime/pi-wakatime.log

Usage

Open Pi as usual and work normally. Once your API key is configured, heartbeats are sent in the background.

You should see activity on your WakaTime dashboard for:

  • your current project folder
  • .pi-session synthetic session activity
  • individual files read or modified by Pi
  • AI-assisted line changes for write and edit

Development

Run the test suite:

npm test

Troubleshooting

Check that Pi can load the extension:

pi -e ./src/index.ts

Enable debug logging in ~/.wakatime.cfg:

[settings]
debug = true

Then inspect logs:

tail -f ~/.wakatime/pi-wakatime.log

If no activity appears in WakaTime:

  1. verify ~/.wakatime.cfg contains a valid api_key
  2. inspect ~/.wakatime/pi-wakatime.log
  3. check whether ~/.wakatime/wakatime-cli exists
  4. confirm Pi is actually loading the extension

If wakatime-cli download fails:

  • verify network access to GitHub releases
  • verify proxy settings in ~/.wakatime.cfg
  • install wakatime-cli globally as a fallback

Credits