这是什么?
UCW是一个本地AI存储系统。它 捕获工具交互 从克劳德经由MCP, 导入对话历史记录 来自ChatGPT、Cursor和Grok,并允许您 搜索、可视化和导出 一切都来自一个地方。所有数据都保存在您计算机上的SQLite中。没有云。没有订阅。
它如何捕获数据:
- 实时捕获(MCP): UCW作为MCP服务器运行。当Claude调用UCW工具时,这些交互是通过纳秒时间戳和语义丰富来捕获的。协议噪声会自动过滤掉。
- 导入:
ucw import chatgpt/cursor/grok从导出的文件中引入完整的对话历史记录——这是大部分可搜索内容的来源。 - 组合搜索: 一旦导入,
ucw search在一个查询中查找所有平台上的对话。
建筑
%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#2563eb', 'edgeLabelBackground':'#1a1a2e', 'tertiaryColor': '#1a1a2e'}}}%%
flowchart TB
subgraph Platforms["AI Platforms"]
direction LR
Claude["Claude Desktop/Code"]
Cursor["Cursor IDE"]
ChatGPT["ChatGPT"]
Grok["Grok"]
end
subgraph UCW["UCW Engine"]
direction TB
MCP["MCP Server
stdio protocol"]
Capture["Capture Pipeline
nanosecond timestamps"]
Enrich["Enrichment
intent · topic · coherence"]
DB["SQLite + FTS5
WAL mode · local only"]
Embed["Embedding Cache
sentence-transformers"]
end
subgraph Interface["User Interface"]
direction LR
CLI["14 CLI Commands"]
Web["Web Dashboard
port 7077"]
Tools["23 MCP Tools
Claude can call"]
end
Claude -->|MCP tool calls| MCP
Cursor -->|import| DB
ChatGPT -->|import| DB
Grok -->|import| DB
MCP --> Capture --> Enrich --> DB
DB --> Embed
DB --> CLI
DB --> Web
DB --> Tools
style Platforms fill:#1e3a5f,stroke:#2563eb,color:#fff
style UCW fill:#1a1a2e,stroke:#06b6d4,color:#fff
style Interface fill:#1e3a5f,stroke:#2563eb,color:#fff项目结构
ucw/
├── src/ucw/
│ ├── cli.py # 14 CLI commands (click)
│ ├── search.py # FTS5 keyword + semantic vector search
│ ├── web.py # Local web server (stdlib http.server)
│ ├── web_ui.py # Embedded SPA (HTML/CSS/JS)
│ ├── dashboard.py # Dashboard data aggregation
│ ├── config.py # Configuration & paths
│ ├── demo.py # Sample data generator
│ ├── errors.py # Error hierarchy with hints
│ ├── db/
│ │ ├── sqlite.py # CaptureDB, schema, WAL mode
│ │ ├── schema.sql # Core schema (events, sessions, moments)
│ │ └── migrations/ # 001-007 incremental migrations
│ ├── server/
│ │ ├── server.py # MCP protocol server
│ │ ├── bridge.py # UCWBridgeAdapter (enrichment)
│ │ ├── embeddings.py # sentence-transformers wrapper
│ │ └── router.py # Tool routing
│ ├── tools/ # 23 MCP tools across 7 modules
│ │ ├── ucw_tools.py # Capture stats, timeline, context
│ │ ├── coherence_tools.py # Search, moments, arcs
│ │ ├── graph_tools.py # Knowledge graph queries
│ │ ├── intelligence_tools.py # Emergence, alerts
│ │ ├── temporal_tools.py # Time-based patterns
│ │ ├── agent_tools.py # Cross-agent memory, trust
│ │ └── proof_tools.py # Hash chains, Merkle receipts
│ └── importers/ # ChatGPT, Cursor, Grok adapters
├── tests/ # 565+ tests
├── visual_assets/ # Dashboard screenshots
└── pyproject.toml # Hatch build, optional deps特性
Semantic Search
Find anything across all your AI tools
ucw search "that auth conversation" with FTS5 keyword + sentence-transformer embeddings. Cached vectors mean instant repeat queries.
FTS5 BM25 cosine similarity
MCP Capture + Import
Tool calls live, history imported
MCP server captures Claude tool interactions in real-time. Import full conversation history from ChatGPT, Cursor, and Grok exports. Protocol noise auto-filtered.
MCP import noise-filtered
Web Dashboard
Your AI memory at a glance
ucw web launches a local SPA with search, platform breakdown, knowledge graph, coherence moments. Dark/light themes.
localhost:7077 no npm zero deps
Knowledge Graph
See how ideas connect
Entities extracted from conversations form a graph. Relationships emerge across platforms — concepts that link your Claude work to ChatGPT research.
entities relationships force-directed
Coherence Detection
Cross-platform insight moments
UCW detects when the same concept appears across different AI tools — the "aha" moments where your thinking converges.
cross-platform moments arcs
Proof of Cognition
Cryptographic receipts for your AI work
SHA-256 hash chains and Merkle trees prove when ideas were captured. Timestamp your intellectual property.
SHA-256 Merkle immutable
快速开始
pip install ucw # Core (CLI + capture)
ucw init # Set up ~/.ucw/ and detect AI tools
ucw demo # Load 52 sample events to explore
ucw dashboard # See your AI memory overview
ucw search "authentication" # Search across all conversations
ucw web # Launch web dashboard at localhost:7077连接到克劳德(现场拍摄)
ucw mcp-config # Print the MCP config JSON粘贴到 克劳德桌面 (设置>开发人员>编辑配置)或 克劳德代码 (.claude/settings.json).
任选附件
pip install "ucw[embeddings]" # Semantic search (sentence-transformers)
pip install "ucw[ui]" # Rich terminal dashboard
pip install "ucw[all]" # Everything导入现有对话
ucw import chatgpt ~/Downloads/conversations.json
ucw import cursor # Auto-detects Cursor workspace DB
ucw import grok ~/Downloads/grok-export.json命令
| 命令 | 描述 |
|---|---|
ucw init | 设置UCW并检测已安装的AI工具 |
ucw server | 启动MCP服务器(由Claude使用) |
ucw search QUERY | 搜索对话 --platform, --after, --before, --semantic |
ucw web | 在以下位置启动web仪表板 localhost:7077 |
ucw dashboard | 带有平台细分和主题的终端仪表板 |
ucw index | 构建/管理语义搜索嵌入缓存 |
ucw capture-test | 验证完整的捕获管道是否正常工作 |
| `ucw import | |
| ` | 从ChatGPT、Cursor或Grok导入 |
ucw demo | 加载样本数据以探索特征 |
ucw status | 快速数据库统计 |
ucw doctor | 检查安装状况 |
ucw repair | 修复和优化数据库(VACUUM) |
ucw migrate | 运行数据库架构迁移 |
ucw mcp-config | 打印Claude MCP配置JSON |
23个MCP工具
当连接到Claude时,UCW提供7个类别的23个工具:
| 类别 | 工具 | 目的 |
|---|---|---|
| 捕捉 | capture_stats, timeline, session_context | 会话跟踪和事件回放 |
| 连贯性 | search, status, moments, scan, arcs | 跨平台洞察检测 |
| 智能 | emergence, event_stream, alerts | 实时模式识别 |
| 图 | knowledge_graph, entity_relationships | 实体提取和链接 |
| 时间 | time_patterns, decay_detection, activity_map | 基于时间的分析 |
| 代理 | cross_agent_memory, trust_scoring | 多智能体协调 |
| 证明 | hash_chain, merkle_tree, receipt | 认知的密码证明 |
技术栈
| 层 | 技术 | 目的 |
|---|---|---|
| 运行时 | Python 3.10+ | 零依赖核心(仅限 click) |
| 存储 | SQLite+FTS5 | WAL模式,仅限本地,纳秒时间戳 |
| 协议 | MCP(stdio) | 克劳德集成的模型上下文协议 |
| 搜索 | FTS5+句子变换器 | BM25关键字+余弦相似向量 |
| 网络 | stdlib http.server | 单文件SPA,无npm,无构建步骤 |
| 嵌入 | 句子转换器(可选) | 缓存在SQLite BLOB中,每个事件1.5KB |
| 测试 | pytest+ruff | 565+次测试,零皮棉错误 |
网络仪表盘
配置
UCW将所有东西都存储在 ~/.ucw/.用环境变量覆盖:
| 变量 | 默认值 | 描述 |
|---|---|---|
UCW_DATA_DIR | ~/.ucw | 数据目录 |
UCW_LOG_LEVEL | DEBUG | 日志级别 |
UCW_PLATFORM | claude-desktop | 平台标识符 |
需求
- Python 3.10+
- SQLite 3.35+(包含在Python中)
发展
git clone https://github.com/Dicoangelo/ucw.git
cd ucw
pip install -e ".[dev]"
pytest # 565+ tests
ruff check . # lint
ucw demo && ucw web # visual smoke testBuild Log — v0.4.0
| 度量 | v0.1.0 | v0.2.0 | v0.3.0 | v0.4.0 |
|---|---|---|---|---|
| MCP工具 | 7 | 8 | 23 | 23 |
| CLI命令 | 3 | 4 | 10 | 14 |
| 测试 | 63 | 153 | 469 | 565+ |
| 迁移 | 0 | 0 | 5 | 7 |
| 进口商 | 0 | 0 | 3 | 3 |
v0.4.0的亮点:
- 语义搜索(
ucw search)配备FTS5+嵌入式缓存 - Web仪表板(
ucw web)--当地SPA,黑暗/光明主题 - 捕获验证(
ucw capture-test)--管道健康检查 - 缓存一致性搜索(取代了暴力重嵌入)
视觉
┌─────────────────────────────────────────────────┐
│ │
│ Every AI conversation you've ever had │
│ is a data point in your cognitive portfolio. │
│ │
│ UCW captures the value. │
│ You own the equity. │
│ │
└─────────────────────────────────────────────────┘许可证
麻省理工学院
