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

shellmemory

v1.0.0

Published

A terminal command logger that records commands into SQLite

Readme

shellmemory

A terminal command logger that records every command across your shell sessions directly into a SQLite database.

Features

  • Records every command you run in your terminal
  • Stores data in SQLite database (no text files)
  • Uses Bun's high-performance native SQLite integration
  • Provides command-line utilities for statistics, export, and cleanup
  • Easy ZSH integration

Installation

  1. Clone this repository:
git clone https://github.com/fernandobelotto/shellmemory.git
cd shellmemory
  1. Install dependencies:
bun install
  1. Install the CLI globally:
bun run install-cli
  1. Add the ZSH hook to your .zshrc file:
# Add this to your .zshrc file
function log_command() {
  echo "$(date +%s)|$PWD|$1" | shellmemory log >/dev/null 2>&1
}
autoload -U add-zsh-hook
add-zsh-hook preexec log_command
  1. Restart your shell or source your .zshrc:
source ~/.zshrc

Usage

Viewing Command Statistics

To see statistics about your most used commands and hourly usage:

shellmemory stats

Exporting Command History

Export your command history in JSON or CSV format:

# Export as JSON (default)
shellmemory export

# Export as CSV
shellmemory export --format=csv

# Export to a file
shellmemory export --format=json --output=commands.json

Cleaning Old Commands

Remove old command entries:

# Delete commands older than 30 days (default)
shellmemory clean

# Delete commands older than 7 days
shellmemory clean --older-than=7d

# Delete commands older than 12 hours
shellmemory clean --older-than=12h

Technical Details

  • Uses Bun's built-in SQLite module (bun:sqlite)
  • Enables WAL mode for better performance
  • Data stored in ~/.shellmemory/commands.db

License

Apache License 2.0