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

rerere-cli

v0.2.0

Published

A natural-language accounting CLI for Agent systems

Readme

rerere

npm version license node

你的 Agent 爱用的记账工具。更好的 Agent Experience。 | English

为什么选择 rerere?

AI Agent 很会聊天,但它没地方帮你记账。rerere 给它一个极简的存储层——让 Agent 真正成为你的记账助手。

  • 纯文本,Agent 最容易处理的格式 — 不装数据库,不走特殊协议,Agent 直接就能读写。
  • 自然语言原样保存 — 用户怎么说就怎么存,不强行拆成字段,不丢细节。后续想怎么统计分析都行。
  • Agent 友好的输出 — CLI 输出是给 Agent 看的,不是给人看的。Agent 拿到就能用,不用再解析。
  • 纯文本也够快 — carry-forward 机制让余额查询 O(1),记几年的账也不慢。

安装

npm install -g rerere-cli
# 或
pnpm add -g rerere-cli
# 或直接运行(不全局安装)
npx rerere-cli

快速上手

# 初始化账本
rerere init
# 添加一条记录
rerere add --date 2025-03-10 --text "和朋友吃午饭" --posting "支付宝:-35:CNY"
# Added #2025-03:1: 2025-03-10 "和朋友吃午饭" | 支付宝:-35 CNY
# 列出最近的记录
rerere list --limit 5
# Showing 1 of 1 entries (offset 0):
#
# [2025-03-10] 和朋友吃午饭 (id:2025-03:1)
#   支付宝: -35 CNY
# 查看余额
rerere balance
# {
#   "balances": [
#     { "account": "支付宝", "currency": "CNY", "balance": -35 }
#   ]
# }

工作原理

用户自然语言
  ↓
外层 Agent(OpenClaw / …)
  理解意图 → 构造 CLI 参数
  ↓
rerere CLI
  Journal 读写 · 余额查询 · 文本搜索
  ↓
~/.rerere/journals/YYYY-MM.journal(按月分文件,carry-forward 余额)

Journal 文件格式

磁盘上的 journal 文件示例(~/.rerere/journals/2025-03.journal):

#CF @支付宝:-120:CNY
2025-03-01	@支付宝:-35:CNY	和朋友吃午饭
2025-03-05P	@支付宝:-2000:CNY	三月房租(待确认)
#DELETED 2025-03-02	@支付宝:-8:CNY	咖啡(已删除)
  • #CF — carry-forward 行:之前所有月份的累计余额
  • 日期后缀 [P] — 待确认(pending)记录
  • #DELETED 前缀 — 软删除(不计入余额,保留在文件中)

命令速查

完整命令参考见 spec/commands.md

| 分组 | 命令 | 说明 | |------|------|------| | 初始化 | initconfig set/show | 创建账本、管理配置 | | 写入 | addupdatedeletemerge | 新增、修改、删除、合并记录 | | 查询 | getlistsearchbalancestatscontext | 检索记录和计算余额 | | 报表 | exportimportreport monthly/trend | 数据导入导出和分析报表 | | 维护 | migrate | 从旧存储格式升级 | | Agent 集成 | setup openclaw | 安装 Agent 工作区模板 |

Agent 集成

rerere setup openclaw                   # 安装(默认英文模板)
rerere setup openclaw --locale zh-CN    # 安装(中文模板)
rerere setup openclaw --update          # 更新模板

生成 Agent 工作区文件(SOUL.md、AGENTS.md、HEARTBEAT.md)并完成平台注册。Agent 负责自然语言理解,rerere 负责数据。详见 spec/agent-integration.md

文档

| 文档 | 说明 | |------|------| | spec/README.md | 规格概览与设计原则 | | spec/architecture.md | 存储、carry-forward、代码结构 | | spec/data-model.md | Entry、Posting、EntryId、journal 格式 | | spec/commands.md | 完整 CLI 命令参考 | | spec/agent-integration.md | Setup 系统、适配器、模板 | | spec/user-stories/basic.md | 通用交互场景 | | spec/user-stories/locale/zh-CN.md | 中国场景 |

开发

pnpm install          # 安装依赖
pnpm test             # 运行全部测试
pnpm run typecheck    # 类型检查

完整开发指南见 CONTRIBUTING.md

许可证

MIT