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

eternal-memory-hooks

v0.1.1

Published

Claude Code hooks for Eternal Memory integration - persistent AI memory across sessions

Readme

@anthropic/eternal-memory-hooks

Claude Code hooks for persistent AI memory across sessions via Eternal Memory.

Quick Start

# Install and setup
npx @anthropic/eternal-memory-hooks init

# Configure API credentials
export ETERNAL_MEMORY_API_KEY="your-key"
export ETERNAL_MEMORY_URL="https://your-server.com"  # Optional

Installation

Via npx (recommended)

npx @anthropic/eternal-memory-hooks init

This will:

  • Copy hook files to .claude/hooks/
  • Add hook configs to .claude/settings.json
  • Copy the /remember command to .claude/commands/
  • Copy skill documentation to .claude/skills/

Manual Installation

npm install @anthropic/eternal-memory-hooks
node node_modules/@anthropic/eternal-memory-hooks/bin/init.cjs

Configuration

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | ETERNAL_MEMORY_API_KEY | Yes | - | API key for authentication | | ETERNAL_MEMORY_URL | No | https://openclaw-be-production.up.railway.app | Backend URL |

Per-Project Configuration

Set different backends for different projects using .env files:

# ~/project-a/.env
ETERNAL_MEMORY_URL=https://memory-a.example.com
ETERNAL_MEMORY_API_KEY=key-for-project-a

# ~/project-b/.env
ETERNAL_MEMORY_URL=https://memory-b.example.com
ETERNAL_MEMORY_API_KEY=key-for-project-b

Hook Toggle

Disable hooks via .claude/.ck.json:

{
  "hooks": {
    "eternal-memory-search": false,
    "eternal-memory-commit-store": false
  }
}

How It Works

SessionStart Hook (eternal-memory-search.cjs)

On every Claude Code session start:

  1. Builds search query from project context (package.json, git history, CLAUDE.md)
  2. Searches Eternal Memory for relevant past learnings
  3. Injects results into session context via stdout

PostToolUse Hook (eternal-memory-commit-store.cjs)

After every Bash command:

  1. Detects git commit output patterns
  2. Classifies commit type (bugfix, pattern, insight)
  3. Stores meaningful commits to Eternal Memory (fire-and-forget)

/remember Command

Manual command to extract and store learnings from current session.

Self-Hosting

Requirements

  • PostgreSQL 17+ with pgvector extension
  • Node.js 18+ or Python 3.11+
  • Embedding API (Cloudflare AI Workers or compatible)

Docker Compose

version: '3.8'
services:
  api:
    image: ghcr.io/anthropics/eternal-memory:latest
    environment:
      DATABASE_URL: postgres://user:pass@db:5432/memories
      API_KEY: your-secret-key
    ports:
      - "8080:8080"
  db:
    image: pgvector/pgvector:pg17
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: memories

Programmatic Usage

const { searchMemories, storeMemory } = require('@anthropic/eternal-memory-hooks');

// Search memories
const results = await searchMemories('authentication patterns', {
  types: ['pattern', 'decision'],
  limit: 5,
  mode: 'hybrid'
});

// Store memory
await storeMemory({
  type: 'decision',
  title: '[Auth] - Chose JWT over sessions',
  content: 'Rationale: stateless scaling...',
  source: 'my-app'
});

Troubleshooting

Hooks not running

  1. Check ETERNAL_MEMORY_API_KEY is set
  2. Verify hooks in .claude/settings.json
  3. Check hook file exists: .claude/hooks/eternal-memory-search.cjs

API connection errors

  1. Verify ETERNAL_MEMORY_URL is accessible
  2. Check API key is valid
  3. Hooks fail silently (check debug logs)

Enable Debug Logging

export CK_DEBUG=1

ClaudeKit Compatibility

This package works with or without ClaudeKit:

  • With ClaudeKit: Uses ClaudeKit's config system and utilities
  • Without ClaudeKit: Falls back to standalone configuration

CLI Options

npx @anthropic/eternal-memory-hooks init [options]

Options:
  --force, -f       Overwrite existing files
  --skip-settings   Don't modify settings.json
  --help, -h        Show help message

License

MIT