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

@awesamarth/pi-supermemory

v0.1.2

Published

Persistent private memory for Pi coding agent — powered by Supermemory Local

Readme

pi-supermemory

Persistent private memory for the Pi coding agent, powered by Supermemory Local.

pi-supermemory is a Pi package that brings Supermemory-style coding-agent memory to Pi: implicit recall, automatic capture, explicit memory tools, privacy redaction, and user/project-scoped memory containers.

It is local-first. By default it talks to Supermemory Local at http://localhost:6767, so your memory database stays on your machine.

Features

  • Recall relevant memories before Pi responds.
  • Capture useful coding-session knowledge after turns.
  • Save, search, forget, inspect profile memory, and check status from Pi.
  • Separate user-level memory from project-level memory.
  • Redact <private>...</private> blocks before storage.
  • Use Supermemory Local by default, with optional hosted Supermemory support.

Install

Install the Pi package:

pi install npm:@awesamarth/pi-supermemory

Then run Pi as usual:

pi

Run Supermemory Local

Install and start Supermemory Local:

bunx supermemory local
supermemory-server

Supermemory Local stores the memory database on your machine and serves the Memory API locally. The server needs an LLM provider key, or a local OpenAI-compatible model endpoint, for memory extraction and summarization.

With OpenAI:

export OPENAI_API_KEY="sk-..."
supermemory-server

With a local OpenAI-compatible model:

OPENAI_BASE_URL=http://localhost:11434/v1 \
OPENAI_API_KEY=ollama \
OPENAI_MODEL=gpt-oss:20b \
supermemory-server

pi-supermemory defaults to:

SUPERMEMORY_API_URL=http://localhost:6767

For normal local use, no Supermemory API key is required. Supermemory Local accepts unauthenticated requests from localhost by applying its local key server-side.

Hosted or remote Supermemory

To use hosted Supermemory instead of Supermemory Local:

export SUPERMEMORY_API_KEY="sm_..."
export SUPERMEMORY_API_URL="https://api.supermemory.ai"

For non-local URLs, an API key is required.

Commands

Inside Pi:

/supermemory-status
/supermemory-search <query>
/supermemory-profile [query]
/supermemory-save <text>

Examples:

/supermemory-status
/supermemory-save This repo uses Bun and tests run with bun test.
/supermemory-search test command

You can also ask naturally:

remember that this repo uses Bun
what do you remember about this repo?
forget the old test command

Tools and skills

The package includes a Pi extension plus Pi skills.

The extension registers these tools:

  • supermemory_save — save durable user or project knowledge
  • supermemory_search — search user/project memories
  • supermemory_forget — remove outdated or incorrect memories
  • supermemory_profile — fetch user profile facts
  • supermemory_status — check connection and active scopes

The included skills teach Pi when and how to use those memory workflows.

How it works

| Supermemory integration pattern | Pi implementation | | --- | --- | | Recall before the model runs | before_agent_start extension hook | | Capture useful session context | agent_end extension hook | | Explicit memory tools | pi.registerTool() | | Slash commands | pi.registerCommand() | | User/project scoping | pi_user_<hash> and pi_project_<hash> | | Local server support | SUPERMEMORY_API_URL=http://localhost:6767 |

Before each Pi turn, the extension searches user and project containers in Supermemory Local. Relevant profile facts and memories are appended to Pi's context as private local context. After useful turns, signal-based capture stores durable preferences, decisions, setup notes, bugs, fixes, and implementation lessons.

Memory scopes

pi-supermemory separates memory into two scopes:

  • User container: pi_user_<hash(git config user.email)>
  • Project container: pi_project_<hash(git root)>

If git metadata is unavailable, it falls back to OS user/hostname for user scope and current directory for project scope.

Override scopes with config:

{
  "userContainerTag": "my-user",
  "projectContainerTag": "my-project"
}

Privacy

Before saving, the adapter removes injected Supermemory context and redacts private tags.

Input:

remember this <private>sk-secret</private>

Stored memory:

remember this [REDACTED]

Configuration

Environment variables:

| Variable | Default | Description | | --- | --- | --- | | SUPERMEMORY_PI_API_KEY | — | API key for this Pi adapter; optional for localhost | | SUPERMEMORY_API_KEY | — | Standard Supermemory API key fallback; optional for localhost | | SUPERMEMORY_API_URL | http://localhost:6767 | Supermemory API base URL | | SUPERMEMORY_BASE_URL | — | SDK-compatible base URL fallback | | SUPERMEMORY_AUTO_RECALL | true | Enable implicit recall | | SUPERMEMORY_AUTO_CAPTURE | true | Enable signal-based auto-capture | | SUPERMEMORY_CAPTURE_TOOLS | true | Include edit/write/bash tool summaries in captures | | SUPERMEMORY_INJECT_PROFILE | true | Include user profile facts in recall | | SUPERMEMORY_DEBUG | false | Debug logs to stderr |

Optional config files, later entries override earlier ones:

  • ~/.pi/supermemory.json
  • ~/.pi/agent/supermemory.json
  • <project>/.pi/supermemory.json when the project is trusted

Example:

{
  "baseUrl": "http://localhost:6767",
  "similarityThreshold": 0.6,
  "maxMemories": 5,
  "maxProfileItems": 5,
  "autoRecall": true,
  "autoCapture": true,
  "signalExtraction": true,
  "signalKeywords": ["remember", "decision", "bug", "fix", "prefer", "important"],
  "containerTagPrefix": "pi"
}

License

MIT