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-treetime

v1.0.5

Published

/treetime: session tree navigation identical to /tree, with human-readable timestamps on every entry

Readme

pi-treetime

/treetime — session tree navigation for pi, identical to the built-in /tree, except every entry shows a human-readable timestamp. 中文

Features

  • 100% identical to /tree — same navigation, filters, search, folding, labels, copy, and branch summarization flow:
    • / move, / page
    • Ctrl+←/Ctrl+→ (or Alt+←/Alt+→) fold branch / jump between branch segments
    • Enter select (with the same "Summarize branch?" prompt, honoring the branchSummary.skipPrompt setting)
    • Copy message in the summary prompt: copies the selected message and closes directly, without navigating or touching session state
    • Shift+L set/clear a label, Shift+T toggle label timestamps
    • Ctrl+X copy the selected message
    • Ctrl+O cycle filters (default / no-tools / user-only / labeled-only / all), or jump directly with Ctrl+D/T/U/L/A
    • Type to search
    • Fires the standard session_before_tree / session_tree extension hooks
  • Timestamps on every entry, in a smart human-readable format:
    • today → HH:MM (e.g. 10:30)
    • this year → M/D HH:MM (e.g. 8/5 16:20)
    • older → YY/M/D HH:MM (e.g. 25/12/30 09:01)

Install

pi install npm:pi-treetime

Or copy extensions/pi-treetime into ~/.pi/agent/extensions/ (or .pi/extensions/ for a project).

After installing, run /reload (or restart pi) to activate.

Local development

pi -e ~/.pi/dev/pi-treetime/extensions/pi-treetime/index.ts

Usage

Inside pi, type:

/treetime

A session tree opens — the same interface as /tree, with a timestamp on every row. Navigate exactly as you would in /tree: Enter jumps to the selected point (optionally summarizing the abandoned branch), Esc closes.

How it works

  • The tree rendering logic is a faithful port of pi's built-in tree-selector.js (horizontal viewport clipping, folding, search, label editing, filter modes), with theme/keybindings injected and timestamp rendering added.
  • Timestamps come from each session entry's own timestamp field (Unix ms or ISO string), displayed in local time.
  • Since the extension API cannot modify the built-in /tree rendering, the extension draws an equivalent selector via ctx.ui.custom() and navigates through ctx.navigateTree(), so branch summaries and event hooks behave exactly like the built-in.
  • Notifications (e.g. "Navigated to selected point") appear via the standard status UI.

License

MIT