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

@agentlogs/pi

v0.0.7

Published

AgentLogs extension for Pi - automatically captures and uploads AI coding session transcripts

Readme

@agentlogs/pi

AgentLogs extension for pi - automatically captures and uploads AI coding session transcripts.

Installation

npm install -g @agentlogs/pi
# or
bun add -g @agentlogs/pi

Setup

Add the extension to your pi configuration:

Option 1: Global settings (~/.pi/agent/settings.json)

{
  "extensions": ["@agentlogs/pi"]
}

Option 2: Project settings (.pi/settings.json)

{
  "extensions": ["@agentlogs/pi"]
}

Option 3: Package.json

{
  "pi": {
    "extensions": ["@agentlogs/pi"]
  }
}

Features

Automatic Transcript Upload

When you end a pi session (Ctrl+D), your conversation transcript is automatically uploaded to AgentLogs.

Git Commit Tracking

When the AI makes git commits, the extension:

  1. Adds a link to the transcript in the commit message footer
  2. Tracks which commits are associated with which transcripts
  3. Makes it easy to find the AI conversation that led to any commit

Branch-Aware Transcripts

Pi supports conversation branching via /tree. The extension handles this by:

  • Generating unique transcript IDs for each branch
  • Only uploading the current branch (from leaf to root)
  • Preserving links to older branches when you navigate away

Configuration

Environment Variables

  • AGENTLOGS_CLI_PATH - Custom path to the agentlogs CLI (defaults to npx -y agentlogs@latest)

Repository Allowlist

By default, transcripts are only uploaded for repositories you've explicitly allowed:

# Allow the current repo
agentlogs allow

# Set visibility
agentlogs allow --public
agentlogs allow --team
agentlogs allow --private

# Deny the current repo
agentlogs deny

Development Setup

For local development, use the setup script:

# From the repo root
./packages/pi/scripts/dev-setup.sh

# This creates a symlink and shows the CLI path to export:
export AGENTLOGS_CLI_PATH="bun /path/to/agentlogs/packages/cli/src/index.ts"

# Now run pi - the extension loads automatically
pi

To remove the dev setup:

./packages/pi/scripts/dev-teardown.sh
unset AGENTLOGS_CLI_PATH

Debug Logging

Debug logs are written to /tmp/agentlogs.log when not in production mode.

# Watch logs in real-time
tail -f /tmp/agentlogs.log

CLI Commands

The extension uses the agentlogs CLI under the hood:

# List recent sessions
agentlogs pi upload

# Upload a specific session
agentlogs pi upload <session-id>
agentlogs pi upload /path/to/session.jsonl

# Check login status
agentlogs status

# Login to AgentLogs
agentlogs login agentlogs.ai

How It Works

  1. The extension registers handlers for pi's lifecycle events
  2. On session_shutdown, it shells out to agentlogs pi hook with session data
  3. The CLI converts the pi session format to AgentLogs' unified format
  4. The transcript is uploaded to the AgentLogs API

License

MIT