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

@luan.sh/pi-tuicr

v0.3.3

Published

Tuicr review integration with optional side-panel tabs

Readme

@luan.sh/pi-tuicr  

@luan.sh/pi-tuicr runs the tuicr code review TUI inside Pi. One action opens a picker of git review targets, launches tuicr in an embedded terminal, and watches tuicr's session files for review comments. Comments written in tuicr appear in Pi's editor as a single attachment pill and expand into a formatted request when the prompt is submitted.

It is a Pi extension, not a model-facing tool. It registers no tools and adds no settings.

Preview

@luan.sh/pi-tuicr in Bootty

Watch the demo.

Install

pi install npm:@luan.sh/pi-tuicr

Requirements

  • tuicr on PATH. tuicr is a third-party code review tool; install it separately. The extension checks tuicr --version before listing targets and reports "Could not start tuicr — is it on your PATH?" if that fails.
  • git on PATH, used to discover a base branch for the branch-comparison targets. Without it those two targets are simply omitted.
  • Requires a Rust toolchain (https://rustup.rs). The terminal-bridge binary builds itself on first use under Pi's agent directory (native/terminal-bridge/<version>/). Set PI_TERMINAL_BRIDGE_BINARY to use a prebuilt binary. This binary backs the embedded terminal pane.

Optional companion

pi install npm:@luan.sh/pi-panels adds a side panel; when it is present, reviews open as panel tabs, and when it is absent, they open in a fullscreen overlay. Both modes are described below.

Use it

The extension registers one action, panels.tuicr.open ("Review changes with tuicr"). Running it lists review targets for Pi's current working directory:

| Target | tuicr arguments | | --- | --- | | Uncommitted changes | -w | | Branch vs <base> (+ uncommitted) | -r <base>..HEAD -w | | Branch vs <base> | -r <base>..HEAD | | Last commit | -r HEAD~1..HEAD | | Pick commits | none (tuicr's own picker) | | Every tracked file | -A | | Custom revset… | prompts for a revset, then -r <revset> | | Pull request… | prompts for a number, owner/repo#N, or URL, then pr <target> |

The two branch targets appear only when a base branch is found. The base is the first of origin/HEAD's target, origin/main, origin/master, main, or master that exists and is not the current branch. Cancelling the revset or PR prompt, or leaving it empty, aborts without launching anything.

tuicr is launched with --appearance dark or --appearance light, resolved from Pi's active theme, so embedded truecolor rendering does not depend on a terminal background query.

With a side panel

When a side-panel host is attached, each review is a tab labelled "Review" (or "Review N" once there is more than one). The tab's header action shows the current target label and reruns panels.tuicr.open; on an active review tab that reopens the target picker as a floating overlay over the running tuicr pane. Picking the same target again closes the picker; picking a different one restarts tuicr for that target. Cancelling the picker on a tab that has no target yet closes the tab. The tab closes itself when tuicr exits. The panel's empty state also gets a "Review" entry that runs the same action.

Without a side panel

The target list appears in Pi's standard select prompt and tuicr opens in a fullscreen overlay titled "Review". Closing the overlay or quitting tuicr ends the review.

Review comments

Before launching, the extension records the ids of comments that already exist in tuicr sessions (via tuicr review list --all and tuicr review comments --session <path>), so only comments written during this review are picked up. It then watches tuicr's session directories and re-reads changed .json files, debounced by 25 ms, rather than polling the CLI. Only sessions whose repo_path matches Pi's working directory are considered; review-level, file-level, and line-level comments are all collected, and comments with empty content are ignored.

New comments are published into Pi's editor as one "N review comments" pill backed by a private token appended to the editor text. Hovering the pill shows a detail card listing each comment with its type and path:line anchor. When the prompt is submitted, the token is replaced with:

I reviewed your changes. Please address these comments:

1. `src/one.ts:4` - Updated first issue
2. `src/two.ts` [SUGGESTION] - Second issue

Comments whose type is none get no bracketed tag. The comment set clears once Pi confirms that user message started. Disposing the extension (session end or reload) removes the token from the editor without submitting anything. Comments still present when a review closes are published as well, so nothing written in tuicr is lost when it exits.

Session directories are discovered from tuicr review list --all and fall back to tuicr's platform default: ~/Library/Application Support/tuicr/reviews/sessions on macOS, %LOCALAPPDATA%\tuicr\reviews\sessions on Windows, and $XDG_DATA_HOME/tuicr/reviews/sessions (default ~/.local/share/...) elsewhere.

Keybindings

panels.tuicr.open is registered through @luan.sh/pi-libactions and has no default key. Bind it in keybindings.json in Pi's agent directory (normally ~/.pi/agent/keybindings.json). The file maps action IDs to a key ID or an array of key IDs:

{
  "panels.tuicr.open": "ctrl+shift+r"
}

Bindings take effect only when a shortcut host is installed (pi install npm:@luan.sh/pi-xsettings provides one). The file is read on load, so /reload after editing it.

Settings

None. The package does not read @luan.sh/pi-xsettings or any configuration file.

Library API

src/index.ts exports TuicrManager, ReviewCommentAttachments, and the contents of src/tuicr-review.ts (createTuicrRuntime, listTuicrTargets, prepareTuicrReview, createTuicrCommentFeed, formatTuicrComments, and their types). Importing it does not start the extension.

Layout

| Concern | Owner | | --- | --- | | Pi hooks, action and side-panel provider registration, runtime wiring | src/extension.ts | | Review tabs, target picker, PTY lifecycle, overlay fallback | src/manager.ts | | Target list, base-branch discovery, tuicr JSON parsing, session-file watcher, comment formatting | src/tuicr-review.ts | | Editor pill, hover detail card, submit-time expansion | src/review-comments.ts | | Public exports | src/index.ts |

Develop

Source: https://github.com/luan/agents, directory harnesses/pi/agent/packages/pi-tuicr. Run bun run typecheck and bun test test in that directory.

Tests cover target discovery when tuicr is missing, the session-file comment feed, the editor attachment, and overlay suppression after dispose. They use injected runtimes and do not run tuicr or git.