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

@mndrk/memx

v0.3.4

Published

Persistent memory for AI agents - git-backed, branch-per-task, CLI interface

Readme

mem

Persistent memory for AI agents. Git-backed, branch-per-task, CLI interface.

npm install -g @mndrk/memx

Quick Start

# Run mem in any directory - interactive setup
mem

# Or create a task
mem new landing "Build landing page for my project"

# Track progress
mem checkpoint "Hero section complete"
mem next "Add testimonials"

# Record learnings
mem learn "Tailwind is faster than custom CSS"

# Get full context
mem context

Architecture

  • Git-backed: All state versioned and syncable
  • Central repo: ~/.mem with index mapping projects to tasks
  • Branches = Tasks: Each goal is a separate branch
  • Two scopes: Task-local memory + global playbook
  • KV primitives: Generic set/get/pop for app-specific data

File Structure

~/.mem/                     # Central memory repo
  index.json                # Maps project dirs to task branches
  playbook.md               # Global learnings (shared)

  # Per-task (on task branch):
  goal.md                   # Objective + criteria
  state.md                  # Status, next step, wake, KV data
  memory.md                 # Task-specific learnings

Commands

Lifecycle

mem new <name> "<goal>"     # Create task in central ~/.mem with index
mem init <name> "<goal>"    # Start new task (creates branch)
mem status                  # Current state summary
mem done                    # Complete task, merge learnings
mem delete <name>           # Delete task and remove from index

Context

mem context                 # Full state: goal, progress, criteria, learnings
mem context --json          # JSON output for programmatic use
mem context <task>          # View specific task without switching

Goal & Criteria

mem goal [value]            # Get/set goal
mem criteria add "..."      # Add success criterion
mem criteria <n>            # Mark criterion #n complete
mem progress                # Show progress % with visual bar

Progress

mem next [step]             # Get/set next step
mem checkpoint "<msg>"      # Save progress point
mem stuck [reason|clear]    # Mark/clear blocker

Learning

mem learn "<insight>"       # Add task learning
mem learn -g "<insight>"    # Add global learning
mem learnings               # List learnings with IDs
mem playbook                # View global playbook
mem promote <n>             # Promote learning #n to playbook

Tasks

mem tasks                   # Interactive task browser (TUI)
mem tasks --json            # JSON: all tasks with status, progress, criteria
mem switch <name>           # Switch to different task
mem delete <name>           # Delete task

KV Primitives

mem set <key> <value>       # Store value in state.md frontmatter
mem get <key>               # Retrieve value
mem pop <key>               # Get value and delete (for queues)
mem pop <key> --json        # JSON output: { "value": "..." }

Wake & Sync

mem wake "<pattern>"        # Set wake schedule (every 15m, 8am daily)
mem wake clear              # Clear wake schedule
mem cron export             # Export as crontab entry
mem sync                    # Push/pull with remote

Task Isolation

Each task is a git branch. Switch instantly between contexts:

mem new landing "Build landing page"   # → task/landing branch
mem new auth "Fix auth bug"            # → task/auth branch

mem switch landing   # Work on landing
mem switch auth      # Context switch to auth

mem done             # Complete, merge learnings to main

JSON Output

For programmatic use by agents/tools:

mem context --json

Returns:

{
  "task": "my-task",
  "branch": "task/my-task",
  "status": "active",
  "goal": "Build feature X",
  "progress": 60,
  "criteria": [
    { "index": 1, "done": true, "text": "Design API" },
    { "index": 2, "done": false, "text": "Implement endpoints" }
  ],
  "nextStep": "Add authentication",
  "checkpoints": ["Completed schema design"],
  "learnings": ["Use JWT for auth"],
  "playbook": ["Always define done first"]
}
mem tasks --json

Returns all tasks with their full state.

KV Primitives

Generic key-value storage for app-specific data:

# Store data
mem set mykey "some value"

# Retrieve
mem get mykey
# → some value

# Get and delete (useful for queues)
mem pop mykey
# → some value (now deleted)

# JSON output for programmatic use
mem pop mykey --json
# → {"value": "some value"}

Used by agx for nudges:

# agx stores nudges as JSON array
mem set nudges '["msg1", "msg2"]'
mem pop nudges --json  # Read and clear

For AI Agents

With agx

agx uses mem for all state management:

agx -a -p "Build todo app"   # Creates task via mem new
agx tasks                    # Lists via mem tasks --json
agx nudge task "hint"        # Stores via mem set/get/pop

Direct Integration

Install skill for Claude/Gemini:

mem skill install

Or use MCP server:

mem mcp config   # Get config for Claude Desktop

License

MIT