Skip to main content

读咚咚 (Read DongDong) - 个人知识数据层的命令行接口

Project description

读咚咚 (Read) - 个人知识数据层

读咚咚是个人知识数据层的 Python 库,提供 CLI、SDK 和 MCP Server 等多种访问方式。

本地、私有、可编程的个人知识基础设施。

Python License Version


简介

读咚咚 是一个个人知识数据层,以 Core Library 为核心资产,支持多种客户端访问。

当你看到一句有启发的话、一篇好文章,快速存下来。CLI、浏览器插件、Agent 都可以访问这些数据。

核心特点

  • 数据层优先 - Core Library 是核心,CLI/插件/SDK 都是客户端
  • 本地私有 - 数据存放在 ~/.read/read.db,不上云、不同步、不追踪
  • Agent 友好 - JSON 输出 + Python SDK + MCP Server(v0.2)
  • 极简核心 - 只做收集,不做整理

安装

方式一:从 PyPI 安装(推荐)

pip install dong-read

方式二:从源码安装

git clone https://github.com/gudong/read.git
cd read
pip install -e .

初始化

dr init

安装 Agent Workspace

如果你使用 OpenClaw,可以把 agent 目录复制到工作区:

# 复制 agent workspace
mkdir -p ~/.openclaw/agents/read
cp -r agent/* ~/.openclaw/agents/read/

# 从模板创建 MEMORY.md
cp agent/MEMORY.md.template ~/.openclaw/agents/read/MEMORY.md

快速开始

# 添加摘录
dr add "开始,就是最好的时机"

# 收藏文章
dr add --url "https://mp.weixin.qq.com/s/xxx"

# 列出所有
dr ls

# 搜索
dr search "AI"

# 删除
dr delete 123 --force

项目结构

read/
├── src/read/           # CLI 源码
├── agent/             # Agent workspace(OpenClaw 使用)
│   ├── IDENTITY.md    # Agent 身份
│   ├── SOUL.md        # Agent 性格
│   ├── TOOLS.md       # CLI 工具定义
│   └── MEMORY.md.template  # 记忆模板
├── docs/              # 文档
├── tests/             # 测试
├── pyproject.toml     # Python 包配置
└── README.md          # 本文件

Python SDK

from read import Client

client = Client()

# 添加
item = client.add("开始,就是最好的时机")

# 列出
items = client.list(limit=10)

# 搜索
results = client.search("AI")

命令参考

命令 说明
dr init 初始化数据库
dr add "内容" 添加摘录
dr add --url "..." 收藏链接
dr ls 列出所有
dr search "关键词" 搜索
dr get 123 获取单条
dr delete 123 删除

架构设计

┌─────────────────────────────────────────────────────────┐
│                    客户端层                              │
├──────────────┬──────────────┬──────────────┬────────────┤
│ CLI          │ Browser      │ Python SDK   │ MCP Server  │
│ (dr add)    │ Extension    │ (import)     │ (Agent)     │
└──────────────┴──────────────┴──────────────┴────────────┘
                             │
                    ┌────────▼────────┐
                    │   Core Library  │
                    │ (read.core.Client)│
                    └────────┬────────┘
                             │
                    ┌────────▼────────┐
                    │   SQLite DB     │
                    │   ~/.read/read.db │
                    └─────────────────┘

路线图

版本 核心资产 客户端 状态
v0.1 Core Library v0.1 CLI ✅ 完成
v0.2 Core Library v0.1 MCP Server 🚧 开发中
v0.3 Core Library v0.1 Python SDK 增强 📋 计划中
v0.4 Core Library v0.1 Browser Extension 📋 计划中

文档


License

MIT


作者

@gudong


让 AI 看见你的知识。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dong_read-0.3.3.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dong_read-0.3.3-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file dong_read-0.3.3.tar.gz.

File metadata

  • Download URL: dong_read-0.3.3.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for dong_read-0.3.3.tar.gz
Algorithm Hash digest
SHA256 4d3cae19b7f460a504369bb04913d9d62c219ae2a1780bd1b86c836df0feaced
MD5 e65398ea4d436971c5b212d4026c8afc
BLAKE2b-256 0f91dc3e14db9a6d588d9f6ba5445628f3a9b975990c42e565e7b924b9f12ad4

See more details on using hashes here.

File details

Details for the file dong_read-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: dong_read-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for dong_read-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1fbc3525ba30f99c8d442803109ccacb8d554b9b14bd1c1fbc9928f45f01b211
MD5 a46563f8517be2febc398a00ea9c81ca
BLAKE2b-256 69ff855ca64341c12675b75eb1ce047f658fc0a14a7faf293546747db97ae9cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page