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

@phren/cli

v0.1.28

Published

Knowledge layer for AI agents — CLI, MCP server, and data layer

Readme

phren MCP server

MCP server that indexes your personal phren and exposes it to AI agents via full-text search.

On startup it walks your phren directory, reads all .md files, and builds an in-memory SQLite FTS5 index.

Public surface: 54 MCP tools across 12 modules (search, tasks, findings, memory, data, graph, sessions, ops/review, skills, hooks, config, extraction).

Notable shipped capabilities:

  • finding lifecycle tools: supersede_finding, retract_finding, resolve_contradiction, get_contradictions
  • finding provenance: add_finding.source (human|agent|hook|extract|consolidation|unknown)
  • cross-session continuity: task checkpoints + session_history
  • finding impact scoring from injected-context outcomes
  • skill registry behavior: scope precedence, alias-collision handling, visibility gating, generated skill-manifest.json
  • lifecycle penalties: superseded 0.25×, retracted 0.1×, contradicted 0.4× confidence in retrieval
  • inactive findings stripped from FTS index (superseded/retracted findings cannot appear in search)
  • auto-tagging: findings without type tags are inferred from content at write time
  • session context diff: session_start reports new findings since last session
  • decay resistance: confirmed findings decay 3× slower when repeatedly useful

Install

npx @phren/cli init

This sets up phren without needing sudo or a global install. On Windows, use npm install -g @phren/cli if npx isn't available.

Or add manually to Claude Code:

claude mcp add phren -- phren ~/.phren

Environment variables

| Variable | Default | Description | |----------|---------|-------------| | PHREN_PATH | ~/.phren | Path to your phren instance | | PHREN_PROFILE | (none) | Active profile name. When unset, phren uses machines.yaml when available and otherwise falls back to an unscoped view | | PHREN_ACTOR | OS user / env | Actor identity used in governance/audit RBAC checks |

Tools

See docs/api-reference.md for the full API reference.

Integration model

  • Claude: full native lifecycle hooks (SessionStart, UserPromptSubmit, Stop, PostToolUse) + MCP
  • Copilot CLI / Cursor / Codex: MCP + generated hook config + session wrapper binaries

Governance and security highlights

  • RBAC uses .config/access-control.json and .runtime/access-control.local.json
  • Web UI binds loopback-only, uses per-run auth token, enforces CSRF for mutations, and sets CSP headers
  • Telemetry is opt-in only (phren config telemetry on) and stored locally in .runtime/telemetry.json

search_knowledge

Full-text search across all indexed markdown files with synonym expansion.

query: string              - FTS5 query (supports AND, OR, NOT, "phrase matching")
limit?: number             - Max results, 1-20, default 5
type?: string              - Filter: "claude", "findings", "reference", "summary", "task", "skill"
project?: string           - Filter to a specific project
tag?: string               - Filter findings by type tag: decision, pitfall, pattern, tradeoff, architecture, bug
since?: string             - Filter findings by date: "7d", "30d", "YYYY-MM", "YYYY-MM-DD"
status?: string            - Filter by lifecycle status: active, superseded, contradicted, stale, invalid_citation, retracted
include_history?: boolean  - Include superseded/retracted findings (default false)
synthesize?: boolean       - Generate a synthesis paragraph from top results using an LLM

get_project_summary

Returns a project's summary.md content, path to its CLAUDE.md, and a list of indexed files.

name: string      - Project name (e.g. "my-app", "backend")

list_projects

Lists all projects in the active profile with a brief description and which docs exist.

No parameters.

How it works

  1. Reads PHREN_PATH (or defaults to ~/.phren)
  2. Resolves the active profile from PHREN_PROFILE, or from machines.yaml when the env var is unset
  3. If no active profile can be resolved yet, falls back to an unscoped view of top-level project directories
  4. Walks each project directory, reads .md files, classifies them by filename
  5. Builds an in-memory SQLite FTS5 index with Porter stemming
  6. Serves tools over stdio using the MCP protocol

File types are derived from filenames: CLAUDE.md -> "claude", summary.md -> "summary", FINDINGS.md -> "findings", tasks.md -> "task", files under reference/ -> "reference", files under skills/ -> "skill".

Development

cd ~/phren
npm install
npm run build    # Compile TypeScript
npm run dev      # Run with tsx (hot reload)
npm test         # Run all tests