keep-skill 0.1.0__tar.gz → 0.3.0__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.
Files changed (39) hide show
  1. {keep_skill-0.1.0 → keep_skill-0.3.0}/.gitignore +3 -0
  2. keep_skill-0.3.0/PKG-INFO +218 -0
  3. keep_skill-0.3.0/README.md +167 -0
  4. keep_skill-0.3.0/SKILL.md +348 -0
  5. {keep_skill-0.1.0/patterns → keep_skill-0.3.0/docs/system}/conversations.md +30 -62
  6. {keep_skill-0.1.0/patterns → keep_skill-0.3.0/docs/system}/domains.md +39 -55
  7. keep_skill-0.3.0/docs/system/now.md +19 -0
  8. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/__init__.py +3 -6
  9. keep_skill-0.3.0/keep/api.py +1593 -0
  10. keep_skill-0.3.0/keep/cli.py +1076 -0
  11. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/config.py +172 -41
  12. keep_skill-0.3.0/keep/context.py +3 -0
  13. keep_skill-0.3.0/keep/document_store.py +908 -0
  14. keep_skill-0.3.0/keep/errors.py +33 -0
  15. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/indexing.py +1 -1
  16. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/logging_config.py +34 -3
  17. keep_skill-0.3.0/keep/paths.py +131 -0
  18. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/pending_summaries.py +52 -40
  19. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/embedding_cache.py +59 -46
  20. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/embeddings.py +43 -13
  21. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/mlx.py +23 -21
  22. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/store.py +169 -25
  23. {keep_skill-0.1.0 → keep_skill-0.3.0}/pyproject.toml +3 -3
  24. keep_skill-0.1.0/PKG-INFO +0 -290
  25. keep_skill-0.1.0/README.md +0 -239
  26. keep_skill-0.1.0/SKILL.md +0 -286
  27. keep_skill-0.1.0/keep/api.py +0 -686
  28. keep_skill-0.1.0/keep/cli.py +0 -503
  29. keep_skill-0.1.0/keep/context.py +0 -127
  30. keep_skill-0.1.0/keep/paths.py +0 -67
  31. {keep_skill-0.1.0 → keep_skill-0.3.0}/LICENSE +0 -0
  32. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/__main__.py +0 -0
  33. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/chunking.py +0 -0
  34. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/__init__.py +0 -0
  35. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/base.py +0 -0
  36. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/documents.py +0 -0
  37. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/llm.py +0 -0
  38. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/providers/summarization.py +0 -0
  39. {keep_skill-0.1.0 → keep_skill-0.3.0}/keep/types.py +0 -0
@@ -60,3 +60,6 @@ coverage.xml
60
60
  # Project specific
61
61
  .keep/
62
62
  test_extraction_store/
