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

@devcxl/opencode-memory

v1.1.1

Published

Simple markdown-based memory plugin for OpenCode

Readme

@devcxl/opencode-memory

npm version npm downloads license CI

English | 中文

基于 Markdown 的 OpenCode 简易记忆插件。

安装

~/.config/opencode/opencode.json 中添加插件配置:

{
  "plugin": ["@devcxl/opencode-memory"]
}

记忆文件

| 文件 | 用途 | |------|------| | MEMORY.md | 长期记忆(关键事实、决策、偏好) | | IDENTITY.md | AI 身份(名称、人格、行为准则) | | USER.md | 用户档案(名称、偏好、上下文) | | daily/YYYY-MM-DD.md | 每日日志(日常活动记录) | | BOOTSTRAP.md | 首次运行引导说明(引导完成后删除) |

存储位置

  • macOS/Linux: ~/.config/opencode/memory/
  • Windows: %APPDATA%/opencode/memory/

工具: memory

操作:

| 操作 | 描述 | 参数 | |--------|-------------|------------| | read | 读取记忆文件 | target: memory, identity, user, daily; date, scope(可选) | | write | 写入记忆文件 | target, content, mode: append/overwrite; date, scope(可选) | | edit | 编辑文件中的指定内容 | target, oldString, newString; date, scope(可选) | | delete | 按时间戳删除条目 | target, timestamp; date, scope(可选) | | search | 语义搜索记忆文件 | query, max_results, period, scope(可选) | | list | 列出记忆文件 | period(可选) |

示例:

使用 --scope project 操作当前项目记忆。projectId 从 git 自动检测;检测失败时降级为全局记忆。

memory --action read --target memory
memory --action write --target memory --content "Remember to use PostgreSQL for all projects"
memory --action write --target daily --content "Fixed critical bug in auth module"
memory --action edit --target memory --oldString "Project: Auth Service" --newString "Project: Payment Service"
memory --action delete --target daily --timestamp "2026-06-06 15:40:23"
memory --action search --query "PostgreSQL"
memory --action search --query "bug" --period 2026-06 --scope project
memory --action list
memory --action list --period 2026-06
memory --action write --target memory --scope project --content "Use port 5432"

首次运行流程

重要: 首次设置必须在 OpenCode build 模式(非 plan 模式)下进行。AI 在 plan 模式下无法写入文件。

  1. 插件检测到不存在 MEMORY.md
  2. 创建 BOOTSTRAP.md 引导说明文件
  3. AI 读取 BOOTSTRAP.md 并与用户交互提问
  4. AI 将用户回答写入 MEMORY.md、IDENTITY.md、USER.md
  5. AI 删除 BOOTSTRAP.md
  6. 设置完成

随时可通过 /memory-init 手动触发引导流程(仅在记忆系统未完全初始化时可用)。

上下文注入

MEMORY.md、IDENTITY.md 和 USER.md 会在会话开始时自动注入到 system prompt 中。

每日日志需通过 memory 工具访问。

许可证

MIT