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

opencode-localmemory

v2.0.0

Published

Persistent local memory plugin for OpenCode — Markdown files with YAML frontmatter, zero cost, fully offline

Readme

opencode-localmemory

Persistent local memory plugin for OpenCode — no subscription, no external service, zero cost.

Stores memories as Markdown files with YAML frontmatter organized per-project under ~/.config/opencode/localmemory/. Inspired by Claude Code's memory system, but 100% local and offline.


Installation

From npm (recommended)

Add to your opencode.json or ~/.config/opencode/opencode.jsonc:

{
  "plugin": ["opencode-localmemory"]
}

OpenCode will install it automatically at startup via Bun.

From source

git clone https://github.com/DevairRestani/memmoryit.git
cd memmoryit
bun install
bun run build
bun run install-plugin

Or manually add to ~/.config/opencode/opencode.jsonc:

{
  "plugin": ["file:///absolute/path/to/memmoryit"]
}

Restart OpenCode and the memory tool will appear in the available tools list.


How it works

The memory tool

The agent gets direct access to a memory tool with 7 modes:

| Mode | Arguments | Description | |------|-----------|-------------| | save | name, content, scope?, type?, tags? | Create or update a memory | | search | query | Search memories by keywords | | list | scope? | List all memories in a scope | | forget | name | Remove a memory by name | | recall | query | Get top relevant memories with freshness warnings | | extract | — | Get instructions for extracting memories from conversation | | consolidate | — | Get instructions for reviewing, merging, and pruning memories |

Scopes

| Scope | Storage | Availability | |-------|---------|-------------| | user | ~/.config/opencode/localmemory/user/memory/ | Cross-project, always available | | project | ~/.config/opencode/localmemory/projects/<hash>/memory/ | Isolated per git repository |

The project hash is derived from git rev-parse --show-toplevel.

Memory types (4 types)

| Type | What it stores | Example | |------|---------------|---------| | user | Role, goals, preferences, knowledge level | "User is a senior backend engineer" | | feedback | Corrections about how to work with this user | "Always run tests after changes" | | project | Work context not derivable from code | "Deploy deadline is April 15" | | reference | Pointers to external systems | "Monitoring: https://grafana.example.com/d/abc" |

File format

Each memory is a .md file with YAML frontmatter:

---
name: User Role
description: Senior backend engineer focused on observability
type: user
created: 2026-04-02T10:00:00Z
updated: 2026-04-02T10:00:00Z
tags: [observability, python]
---

Content of the memory goes here.

MEMORY.md index

A MEMORY.md index file is automatically maintained in each scope directory and loaded into the system prompt so the agent always knows what memories exist. Limits: 200 lines, 25KB, ~150 chars per entry.

Context compaction

When the context window fills up, the experimental.session.compacting hook injects all memories into the continuation prompt so nothing is lost across compactions.

Search

Keyword-based token overlap with recency scoring — no embeddings, no external API. Works fully offline.


Usage

Phrases that trigger automatic saving

The agent recognizes phrases like:

  • "remember that I prefer concise responses"
  • "save that this project uses Bun, not Node"
  • "don't forget: deploy is via GitHub Actions"
  • "lembra que prefiro respostas concisas"
  • "salva isso"
  • "não esqueça"

Direct tool usage

Save to project memory: this project uses Vue 3 with Composition API.
Search memory for what you know about this project's deployment.

Storage layout

~/.config/opencode/localmemory/
├── user/
│   └── memory/
│       ├── MEMORY.md           # Index file (always in system prompt)
│       ├── user_role.md        # Memory files with frontmatter
│       └── ...
└── projects/
    └── <sha256-hash>/
        └── memory/
            ├── MEMORY.md
            ├── project_context.md
            └── ...

Legacy .json files from v1 are auto-migrated to .md on first load (originals backed up as .json.bak).


Comparison with opencode-supermemory

| Feature | opencode-supermemory | opencode-localmemory | |---------|---------------------|---------------------| | Storage | Cloud (Supermemory API) | Local (~/.config/...) | | Semantic search | Vector embeddings | Keyword overlap | | Cost | Paid subscription | Zero | | Privacy | Data sent to API | 100% local | | Cross-machine sync | Yes (via API) | No (portable via files) | | Works offline | No | Yes |


Development

bun install
bun run build        # Compile to dist/
bun run typecheck    # Type-check only
bun run dev          # Watch mode
bun test             # Run tests

License

MIT