cli-memory-os 0.1.18__tar.gz → 0.1.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cli_memory_os-0.1.18/cli_memory_os.egg-info → cli_memory_os-0.1.20}/PKG-INFO +275 -274
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/README.md +1 -0
- cli_memory_os-0.1.20/cli/commands/ask.py +108 -0
- cli_memory_os-0.1.20/cli/commands/backup.py +126 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/export.py +2 -20
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/import_cmd.py +61 -15
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/init.py +1 -1
- cli_memory_os-0.1.20/cli/commands/restore.py +10 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/sync.py +14 -3
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/workspace.py +7 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/main.py +1 -1
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/parser.py +22 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/tui/app.py +138 -103
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20/cli_memory_os.egg-info}/PKG-INFO +275 -274
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli_memory_os.egg-info/SOURCES.txt +4 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli_memory_os.egg-info/top_level.txt +0 -3
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/connectors/github.py +62 -2
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/connectors/gmail.py +14 -3
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/connectors/notion.py +85 -30
- cli_memory_os-0.1.20/core/chat.py +971 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/core/chunker.py +3 -3
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/core/context_builder.py +125 -7
- cli_memory_os-0.1.20/core/embedder.py +68 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/core/llm.py +158 -109
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/core/ranking.py +18 -3
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/core/vector_store.py +31 -15
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/config.py +48 -5
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/health.py +1 -1
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/workspace.py +12 -9
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/pyproject.toml +2 -1
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/setup.cfg +4 -4
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/storage/db.py +23 -22
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/storage/graph.py +55 -41
- cli_memory_os-0.1.20/tests/test_audit_remediation.py +379 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_cli_integration.py +60 -3
- cli_memory_os-0.1.20/tests/test_conversational_chat.py +622 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_production_readiness.py +129 -0
- cli_memory_os-0.1.18/cli/commands/ask.py +0 -67
- cli_memory_os-0.1.18/cli/commands/backup.py +0 -55
- cli_memory_os-0.1.18/core/embedder.py +0 -47
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/LICENSE +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/MANIFEST.in +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/benchmark.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/config_cmd.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/doctor.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/graph.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/logs.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/migrate.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/monitor.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/plugins.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/restart.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/start.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/status.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/stop.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/update.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/commands/version.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli/tui/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli_memory_os.egg-info/dependency_links.txt +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli_memory_os.egg-info/entry_points.txt +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/cli_memory_os.egg-info/requires.txt +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/connectors/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/connectors/base.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/connectors/registry.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/core/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/compose.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/docker.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/infrastructure/observability.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/models/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/models/memory.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/storage/__init__.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/storage/schema.sql +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/storage/tech_detector.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_commands_phase2.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_compose_manager.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_composio_connectors.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_concurrent_db.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_core_rag_pipeline.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_first_time_user_experience.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_infrastructure_stabilization.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_load_stress.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_sync_ask_cli.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_tui.py +0 -0
- {cli_memory_os-0.1.18 → cli_memory_os-0.1.20}/tests/test_v1_features.py +0 -0
|
@@ -1,274 +1,275 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cli-memory-os
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: CLI-based Personal Knowledge Operating System
|
|
5
|
-
Author-email: Anirudh T <anirudh200584@gmail.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Keywords: RAG,Knowledge-Graph,Vector-Search,Personal-Assistant,LLM,Composio
|
|
8
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
-
Requires-Python: >=3.12
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Requires-Dist: composio==0.13.1
|
|
16
|
-
Requires-Dist: composio-langchain==0.13.1
|
|
17
|
-
Requires-Dist: groq>=0.13.0
|
|
18
|
-
Requires-Dist: langchain==1.3.9
|
|
19
|
-
Requires-Dist: langchain-groq==1.1.3
|
|
20
|
-
Requires-Dist: python-dotenv==1.2.2
|
|
21
|
-
Requires-Dist: pyyaml>=6.0.0
|
|
22
|
-
Requires-Dist: qdrant-client==1.18.0
|
|
23
|
-
Requires-Dist: neo4j==6.2.0
|
|
24
|
-
Requires-Dist: sentence-transformers>=3.0.0
|
|
25
|
-
Requires-Dist: textual>=0.80.0
|
|
26
|
-
Provides-Extra: dev
|
|
27
|
-
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
28
|
-
Requires-Dist: pytest-asyncio>=1.4.0; extra == "dev"
|
|
29
|
-
Dynamic: license-file
|
|
30
|
-
|
|
31
|
-
# Memory‑OS 🧠
|
|
32
|
-
|
|
33
|
-
[](https://pypi.org/project/cli-memory-os/)
|
|
34
|
-
[](https://opensource.org/licenses/MIT)
|
|
35
|
-
[](https://www.python.org/)
|
|
36
|
-
|
|
37
|
-
**Memory‑OS** is a local Personal Knowledge Operating System that automatically syncs, indexes, and retrieves information across your **GitHub** repositories, **Gmail** inbox messages, and **Notion** workspaces.
|
|
38
|
-
|
|
39
|
-
It provides both a command-line interface (CLI) and an interactive Terminal User Interface (TUI) powered by **Hybrid RAG** (Keyword + Vector + Knowledge Graph), local embeddings via SentenceTransformers, and ultra-fast LLM generation via the Groq API.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## ✨ Features
|
|
44
|
-
|
|
45
|
-
- **🌐 Multi-Source Ingestion**: Sync repositories, issues, PRs, emails, and Notion pages via Composio OAuth connectors.
|
|
46
|
-
- **⚡ Hybrid RAG Retrieval**: Combines **SQLite** (Keyword & Full-Text Search), **Qdrant** (Vector Similarity Search), and **Neo4j / SQLite Graph** (Knowledge Graph relationship lookups).
|
|
47
|
-
- **🤖 Groq LLM Integration**: Uses Groq's high-speed LLM inference (`llama-3.3-70b-versatile`, `llama-3.1-8b-instant`) with streaming responses.
|
|
48
|
-
- **🎨 Interactive Terminal User Interface (TUI)**: Beautiful full-screen terminal app built with Textual, featuring chat streaming, live diagnostics, and sidebar navigation.
|
|
49
|
-
- **🛡️ Robust Offline Fallbacks**: Gracefully degrades to local SQLite storage and local SQLite Graph when Docker database services or Neo4j are offline.
|
|
50
|
-
- **📁 Multi-Profile Workspaces**: Easily create, list, and switch between separate knowledge profile contexts.
|
|
51
|
-
- **📦 Portability**: Export and import complete knowledge bases into single compressed archive files.
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## 🏗️ Architecture
|
|
56
|
-
|
|
57
|
-
```mermaid
|
|
58
|
-
flowchart TD
|
|
59
|
-
subgraph Ingestion [1. Ingestion Layer]
|
|
60
|
-
GH[GitHub Repos & Docs]
|
|
61
|
-
GM[Gmail Inbox Messages]
|
|
62
|
-
NT[Notion Page Contents]
|
|
63
|
-
CP[Composio Integration Platform]
|
|
64
|
-
GH --> CP
|
|
65
|
-
GM --> CP
|
|
66
|
-
NT --> CP
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
subgraph Storage [2. Multi-Model Storage Layer]
|
|
70
|
-
DB[(SQLite: workspace.db)]
|
|
71
|
-
QD[(Qdrant Vector DB)]
|
|
72
|
-
N4J[(Neo4j Graph Database)]
|
|
73
|
-
SQL_G[(SQLite Graph Fallback)]
|
|
74
|
-
|
|
75
|
-
CP -->|Metadata & Docs| DB
|
|
76
|
-
DB -->|Text Chunks| CH[Chunking Core]
|
|
77
|
-
CH -->|Embeddings| EM["SentenceTransformer (all-MiniLM-L6-v2)"]
|
|
78
|
-
EM -->|384d Vectors| QD
|
|
79
|
-
|
|
80
|
-
DB -->|Graph Construction| N4J
|
|
81
|
-
DB -->|Graph Construction| SQL_G
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
subgraph Retrieval [3. Hybrid RAG Layer]
|
|
85
|
-
HS[Hybrid Search Router]
|
|
86
|
-
QD -->|Vector Cosine Similarity| HS
|
|
87
|
-
DB -->|FTS Keyword Matching| HS
|
|
88
|
-
N4J -->|Graph Relationship Lookups| HS
|
|
89
|
-
SQL_G -->|Graph Fallback Lookups| HS
|
|
90
|
-
|
|
91
|
-
HR[Hybrid Ranker & Scorer]
|
|
92
|
-
HS --> HR
|
|
93
|
-
|
|
94
|
-
RAG[RAG Context Builder]
|
|
95
|
-
HR -->|Merged Context| RAG
|
|
96
|
-
|
|
97
|
-
LLM["Groq LLM Engine (Llama 3 Stream)"]
|
|
98
|
-
RAG -->|Prompt Assembly| LLM
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
subgraph Interface [4. Interface Layer]
|
|
102
|
-
TUI[Terminal User Interface App]
|
|
103
|
-
CLI[Memory-OS CLI Commands]
|
|
104
|
-
|
|
105
|
-
TUI -->|Search/Chat Queries| Retrieval
|
|
106
|
-
CLI -->|Admin/Sync Commands| Ingestion
|
|
107
|
-
CLI -->|Query Command| Retrieval
|
|
108
|
-
LLM -->|Streamed Answer| TUI
|
|
109
|
-
LLM -->|Formatted Output| CLI
|
|
110
|
-
end
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## 📦 Installation & Quick Start
|
|
116
|
-
|
|
117
|
-
### 1. Install via PyPI
|
|
118
|
-
```bash
|
|
119
|
-
pip install --upgrade cli-memory-os
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 2. Run the Onboarding Wizard
|
|
123
|
-
Initialize your workspace, set up database storage, configure API keys (**Groq** & **Composio**), and authorize connectors:
|
|
124
|
-
```bash
|
|
125
|
-
memory-os init
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### 3. Sync Your Data
|
|
129
|
-
Import your documents, emails, and repositories:
|
|
130
|
-
```bash
|
|
131
|
-
memory-os sync
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### 4. Ask Questions or Launch the Interactive TUI
|
|
135
|
-
Ask a quick question from the terminal:
|
|
136
|
-
```bash
|
|
137
|
-
memory-os ask "What was discussed in my latest emails about project deployment?"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Or launch the full interactive terminal application:
|
|
141
|
-
```bash
|
|
142
|
-
memory-os
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## 🖥️ Interactive Terminal Application (TUI)
|
|
148
|
-
|
|
149
|
-
Launch the full-screen terminal interface by running `memory-os` without arguments.
|
|
150
|
-
|
|
151
|
-
Features of the TUI:
|
|
152
|
-
- **💬 Chat Panel**: Ask questions with real-time token streaming and expandable source citations.
|
|
153
|
-
- **📊 Overview Dashboard**: Monitor total indexed repositories, documents, emails, vectors, and active model configs.
|
|
154
|
-
- **🩺 Diagnostics Panel**: Run line-by-line connection health checks for local databases, LLM APIs, and connectors.
|
|
155
|
-
- **⚙️ Config Manager**: View and inspect active TOML configuration settings.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 🗄️ Database Strategy
|
|
160
|
-
|
|
161
|
-
Memory-OS employs a **multi-model storage strategy**:
|
|
162
|
-
|
|
163
|
-
| Engine | Role & Rationale |
|
|
164
|
-
| :--- | :--- |
|
|
165
|
-
| **SQLite (`workspace.db`)** | Primary structured storage for document chunks, metadata, and full-text keyword indexing with fast ACID transactions. |
|
|
166
|
-
| **Qdrant** | High-performance vector database storing 384-dimensional dense vector embeddings generated locally by `all-MiniLM-L6-v2`. |
|
|
167
|
-
| **Neo4j / SQLite Graph** | Native property graph for mapping relationships (`Repository-[USES]->Technology` or `Email-[SENT_BY]->User`). Seamlessly falls back to a relational SQLite graph schema when Neo4j is offline. |
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## 🚀 CLI Commands Reference
|
|
172
|
-
|
|
173
|
-
| Category | Command | Description |
|
|
174
|
-
| :--- | :--- | :--- |
|
|
175
|
-
| **App & TUI** | `memory-os` | Launches the interactive terminal user interface. |
|
|
176
|
-
| **Setup & Core** | `memory-os init` | Guided onboarding wizard for dependencies, Docker, API keys, and connectors. |
|
|
177
|
-
| | `memory-os start` | Starts background Docker Compose database services (Neo4j, Qdrant). |
|
|
178
|
-
| | `memory-os stop` | Stops background Docker Compose database services. |
|
|
179
|
-
| | `memory-os restart` | Restarts database services. |
|
|
180
|
-
| **Operations** | `memory-os sync [--source SOURCE] [--rebuild]` | Incremental or full data synchronization from GitHub, Gmail, or Notion. |
|
|
181
|
-
| | `memory-os ask <question>` | Queries the knowledge base using the Hybrid RAG engine. |
|
|
182
|
-
| **Diagnostics** | `memory-os doctor` | Comprehensive health check across Python, Docker, databases, LLMs, and API keys. |
|
|
183
|
-
| | `memory-os status` | Displays indexed counts (repos, docs, emails, vectors, embedding models). |
|
|
184
|
-
| | `memory-os monitor` | Aggregates log metrics (indexing speeds, search rates, LLM response latencies). |
|
|
185
|
-
| | `memory-os benchmark` | Runs performance benchmarks across keyword, vector, hybrid, and RAG pipelines. |
|
|
186
|
-
| | `memory-os logs [--tail N]` | Views system logs with rotation support. |
|
|
187
|
-
| **Config & Workspace**| `memory-os config show\|get\|set\|reset` | Inspects, modifies, or resets settings in `~/.memory-os/config.toml`. |
|
|
188
|
-
| | `memory-os workspace list\|create\|switch\|delete\|info` | Manages multiple isolated workspace profile directories. |
|
|
189
|
-
| | `memory-os export <file.zip>` | Compresses active workspace databases and configuration into a backup file. |
|
|
190
|
-
| | `memory-os import <file.zip>` | Restores a workspace profile from a backup zip archive. |
|
|
191
|
-
| | `memory-os
|
|
192
|
-
| | `memory-os
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
from connectors.
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-memory-os
|
|
3
|
+
Version: 0.1.20
|
|
4
|
+
Summary: CLI-based Personal Knowledge Operating System
|
|
5
|
+
Author-email: Anirudh T <anirudh200584@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: RAG,Knowledge-Graph,Vector-Search,Personal-Assistant,LLM,Composio
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: composio==0.13.1
|
|
16
|
+
Requires-Dist: composio-langchain==0.13.1
|
|
17
|
+
Requires-Dist: groq>=0.13.0
|
|
18
|
+
Requires-Dist: langchain==1.3.9
|
|
19
|
+
Requires-Dist: langchain-groq==1.1.3
|
|
20
|
+
Requires-Dist: python-dotenv==1.2.2
|
|
21
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
22
|
+
Requires-Dist: qdrant-client==1.18.0
|
|
23
|
+
Requires-Dist: neo4j==6.2.0
|
|
24
|
+
Requires-Dist: sentence-transformers>=3.0.0
|
|
25
|
+
Requires-Dist: textual>=0.80.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-asyncio>=1.4.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# Memory‑OS 🧠
|
|
32
|
+
|
|
33
|
+
[](https://pypi.org/project/cli-memory-os/)
|
|
34
|
+
[](https://opensource.org/licenses/MIT)
|
|
35
|
+
[](https://www.python.org/)
|
|
36
|
+
|
|
37
|
+
**Memory‑OS** is a local Personal Knowledge Operating System that automatically syncs, indexes, and retrieves information across your **GitHub** repositories, **Gmail** inbox messages, and **Notion** workspaces.
|
|
38
|
+
|
|
39
|
+
It provides both a command-line interface (CLI) and an interactive Terminal User Interface (TUI) powered by **Hybrid RAG** (Keyword + Vector + Knowledge Graph), local embeddings via SentenceTransformers, and ultra-fast LLM generation via the Groq API.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## ✨ Features
|
|
44
|
+
|
|
45
|
+
- **🌐 Multi-Source Ingestion**: Sync repositories, issues, PRs, emails, and Notion pages via Composio OAuth connectors.
|
|
46
|
+
- **⚡ Hybrid RAG Retrieval**: Combines **SQLite** (Keyword & Full-Text Search), **Qdrant** (Vector Similarity Search), and **Neo4j / SQLite Graph** (Knowledge Graph relationship lookups).
|
|
47
|
+
- **🤖 Groq LLM Integration**: Uses Groq's high-speed LLM inference (`llama-3.3-70b-versatile`, `llama-3.1-8b-instant`) with streaming responses.
|
|
48
|
+
- **🎨 Interactive Terminal User Interface (TUI)**: Beautiful full-screen terminal app built with Textual, featuring chat streaming, live diagnostics, and sidebar navigation.
|
|
49
|
+
- **🛡️ Robust Offline Fallbacks**: Gracefully degrades to local SQLite storage and local SQLite Graph when Docker database services or Neo4j are offline.
|
|
50
|
+
- **📁 Multi-Profile Workspaces**: Easily create, list, and switch between separate knowledge profile contexts.
|
|
51
|
+
- **📦 Portability**: Export and import complete knowledge bases into single compressed archive files.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🏗️ Architecture
|
|
56
|
+
|
|
57
|
+
```mermaid
|
|
58
|
+
flowchart TD
|
|
59
|
+
subgraph Ingestion [1. Ingestion Layer]
|
|
60
|
+
GH[GitHub Repos & Docs]
|
|
61
|
+
GM[Gmail Inbox Messages]
|
|
62
|
+
NT[Notion Page Contents]
|
|
63
|
+
CP[Composio Integration Platform]
|
|
64
|
+
GH --> CP
|
|
65
|
+
GM --> CP
|
|
66
|
+
NT --> CP
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
subgraph Storage [2. Multi-Model Storage Layer]
|
|
70
|
+
DB[(SQLite: workspace.db)]
|
|
71
|
+
QD[(Qdrant Vector DB)]
|
|
72
|
+
N4J[(Neo4j Graph Database)]
|
|
73
|
+
SQL_G[(SQLite Graph Fallback)]
|
|
74
|
+
|
|
75
|
+
CP -->|Metadata & Docs| DB
|
|
76
|
+
DB -->|Text Chunks| CH[Chunking Core]
|
|
77
|
+
CH -->|Embeddings| EM["SentenceTransformer (all-MiniLM-L6-v2)"]
|
|
78
|
+
EM -->|384d Vectors| QD
|
|
79
|
+
|
|
80
|
+
DB -->|Graph Construction| N4J
|
|
81
|
+
DB -->|Graph Construction| SQL_G
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
subgraph Retrieval [3. Hybrid RAG Layer]
|
|
85
|
+
HS[Hybrid Search Router]
|
|
86
|
+
QD -->|Vector Cosine Similarity| HS
|
|
87
|
+
DB -->|FTS Keyword Matching| HS
|
|
88
|
+
N4J -->|Graph Relationship Lookups| HS
|
|
89
|
+
SQL_G -->|Graph Fallback Lookups| HS
|
|
90
|
+
|
|
91
|
+
HR[Hybrid Ranker & Scorer]
|
|
92
|
+
HS --> HR
|
|
93
|
+
|
|
94
|
+
RAG[RAG Context Builder]
|
|
95
|
+
HR -->|Merged Context| RAG
|
|
96
|
+
|
|
97
|
+
LLM["Groq LLM Engine (Llama 3 Stream)"]
|
|
98
|
+
RAG -->|Prompt Assembly| LLM
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
subgraph Interface [4. Interface Layer]
|
|
102
|
+
TUI[Terminal User Interface App]
|
|
103
|
+
CLI[Memory-OS CLI Commands]
|
|
104
|
+
|
|
105
|
+
TUI -->|Search/Chat Queries| Retrieval
|
|
106
|
+
CLI -->|Admin/Sync Commands| Ingestion
|
|
107
|
+
CLI -->|Query Command| Retrieval
|
|
108
|
+
LLM -->|Streamed Answer| TUI
|
|
109
|
+
LLM -->|Formatted Output| CLI
|
|
110
|
+
end
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 📦 Installation & Quick Start
|
|
116
|
+
|
|
117
|
+
### 1. Install via PyPI
|
|
118
|
+
```bash
|
|
119
|
+
pip install --upgrade cli-memory-os
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 2. Run the Onboarding Wizard
|
|
123
|
+
Initialize your workspace, set up database storage, configure API keys (**Groq** & **Composio**), and authorize connectors:
|
|
124
|
+
```bash
|
|
125
|
+
memory-os init
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 3. Sync Your Data
|
|
129
|
+
Import your documents, emails, and repositories:
|
|
130
|
+
```bash
|
|
131
|
+
memory-os sync
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 4. Ask Questions or Launch the Interactive TUI
|
|
135
|
+
Ask a quick question from the terminal:
|
|
136
|
+
```bash
|
|
137
|
+
memory-os ask "What was discussed in my latest emails about project deployment?"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Or launch the full interactive terminal application:
|
|
141
|
+
```bash
|
|
142
|
+
memory-os
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🖥️ Interactive Terminal Application (TUI)
|
|
148
|
+
|
|
149
|
+
Launch the full-screen terminal interface by running `memory-os` without arguments.
|
|
150
|
+
|
|
151
|
+
Features of the TUI:
|
|
152
|
+
- **💬 Chat Panel**: Ask questions with real-time token streaming and expandable source citations.
|
|
153
|
+
- **📊 Overview Dashboard**: Monitor total indexed repositories, documents, emails, vectors, and active model configs.
|
|
154
|
+
- **🩺 Diagnostics Panel**: Run line-by-line connection health checks for local databases, LLM APIs, and connectors.
|
|
155
|
+
- **⚙️ Config Manager**: View and inspect active TOML configuration settings.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🗄️ Database Strategy
|
|
160
|
+
|
|
161
|
+
Memory-OS employs a **multi-model storage strategy**:
|
|
162
|
+
|
|
163
|
+
| Engine | Role & Rationale |
|
|
164
|
+
| :--- | :--- |
|
|
165
|
+
| **SQLite (`workspace.db`)** | Primary structured storage for document chunks, metadata, and full-text keyword indexing with fast ACID transactions. |
|
|
166
|
+
| **Qdrant** | High-performance vector database storing 384-dimensional dense vector embeddings generated locally by `all-MiniLM-L6-v2`. |
|
|
167
|
+
| **Neo4j / SQLite Graph** | Native property graph for mapping relationships (`Repository-[USES]->Technology` or `Email-[SENT_BY]->User`). Seamlessly falls back to a relational SQLite graph schema when Neo4j is offline. |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## 🚀 CLI Commands Reference
|
|
172
|
+
|
|
173
|
+
| Category | Command | Description |
|
|
174
|
+
| :--- | :--- | :--- |
|
|
175
|
+
| **App & TUI** | `memory-os` | Launches the interactive terminal user interface. |
|
|
176
|
+
| **Setup & Core** | `memory-os init` | Guided onboarding wizard for dependencies, Docker, API keys, and connectors. |
|
|
177
|
+
| | `memory-os start` | Starts background Docker Compose database services (Neo4j, Qdrant). |
|
|
178
|
+
| | `memory-os stop` | Stops background Docker Compose database services. |
|
|
179
|
+
| | `memory-os restart` | Restarts database services. |
|
|
180
|
+
| **Operations** | `memory-os sync [--source SOURCE] [--rebuild]` | Incremental or full data synchronization from GitHub, Gmail, or Notion. |
|
|
181
|
+
| | `memory-os ask <question>` | Queries the knowledge base using the Hybrid RAG engine. |
|
|
182
|
+
| **Diagnostics** | `memory-os doctor` | Comprehensive health check across Python, Docker, databases, LLMs, and API keys. |
|
|
183
|
+
| | `memory-os status` | Displays indexed counts (repos, docs, emails, vectors, embedding models). |
|
|
184
|
+
| | `memory-os monitor` | Aggregates log metrics (indexing speeds, search rates, LLM response latencies). |
|
|
185
|
+
| | `memory-os benchmark` | Runs performance benchmarks across keyword, vector, hybrid, and RAG pipelines. |
|
|
186
|
+
| | `memory-os logs [--tail N]` | Views system logs with rotation support. |
|
|
187
|
+
| **Config & Workspace**| `memory-os config show\|get\|set\|reset` | Inspects, modifies, or resets settings in `~/.memory-os/config.toml`. |
|
|
188
|
+
| | `memory-os workspace list\|create\|switch\|delete\|info` | Manages multiple isolated workspace profile directories. |
|
|
189
|
+
| | `memory-os export <file.zip>` | Compresses active workspace databases and configuration into a backup file. |
|
|
190
|
+
| | `memory-os import <file.zip>` | Restores a workspace profile from a backup zip archive. |
|
|
191
|
+
| | `memory-os restore <file.zip>`| Restores a workspace profile from a backup or archive (alias for import). |
|
|
192
|
+
| | `memory-os plugins` | Lists all registered integration connector plugins. |
|
|
193
|
+
| | `memory-os version` | Displays installed package and system version information. |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 🔌 Plugin Connector Architecture
|
|
198
|
+
|
|
199
|
+
Every connector inherits from `BaseConnector` (`connectors/base.py`) and registers via `@register` (`connectors/registry.py`):
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
from connectors.base import BaseConnector
|
|
203
|
+
from connectors.registry import register
|
|
204
|
+
|
|
205
|
+
@register
|
|
206
|
+
class SlackConnector(BaseConnector):
|
|
207
|
+
name = "Slack"
|
|
208
|
+
slug = "slack"
|
|
209
|
+
|
|
210
|
+
def authenticate(self) -> bool:
|
|
211
|
+
# Perform OAuth or API validation
|
|
212
|
+
return True
|
|
213
|
+
|
|
214
|
+
def sync(self) -> dict:
|
|
215
|
+
# Fetch messages and documents
|
|
216
|
+
return {"synced": 42}
|
|
217
|
+
|
|
218
|
+
def health(self) -> tuple[bool, str]:
|
|
219
|
+
return True, "Connected"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🛠️ Configuration & Customization
|
|
225
|
+
|
|
226
|
+
Settings are managed under `~/.memory-os/config.toml`:
|
|
227
|
+
|
|
228
|
+
```toml
|
|
229
|
+
[groq]
|
|
230
|
+
api_key = "gsk_..."
|
|
231
|
+
model = "llama-3.3-70b-versatile"
|
|
232
|
+
|
|
233
|
+
[composio]
|
|
234
|
+
api_key = "ak_..."
|
|
235
|
+
|
|
236
|
+
[vector]
|
|
237
|
+
provider = "qdrant"
|
|
238
|
+
host = "localhost"
|
|
239
|
+
port = 6333
|
|
240
|
+
embedding_model = "sentence-transformers/all-MiniLM-L6-v2"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
To update settings directly from the terminal:
|
|
244
|
+
```bash
|
|
245
|
+
memory-os config set groq.model llama-3.1-8b-instant
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 🚀 CI/CD & Automated PyPI Releases
|
|
251
|
+
|
|
252
|
+
Memory-OS includes a complete GitHub Actions CI/CD pipeline (`.github/workflows/ci-cd.yml`).
|
|
253
|
+
|
|
254
|
+
### Automated Workflow Actions:
|
|
255
|
+
1. **Automated Testing**: Runs `pytest` on every `push` and `pull_request` to `main`.
|
|
256
|
+
2. **Automated PyPI Deployment**: Automatically builds wheels and pushes the updated version to PyPI when changes are pushed to `main` or a new version tag (e.g. `v0.1.16`) is released.
|
|
257
|
+
|
|
258
|
+
### Setup Instructions for PyPI Releases:
|
|
259
|
+
1. **Option A: PyPI Trusted Publisher (Recommended / OIDC)**:
|
|
260
|
+
- Go to [PyPI Account Settings](https://pypi.org/manage/account/) -> **Publishers**.
|
|
261
|
+
- Add GitHub Publisher: Owner: `anirudh-pedro` (or your GitHub org/username), Repository: `Memory-OS`, Workflow name: `ci-cd.yml`.
|
|
262
|
+
2. **Option B: GitHub Secret**:
|
|
263
|
+
- Create a PyPI API Token on [PyPI Tokens](https://pypi.org/manage/account/token/).
|
|
264
|
+
- In GitHub Repository -> **Settings** -> **Secrets and variables** -> **Actions**, add a repository secret named `PYPI_API_TOKEN`.
|
|
265
|
+
|
|
266
|
+
To release a new version:
|
|
267
|
+
1. Update `version = "0.1.X"` in `pyproject.toml`.
|
|
268
|
+
2. Commit and push to `main` (or push a tag `git tag v0.1.X && git push origin v0.1.X`).
|
|
269
|
+
3. GitHub Actions will run tests, build artifacts, and deploy to PyPI automatically.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 📜 License
|
|
274
|
+
|
|
275
|
+
This project is licensed under the **MIT License**.
|
|
@@ -158,6 +158,7 @@ Memory-OS employs a **multi-model storage strategy**:
|
|
|
158
158
|
| | `memory-os workspace list\|create\|switch\|delete\|info` | Manages multiple isolated workspace profile directories. |
|
|
159
159
|
| | `memory-os export <file.zip>` | Compresses active workspace databases and configuration into a backup file. |
|
|
160
160
|
| | `memory-os import <file.zip>` | Restores a workspace profile from a backup zip archive. |
|
|
161
|
+
| | `memory-os restore <file.zip>`| Restores a workspace profile from a backup or archive (alias for import). |
|
|
161
162
|
| | `memory-os plugins` | Lists all registered integration connector plugins. |
|
|
162
163
|
| | `memory-os version` | Displays installed package and system version information. |
|
|
163
164
|
|