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

@tpsdev-ai/pi-flair

v0.14.0

Published

Flair memory extension for pi — persistent memory access from within pi sessions

Readme

@tpsdev-ai/pi-flair

Pi extension for Flair memory access — persistent memory from within pi sessions.

Design Decision

Implementation Path: Native pi Extension (Option B)

  • MCP clients are NOT first-class in pi — pi's core has no MCP client support. MCP appears only as anthropic-specific beta features in the SDK (BetaMCPToolUseBlock, etc.), not as a generic extension mechanism.
  • Option A (wrap flair-mcp) would require:
    • Waiting for pi to support MCP servers natively
    • Deprecating flair-mcp's stdio transport in favor of HTTP-only
    • Splitting maintenance between MCP and pi extensions
  • Option B (native extension) wins because:
    • Direct HTTP calls via @tpsdev-ai/flair-client (zero extra dependencies)
    • Full control over tool registration and session lifecycle hooks
    • Parity with flair-mcp features (search, store, bootstrap)
    • Works today — no pi roadmap dependency

Reference: pi extensions docs

Quick Start

Prerequisites

npm install -g @tpsdev-ai/flair
flair init
flair agent add my-agent

Install

pi install npm:@tpsdev-ai/pi-flair

Or project-local:

pi install -l npm:@tpsdev-ai/pi-flair

Configure

Add to ~/.pi/agent/settings.json or .pi/settings.json:

{
  "extensions": ["npm:@tpsdev-ai/pi-flair"],
  "packages": ["npm:@tpsdev-ai/pi-flair"]
}

Or use environment variables:

export FLAIR_AGENT_ID=my-agent
export FLAIR_URL=http://127.0.0.1:9926
pi

Tools

| Tool | Description | |------|-------------| | memory_search | Search memories by meaning. Understands temporal queries. | | memory_store | Save memories with type + durability (permanent/persistent/standard/ephemeral). | | bootstrap | Load session context: soul + memories + predicted context. |

Configuration Options

| Variable | Default | Description | |----------|---------|-------------| | FLAIR_AGENT_ID | (required) | Agent identity for memory scoping | | FLAIR_URL | http://127.0.0.1:9926 | Flair server URL | | FLAIR_KEY_PATH | auto-resolved | Path to Ed25519 private key | | FLAIR_MAX_RECALL_RESULTS | 5 | Max results for memory_search | | FLAIR_MAX_BOOTSTRAP_TOKENS | 4000 | Max tokens in bootstrap output | | FLAIR_AUTO_RECALL | false | Auto-load bootstrap on session start (opt-in) | | FLAIR_AUTO_CAPTURE | false | Auto-save session context to memory |

Security Notes

Auto-Capture Warning

When FLAIR_AUTO_CAPTURE=true, all assistant responses are persisted to Flair memory with ephemeral durability. This includes any secrets, credentials, or tokens your LLM may output.

Do not enable FLAIR_AUTO_CAPTURE=true if your sessions may output:

  • API keys (sk-, ghp_, pat_, etc.)
  • Bearer tokens (Bearer prefix)
  • Private keys (-----BEGIN PRIVATE KEY-----, -----BEGIN RSA PRIVATE KEY-----)
  • AWS/GCP/Azure credentials
  • Any other sensitive data

Auto-capture is best-effort and uses dedup: false to ensure all content is captured. For production use, disable auto-capture and store only non-sensitive summaries manually via memory_store.

How It Works

pi (extension) ↔ HTTP ↔ Flair (Harper)

The extension calls Flair's HTTP API directly via @tpsdev-ai/flair-client. All memory is stored locally in ~/.flair/ with Ed25519 authentication.

Examples

Semantic Search

// In a pi session:
memory_search(query: "what did I decide about auth flow?", limit: 5)

Store Memory

memory_store(
  content: "PR reviews must include security assessment",
  durability: "persistent"
)

Bootstrap

bootstrap(maxTokens: 4000)

Testing

cd packages/pi-flair
npm run build
# Run tests (TBD)

License

Apache 2.0