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

@pipilot-dev/agentlog

v3.2.0

Published

Record, query, diff, and rollback AI coding agent sessions — locally, with SQLite.

Downloads

814

Readme

AgentLog

Record, query, diff, and rollback AI coding agent sessions — locally, with SQLite.

AgentLog wraps any AI coding agent session and records every file change and shell command into a local SQLite database. Review what an agent did, compare sessions, search history, export reports, and roll back any session in seconds.

Works with Cursor, Claude Code, Codex, Windsurf, GitHub Copilot, Cline, Aider, and any custom tool.

No cloud. No accounts. No native compilation. Everything stays on your machine.


Install

npm install -g @pipilot-dev/agentlog

Requires Node.js 18+. Works on Windows, macOS, and Linux.


Quick Start

cd my-project
agentlog init                          # one-time setup
agentlog run cursor                    # start recording (returns immediately)
# ... use Cursor normally ...
agentlog stop                          # end session

agentlog status                        # is it recording?
agentlog watch                         # live tail of changes
agentlog log                           # git-log-style history
agentlog diff a3f8 --patch             # full diffs
agentlog undo                          # quick undo last session
agentlog search "auth"                 # find sessions by file
agentlog stats                         # analytics dashboard
agentlog query "what changed today?"   # ask AI

16 Commands

Recording

| Command | Description | |---|---| | agentlog init | Initialize AgentLog in the current directory | | agentlog run <agent> | Start recording a session | | agentlog stop | Stop the active recording session | | agentlog status | Check if recording + live summary of current session | | agentlog watch | Live tail of file changes as they happen |

Browsing

| Command | Description | |---|---| | agentlog sessions / ls | Table view of all sessions | | agentlog log | Git-log-style history with file details | | agentlog search [pattern] | Find sessions by file pattern (e.g. "*.js", "auth") |

Inspection

| Command | Description | |---|---| | agentlog diff <id> | Show what changed (supports --patch, --compare) | | agentlog stats | Analytics dashboard | | agentlog query "<question>" | Ask AI about your sessions |

Actions

| Command | Description | |---|---| | agentlog rollback <id> | Rollback a session (supports --files for selective rollback) | | agentlog undo | Quick undo of the last session — no ID needed | | agentlog export <id> | Export as JSON, Markdown, or unified patch | | agentlog tag <id> | Add tags (--add) or notes (--note) |

Maintenance

| Command | Description | |---|---| | agentlog clean | Prune old sessions, show DB size, reclaim disk space |


How Recording Works

For GUI agents (Cursor, Windsurf, Copilot, Cline, custom):

agentlog run cursor       # spawns background daemon, returns immediately
# ... use your editor normally — all changes are recorded ...
agentlog stop             # ends session

For CLI agents (Claude Code, Codex, Aider):

agentlog run claude-code  # wraps the CLI in foreground, records everything
# ... agent runs, session ends when it exits ...

What gets recorded:

  • Every file add, modify, delete — with full before/after snapshots
  • Binary files detected and labeled (not snapshotted)
  • Files over 5 MB skipped automatically
  • Shell commands executed by CLI agents

Platform Guides

agentlog run cursor              # Cursor (background)
agentlog run claude-code         # Claude Code (wraps CLI)
agentlog run codex               # Codex (wraps CLI)
agentlog run aider               # Aider (wraps CLI)
agentlog run windsurf            # Windsurf (background)
agentlog run copilot             # Copilot (background)
agentlog run cline               # Cline (background)
agentlog run custom              # Any tool (background)

Pass arguments to CLI agents: agentlog run aider --args "--model gpt-4"


Key Features

Background Daemon — GUI agents run a background watcher. No terminal babysitting.

Session Taggingagentlog run cursor --tag feature auth then filter with agentlog sessions --tag feature.

Selective Rollbackagentlog rollback <id> --files src/auth.js src/db.js to rollback specific files only.

Quick Undoagentlog undo rolls back the last session without needing to look up the ID.

Live Watchagentlog watch shows file changes in real-time as the agent works.

Session Searchagentlog search "*.test.js" finds all sessions that touched test files.

Git-Log Viewagentlog log shows sessions with file details, like git log --stat.

Session Comparisonagentlog diff <id1> --compare <id2> shows which files each session touched.

Exportagentlog export <id> --format md for Markdown, json for data, patch for diffs.

AI Queryagentlog query "which sessions broke the tests?" — no API key needed.

Analyticsagentlog stats shows event breakdowns, agent distribution, most-changed files.

DB Cleanupagentlog clean --keep 50 prunes old sessions and vacuums the database.


Configuration

.agentlog/config.json:

{
  "ignore": ["node_modules", ".git", "dist", ".next", "build"],
  "maxSessionHistory": 100,
  "maxFileSize": 5242880,
  "excludeExtensions": [".pyc", ".class", ".o", ".exe", ".dll", ".so"]
}

Uninstall

npm uninstall -g @pipilot-dev/agentlog
rm -rf .agentlog/

License

MIT