63
+ .DS_Store
64
+ .claude/
65
+ .agents/
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.4
2
+ Name: keep-skill
3
+ Version: 0.3.0
4
+ Summary: Semantic memory - remember and search documents by meaning
5
+ Project-URL: Homepage, https://github.com/hughpyle/keep
6
+ Project-URL: Repository, https://github.com/hughpyle/keep
7
+ Author: Hugh Pyle
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,chromadb,embeddings,semantic-memory,vector-search
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Topic :: Text Processing
20
+ Requires-Python: <3.14,>=3.11
21
+ Requires-Dist: chromadb>=0.4
22
+ Requires-Dist: tomli-w>=1.0
23
+ Requires-Dist: typer>=0.9
24
+ Provides-Extra: anthropic
25
+ Requires-Dist: anthropic>=0.40.0; extra == 'anthropic'
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
28
+ Requires-Dist: pytest>=7.0; extra == 'dev'
29
+ Provides-Extra: documents
30
+ Requires-Dist: beautifulsoup4>=4.9; extra == 'documents'
31
+ Requires-Dist: pypdf>=5.0; extra == 'documents'
32
+ Provides-Extra: gemini
33
+ Requires-Dist: google-genai>=1.0.0; extra == 'gemini'
34
+ Provides-Extra: local
35
+ Requires-Dist: beautifulsoup4>=4.9; extra == 'local'
36
+ Requires-Dist: mlx-lm>=0.10; (platform_system == 'Darwin' and platform_machine == 'arm64') and extra == 'local'
37
+ Requires-Dist: mlx>=0.10; (platform_system == 'Darwin' and platform_machine == 'arm64') and extra == 'local'
38
+ Requires-Dist: pypdf>=5.0; extra == 'local'
39
+ Requires-Dist: sentence-transformers>=2.2; extra == 'local'
40
+ Provides-Extra: mlx
41
+ Requires-Dist: mlx-lm>=0.10; extra == 'mlx'
42
+ Requires-Dist: mlx>=0.10; extra == 'mlx'
43
+ Provides-Extra: openai
44
+ Requires-Dist: openai>=1.0; extra == 'openai'
45
+ Provides-Extra: openclaw
46
+ Requires-Dist: anthropic>=0.18.0; extra == 'openclaw'
47
+ Requires-Dist: google-genai>=1.0.0; extra == 'openclaw'
48
+ Provides-Extra: sentence-transformers
49
+ Requires-Dist: sentence-transformers>=2.2; extra == 'sentence-transformers'
50
+ Description-Content-Type: text/markdown
51
+
52
+ # keep
53
+
54
+ **Semantic memory with version history.**
55
+
56
+ Index documents and notes. Search by meaning. Track changes over time.
57
+
58
+ ```bash
59
+ pip install 'keep-skill[local]'
60
+ keep init
61
+
62
+ # Index content
63
+ keep update path/to/document.md -t project=myapp
64
+ keep update "Rate limit is 100 req/min" -t topic=api
65
+
66
+ # Search by meaning
67
+ keep find "what's the rate limit?"
68
+
69
+ # Track what you're working on
70
+ keep now "Debugging auth flow"
71
+ keep now -V 1 # Previous context
72
+ ```
73
+
74
+ ---
75
+
76
+ ## What It Does
77
+
78
+ - **Semantic search** — Find by meaning, not just keywords
79
+ - **Version history** — All documents retain history on update
80
+ - **Tag organization** — Filter and navigate with key=value tags
81
+ - **Recency decay** — Recent items rank higher in search
82
+ - **Works offline** — Local embedding models by default
83
+
84
+ Backed by ChromaDB for vectors, SQLite for metadata and versions.
85
+
86
+ ---
87
+
88
+ ## Installation
89
+
90
+ **Python 3.11–3.13 required.**
91
+
92
+ ```bash
93
+ # Recommended: local models (works offline)
94
+ pip install 'keep-skill[local]'
95
+
96
+ # Or with uv (faster):
97
+ uv tool install 'keep-skill[local]'
98
+
99
+ # API-based alternative (requires OPENAI_API_KEY)
100
+ pip install 'keep-skill[openai]'
101
+ ```
102
+
103
+ First run downloads embedding models (~3-5 minutes).
104
+
105
+ ---
106
+
107
+ ## Quick Start
108
+
109
+ ```bash
110
+ keep init # Creates .keep/ at repo root
111
+
112
+ # Index files and notes
113
+ keep update file:///path/to/doc.md -t project=myapp
114
+ keep update "Important insight" -t type=note
115
+
116
+ # Search
117
+ keep find "authentication flow" --limit 5
118
+ keep find "auth" --since P7D # Last 7 days
119
+
120
+ # Retrieve
121
+ keep get file:///path/to/doc.md
122
+ keep get ID -V 1 # Previous version
123
+ keep get ID --history # All versions
124
+
125
+ # Tags
126
+ keep tag project=myapp # Find by tag
127
+ keep tag --list # List all tags
128
+
129
+ # Current context
130
+ keep now # Show what you're working on
131
+ keep now "Fixing login bug" # Update context
132
+ ```
133
+
134
+ ### Python API
135
+
136
+ ```python
137
+ from keep import Keeper
138
+
139
+ kp = Keeper()
140
+
141
+ # Index
142
+ kp.update("file:///path/to/doc.md", tags={"project": "myapp"})
143
+ kp.remember("Rate limit is 100 req/min", tags={"topic": "api"})
144
+
145
+ # Search
146
+ results = kp.find("rate limit", limit=5)
147
+ for r in results:
148
+ print(f"[{r.score:.2f}] {r.summary}")
149
+
150
+ # Version history
151
+ prev = kp.get_version("doc:1", offset=1)
152
+ versions = kp.list_versions("doc:1")
153
+ ```
154
+
155
+ See [docs/QUICKSTART.md](docs/QUICKSTART.md) for configuration and more examples.
156
+
157
+ ---
158
+
159
+ ## Documentation
160
+
161
+ - **[docs/QUICKSTART.md](docs/QUICKSTART.md)** — Setup, configuration, lazy summarization
162
+ - **[docs/REFERENCE.md](docs/REFERENCE.md)** — Complete CLI and API reference
163
+ - **[docs/AGENT-GUIDE.md](docs/AGENT-GUIDE.md)** — Working session patterns
164
+ - **[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)** — How it works under the hood
165
+ - **[SKILL.md](SKILL.md)** — The reflective practice (for AI agents)
166
+
167
+ ---
168
+
169
+ ## For AI Agents
170
+
171
+ This library was designed as an agent skill — persistent memory that helps agents reflect before acting and learn from experience.
172
+
173
+ **The practice:**
174
+ - Pause before acting — `keep find` what you already know
175
+ - Notice breakdowns — when assumptions surface, index them
176
+ - Reflect after — `keep update` learnings for future sessions
177
+
178
+ See **[SKILL.md](SKILL.md)** for the full practice guide.
179
+
180
+ ---
181
+
182
+ ## Status
183
+
184
+ **Current:** v0.3.0
185
+
186
+ **Working:**
187
+ - ✅ Semantic search with embeddings
188
+ - ✅ Document versioning (all updates retain history)
189
+ - ✅ Content-addressed IDs for text (same content = same ID)
190
+ - ✅ Tag queries and full-text search
191
+ - ✅ Current context tracking (`keep now`)
192
+ - ✅ Recency decay (recent items rank higher)
193
+ - ✅ Lazy summarization (background processing)
194
+ - ✅ Provider abstraction (local or API-based)
195
+
196
+ **Planned** (see [later/](later/)):
197
+ - ⏳ Private/shared routing
198
+ - ⏳ Relationship graphs between items
199
+ - ⏳ LLM-based auto-tagging
200
+
201
+ ---
202
+
203
+ ## License
204
+
205
+ MIT
206
+
207
+ ---
208
+
209
+ ## Contributing
210
+
211
+ Published on [PyPI as `keep-skill`](https://pypi.org/project/keep-skill/).
212
+
213
+ Issues and PRs welcome:
214
+ - Provider implementations
215
+ - Performance improvements
216
+ - Documentation clarity
217
+
218
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
@@ -0,0 +1,167 @@
1
+ # keep
2
+
3
+ **Semantic memory with version history.**
4
+
5
+ Index documents and notes. Search by meaning. Track changes over time.
6
+
7
+ ```bash
8
+ pip install 'keep-skill[local]'
9
+ keep init
10
+
11
+ # Index content
12
+ keep update path/to/document.md -t project=myapp
13
+ keep update "Rate limit is 100 req/min" -t topic=api
14
+
15
+ # Search by meaning
16
+ keep find "what's the rate limit?"
17
+
18
+ # Track what you're working on
19
+ keep now "Debugging auth flow"
20
+ keep now -V 1 # Previous context
21
+ ```
22
+
23
+ ---
24
+
25
+ ## What It Does
26
+
27
+ - **Semantic search** — Find by meaning, not just keywords
28
+ - **Version history** — All documents retain history on update
29
+ - **Tag organization** — Filter and navigate with key=value tags
30
+ - **Recency decay** — Recent items rank higher in search
31
+ - **Works offline** — Local embedding models by default
32
+
33
+ Backed by ChromaDB for vectors, SQLite for metadata and versions.
34
+
35
+ ---
36
+
37
+ ## Installation
38
+
39
+ **Python 3.11–3.13 required.**
40
+
41
+ ```bash
42
+ # Recommended: local models (works offline)
43
+ pip install 'keep-skill[local]'
44
+
45
+ # Or with uv (faster):
46
+ uv tool install 'keep-skill[local]'
47
+
48
+ # API-based alternative (requires OPENAI_API_KEY)
49
+ pip install 'keep-skill[openai]'
50
+ ```
51
+
52
+ First run downloads embedding models (~3-5 minutes).
53
+
54
+ ---
55
+
56
+ ## Quick Start
57
+
58
+ ```bash
59
+ keep init # Creates .keep/ at repo root
60
+
61
+ # Index files and notes
62
+ keep update file:///path/to/doc.md -t project=myapp
63
+ keep update "Important insight" -t type=note
64
+
65
+ # Search
66
+ keep find "authentication flow" --limit 5
67
+ keep find "auth" --since P7D # Last 7 days
68
+
69
+ # Retrieve
70
+ keep get file:///path/to/doc.md
71
+ keep get ID -V 1 # Previous version
72
+ keep get ID --history # All versions
73
+
74
+ # Tags
75
+ keep tag project=myapp # Find by tag
76
+ keep tag --list # List all tags
77
+
78
+ # Current context
79
+ keep now # Show what you're working on
80
+ keep now "Fixing login bug" # Update context
81
+ ```
82
+
83
+ ### Python API
84
+
85
+ ```python
86
+ from keep import Keeper
87
+
88
+ kp = Keeper()
89
+
90
+ # Index
91
+ kp.update("file:///path/to/doc.md", tags={"project": "myapp"})
92
+ kp.remember("Rate limit is 100 req/min", tags={"topic": "api"})
93
+
94
+ # Search
95
+ results = kp.find("rate limit", limit=5)
96
+ for r in results:
97
+ print(f"[{r.score:.2f}] {r.summary}")
98
+
99
+ # Version history
100
+ prev = kp.get_version("doc:1", offset=1)
101
+ versions = kp.list_versions("doc:1")
102
+ ```
103
+
104
+ See [docs/QUICKSTART.md](docs/QUICKSTART.md) for configuration and more examples.
105
+
106
+ ---
107
+
108
+ ## Documentation
109
+
110
+ - **[docs/QUICKSTART.md](docs/QUICKSTART.md)** — Setup, configuration, lazy summarization
111
+ - **[docs/REFERENCE.md](docs/REFERENCE.md)** — Complete CLI and API reference
112
+ - **[docs/AGENT-GUIDE.md](docs/AGENT-GUIDE.md)** — Working session patterns
113
+ - **[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)** — How it works under the hood
114
+ - **[SKILL.md](SKILL.md)** — The reflective practice (for AI agents)
115
+
116
+ ---
117
+
118
+ ## For AI Agents
119
+
120
+ This library was designed as an agent skill — persistent memory that helps agents reflect before acting and learn from experience.
121
+
122
+ **The practice:**
123
+ - Pause before acting — `keep find` what you already know
124
+ - Notice breakdowns — when assumptions surface, index them
125
+ - Reflect after — `keep update` learnings for future sessions
126
+
127
+ See **[SKILL.md](SKILL.md)** for the full practice guide.
128
+
129
+ ---
130
+
131
+ ## Status
132
+
133
+ **Current:** v0.3.0
134
+
135
+ **Working:**
136
+ - ✅ Semantic search with embeddings
137
+ - ✅ Document versioning (all updates retain history)
138
+ - ✅ Content-addressed IDs for text (same content = same ID)
139
+ - ✅ Tag queries and full-text search
140
+ - ✅ Current context tracking (`keep now`)
141
+ - ✅ Recency decay (recent items rank higher)
142
+ - ✅ Lazy summarization (background processing)
143
+ - ✅ Provider abstraction (local or API-based)
144
+
145
+ **Planned** (see [later/](later/)):
146
+ - ⏳ Private/shared routing
147
+ - ⏳ Relationship graphs between items
148
+ - ⏳ LLM-based auto-tagging
149
+
150
+ ---
151
+
152
+ ## License
153
+
154
+ MIT
155
+
156
+ ---
157
+
158
+ ## Contributing
159
+
160
+ Published on [PyPI as `keep-skill`](https://pypi.org/project/keep-skill/).
161
+
162
+ Issues and PRs welcome:
163
+ - Provider implementations
164
+ - Performance improvements
165
+ - Documentation clarity
166
+
167
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.