ragtime-cli 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.whl

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.
@@ -0,0 +1,402 @@
1
+ Metadata-Version: 2.4
2
+ Name: ragtime-cli
3
+ Version: 0.2.5
4
+ Summary: Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge
5
+ Author-email: Bret Martineau <bretwardjames@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/bretwardjames/ragtime
8
+ Project-URL: Repository, https://github.com/bretwardjames/ragtime
9
+ Project-URL: Issues, https://github.com/bretwardjames/ragtime/issues
10
+ Keywords: claude,rag,memory,mcp,ai,llm,semantic-search,vector-database
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
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 :: Documentation
19
+ Classifier: Topic :: Text Processing :: Indexing
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: chromadb>=0.4.0
24
+ Requires-Dist: pyyaml>=6.0
25
+ Requires-Dist: click>=8.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=8.0; extra == "dev"
28
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # ragtime-cli
32
+
33
+ Local-first memory and RAG system for Claude Code. Semantic search over code, docs, and team knowledge.
34
+
35
+ ## Features
36
+
37
+ - **Memory Storage**: Store structured knowledge with namespaces, types, and metadata
38
+ - **Semantic Search**: Query memories, docs, and code with natural language
39
+ - **Code Indexing**: Index functions, classes, and composables from Python, TypeScript, Vue, and Dart
40
+ - **Cross-Branch Sync**: Share context with teammates before PRs merge
41
+ - **Convention Checking**: Verify code follows team standards before PRs
42
+ - **Doc Generation**: Generate documentation from code (stubs or AI-powered)
43
+ - **Debug Tools**: Verify index integrity, inspect similarity scores
44
+ - **MCP Server**: Native Claude Code integration
45
+ - **Claude Commands**: Pre-built `/remember`, `/recall`, `/create-pr`, `/generate-docs` commands
46
+ - **ghp-cli Integration**: Auto-context when starting issues
47
+
48
+ ## Installation
49
+
50
+ ```bash
51
+ pip install ragtime-cli
52
+ ```
53
+
54
+ ## Quick Start
55
+
56
+ ```bash
57
+ # Initialize in your project
58
+ ragtime init
59
+
60
+ # Index your docs
61
+ ragtime index
62
+
63
+ # Store a memory
64
+ ragtime remember "Auth uses JWT with 15-min expiry" \
65
+ --namespace app \
66
+ --type architecture \
67
+ --component auth
68
+
69
+ # Search memories
70
+ ragtime search "authentication" --namespace app
71
+
72
+ # Install Claude commands
73
+ ragtime install --workspace
74
+
75
+ # Check for updates
76
+ ragtime update --check
77
+ ```
78
+
79
+ ## CLI Commands
80
+
81
+ ### Memory Storage
82
+
83
+ ```bash
84
+ # Store a memory
85
+ ragtime remember "content" --namespace app --type architecture --component auth
86
+
87
+ # List memories
88
+ ragtime memories --namespace app --type decision
89
+
90
+ # Graduate branch memory to app
91
+ ragtime graduate <memory-id>
92
+
93
+ # Delete a memory
94
+ ragtime forget <memory-id>
95
+ ```
96
+
97
+ ### Search & Indexing
98
+
99
+ ```bash
100
+ # Index everything (docs + code)
101
+ ragtime index
102
+
103
+ # Index only docs
104
+ ragtime index --type docs
105
+
106
+ # Index only code (functions, classes, composables)
107
+ ragtime index --type code
108
+
109
+ # Re-index with clear (removes old entries)
110
+ ragtime index --clear
111
+
112
+ # Semantic search across all content
113
+ ragtime search "how does auth work" --limit 10
114
+
115
+ # Search only code
116
+ ragtime search "useAsyncState" --type code
117
+
118
+ # Search only docs
119
+ ragtime search "authentication" --type docs --namespace app
120
+
121
+ # Reindex memory files
122
+ ragtime reindex
123
+
124
+ # Audit docs for missing frontmatter
125
+ ragtime audit docs/
126
+ ragtime audit docs/ --fix # Interactively add frontmatter
127
+ ragtime audit docs/ --json # Machine-readable output
128
+ ```
129
+
130
+ ### Documentation Generation
131
+
132
+ ```bash
133
+ # Generate doc stubs from code
134
+ ragtime generate src/ --stubs
135
+
136
+ # Specify output location
137
+ ragtime generate src/ --stubs -o docs/api
138
+
139
+ # Python only
140
+ ragtime generate src/ --stubs -l python
141
+
142
+ # Include private methods
143
+ ragtime generate src/ --stubs --include-private
144
+ ```
145
+
146
+ ### Debug & Verification
147
+
148
+ ```bash
149
+ # Debug a search query (show similarity scores)
150
+ ragtime debug search "authentication"
151
+ ragtime debug search "auth" --show-vectors
152
+
153
+ # Find similar documents
154
+ ragtime debug similar docs/auth/jwt.md
155
+
156
+ # Index statistics by namespace/type
157
+ ragtime debug stats
158
+ ragtime debug stats --by-namespace
159
+ ragtime debug stats --by-type
160
+
161
+ # Verify index integrity
162
+ ragtime debug verify
163
+ ```
164
+
165
+ ### Cross-Branch Sync
166
+
167
+ ```bash
168
+ # Sync all teammate branch memories
169
+ ragtime sync
170
+
171
+ # Auto-prune stale synced folders
172
+ ragtime sync --auto-prune
173
+
174
+ # Manual prune
175
+ ragtime prune --dry-run
176
+ ragtime prune
177
+ ```
178
+
179
+ ### Daemon (Auto-Sync)
180
+
181
+ ```bash
182
+ # Start background sync daemon
183
+ ragtime daemon start --interval 5m
184
+
185
+ # Check status
186
+ ragtime daemon status
187
+
188
+ # Stop daemon
189
+ ragtime daemon stop
190
+ ```
191
+
192
+ ### Claude Integration
193
+
194
+ ```bash
195
+ # Install Claude commands to workspace
196
+ ragtime install --workspace
197
+
198
+ # Install globally
199
+ ragtime install --global
200
+
201
+ # List available commands
202
+ ragtime install --list
203
+
204
+ # Set up ghp-cli hooks
205
+ ragtime setup-ghp
206
+ ```
207
+
208
+ ## Storage Structure
209
+
210
+ ```
211
+ .ragtime/
212
+ ├── config.yaml # Configuration
213
+ ├── CONVENTIONS.md # Team rules (checked by /create-pr)
214
+ ├── app/{component}/ # Graduated app knowledge (tracked)
215
+ │ └── {id}-{slug}.md
216
+ ├── team/ # Team conventions (tracked)
217
+ │ └── {id}-{slug}.md
218
+ ├── branches/
219
+ │ ├── {branch-slug}/ # Your branch (tracked in git)
220
+ │ │ ├── context.md
221
+ │ │ └── {id}-{slug}.md
222
+ │ └── .{branch-slug}/ # Synced from teammates (gitignored, dot-prefix)
223
+ ├── archive/branches/ # Archived completed branches (tracked)
224
+ └── index/ # ChromaDB vector store (gitignored)
225
+ ```
226
+
227
+ ## Configuration
228
+
229
+ `.ragtime/config.yaml`:
230
+
231
+ ```yaml
232
+ docs:
233
+ paths: ["docs", ".ragtime"]
234
+ patterns: ["**/*.md"]
235
+ exclude: ["**/node_modules/**"]
236
+
237
+ code:
238
+ paths: ["."]
239
+ languages: ["python", "typescript", "javascript", "vue", "dart"]
240
+ exclude: ["**/node_modules/**", "**/build/**", "**/dist/**"]
241
+
242
+ conventions:
243
+ files: [".ragtime/CONVENTIONS.md"]
244
+ also_search_memories: true
245
+ ```
246
+
247
+ ## Code Indexing
248
+
249
+ The code indexer extracts meaningful symbols from your codebase:
250
+
251
+ | Language | What Gets Indexed |
252
+ |----------|-------------------|
253
+ | Python | Classes, methods, functions (with docstrings) |
254
+ | TypeScript/JS | Exported functions, classes, interfaces, types, constants |
255
+ | Vue | Components, composable usage (useXxx calls) |
256
+ | Dart | Classes, functions, mixins, extensions |
257
+
258
+ Each symbol is indexed with:
259
+ - **content**: The code snippet with signature and docstring
260
+ - **file**: Full path to the source file
261
+ - **line**: Line number for quick navigation
262
+ - **symbol_name**: Searchable name (e.g., `useAsyncState`, `JWTManager.validate`)
263
+ - **symbol_type**: `function`, `class`, `method`, `interface`, `composable`, etc.
264
+
265
+ Example search results:
266
+ ```
267
+ ragtime search "useAsyncState" --type code
268
+
269
+ [1] /apps/web/components/agency/payers.vue
270
+ Type: code | Symbol: payers:useAsyncState
271
+ Score: 0.892
272
+ Uses composable: useAsyncState...
273
+ ```
274
+
275
+ ## Memory Format
276
+
277
+ Memories are markdown files with YAML frontmatter:
278
+
279
+ ```markdown
280
+ ---
281
+ id: abc123
282
+ namespace: app
283
+ type: architecture
284
+ component: auth
285
+ confidence: high
286
+ status: active
287
+ added: '2025-01-31'
288
+ author: bretwardjames
289
+ ---
290
+
291
+ Auth uses JWT tokens with 15-minute expiry for security.
292
+ Sessions are stored in Redis, not cookies.
293
+ ```
294
+
295
+ ## Namespaces
296
+
297
+ | Namespace | Purpose |
298
+ |-----------|---------|
299
+ | `app` | How the codebase works (architecture, decisions) |
300
+ | `team` | Team conventions and standards |
301
+ | `user-{name}` | Individual preferences |
302
+ | `branch-{name}` | Work-in-progress context |
303
+
304
+ ## Memory Types
305
+
306
+ | Type | Description |
307
+ |------|-------------|
308
+ | `architecture` | System design, patterns |
309
+ | `feature` | How features work |
310
+ | `decision` | Why we chose X over Y |
311
+ | `convention` | Team standards |
312
+ | `pattern` | Reusable approaches |
313
+ | `integration` | External service connections |
314
+ | `context` | Session handoff |
315
+
316
+ ## Claude Commands
317
+
318
+ After `ragtime install --workspace`:
319
+
320
+ | Command | Purpose |
321
+ |---------|---------|
322
+ | `/remember` | Capture knowledge mid-session |
323
+ | `/recall` | Search memories |
324
+ | `/handoff` | Save session context |
325
+ | `/start` | Resume work on an issue |
326
+ | `/create-pr` | Check conventions, graduate memories, create PR |
327
+ | `/generate-docs` | AI-powered documentation generation from code |
328
+ | `/import-docs` | Migrate existing docs to memories |
329
+ | `/pr-graduate` | Curate branch knowledge (fallback if forgot before PR) |
330
+ | `/audit` | Find duplicates/conflicts in memories |
331
+
332
+ ## MCP Server
333
+
334
+ Add to your Claude config (`.mcp.json`):
335
+
336
+ ```json
337
+ {
338
+ "mcpServers": {
339
+ "ragtime": {
340
+ "command": "ragtime-mcp",
341
+ "args": ["--path", "."]
342
+ }
343
+ }
344
+ }
345
+ ```
346
+
347
+ Available tools:
348
+ - `remember` - Store a memory
349
+ - `search` - Semantic search
350
+ - `list_memories` - List with filters
351
+ - `get_memory` - Get by ID
352
+ - `store_doc` - Store document verbatim
353
+ - `forget` - Delete memory
354
+ - `graduate` - Promote branch → app
355
+ - `update_status` - Change memory status
356
+
357
+ ## ghp-cli Integration
358
+
359
+ If you use [ghp-cli](https://github.com/bretwardjames/ghp-cli):
360
+
361
+ ```bash
362
+ # Register ragtime hooks
363
+ ragtime setup-ghp
364
+ ```
365
+
366
+ This auto-creates `context.md` from issue details when you run `ghp start`.
367
+
368
+ ## Workflow
369
+
370
+ ### Starting Work
371
+
372
+ ```bash
373
+ ghp start 123 # Creates branch + context.md
374
+ # or
375
+ ragtime new-branch 123 # Just the context
376
+ ```
377
+
378
+ ### During Development
379
+
380
+ ```bash
381
+ /remember "API uses rate limiting" # Capture insights
382
+ /handoff # Save progress for later
383
+ ```
384
+
385
+ ### Before PR
386
+
387
+ ```bash
388
+ /create-pr
389
+ # 1. Checks code against CONVENTIONS.md
390
+ # 2. Reviews branch memories
391
+ # 3. Graduates selected memories to app/
392
+ # 4. Commits knowledge with code
393
+ # 5. Creates PR
394
+ ```
395
+
396
+ ### After Merge
397
+
398
+ Graduated knowledge is already in the PR. Run `ragtime prune` to clean up synced folders.
399
+
400
+ ## License
401
+
402
+ MIT
@@ -1,12 +1,13 @@
1
- ragtime_cli-0.2.3.dist-info/licenses/LICENSE,sha256=9A0wJs2PRDciGRH4F8JUJ-aMKYQyq_gVu2ixrXs-l5A,1070
1
+ ragtime_cli-0.2.5.dist-info/licenses/LICENSE,sha256=9A0wJs2PRDciGRH4F8JUJ-aMKYQyq_gVu2ixrXs-l5A,1070
2
2
  src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- src/cli.py,sha256=PZ6NHl7rOyUVZ2HAcGPoytNRtsHczybTBy7A6xQpgoA,47320
4
- src/config.py,sha256=kaJV-7yI-LMW16e1w6JvM1ZCjgPf8EiBBOM4OXio6I8,4045
3
+ src/cli.py,sha256=8L_Ao9NUAVHRJpTCBvrj5dLd2FHrd-R-bvmZtKvgvg8,68996
4
+ src/config.py,sha256=mlqRkq1gi_bINqqz6TqT4GAR0M0G_hyeo7oY2zr-xsE,4066
5
5
  src/db.py,sha256=BKrlhilXYHNaj-ZcffinSXVhdUqowmwpFPBx7aLxamU,4642
6
- src/mcp_server.py,sha256=Tx0i73GXO0YmcVrdO7UjRMS0auN8fBG2LOpHuf_LUC0,20374
7
- src/memory.py,sha256=POT2lYeBcEx4_MPbsIdet6ScwcjmuETz8Dxmz-Z_7IY,11939
6
+ src/mcp_server.py,sha256=co6BbqNyDwrzN5iXQRsp4m5Ewq3-K5Eqq-sjphlczN4,20374
7
+ src/memory.py,sha256=8kuHBLDTsZdSBumgA9FRJhHp_VNeoV78QFmiDcJs7YI,12033
8
8
  src/commands/audit.md,sha256=Xkucm-gfBIMalK9wf7NBbyejpsqBTUAGGlb7GxMtMPY,5137
9
9
  src/commands/create-pr.md,sha256=u6-jVkDP_6bJQp6ImK039eY9F6B9E2KlAVlvLY-WV6Q,9483
10
+ src/commands/generate-docs.md,sha256=9W2Yy-PDyC3p5k39uEb31z5YAHkSKsQLg6gV3tLgSnQ,7015
10
11
  src/commands/handoff.md,sha256=8VxTddtW08jGTW36GW_rS77JdeSn8vHeMfklrWwVUD4,5055
11
12
  src/commands/import-docs.md,sha256=ByIdcfbdiF77HoFv5U6zZ_YvZf00-hAs9EMconXssvY,6927
12
13
  src/commands/pr-graduate.md,sha256=nXJMuXeOp0SZfjQ567NUO02Rg9zPQHQFbZbJ4Q_His0,6692
@@ -14,10 +15,11 @@ src/commands/recall.md,sha256=unQPWsmocKRoQR7jRtjrj8aVcMHverjGR6u5mYL8TLw,6008
14
15
  src/commands/remember.md,sha256=nNewsUhIqF4wtD1jhVDZvmLZjdcmPN6NmUM43SdWepc,5368
15
16
  src/commands/save.md,sha256=7gTpW46AU9Y4l8XVZ8f4h1sEdBfVqIRA7hlidUxMAC4,251
16
17
  src/commands/start.md,sha256=qoqhkMgET74DBx8YPIT1-wqCiVBUDxlmevigsCinHSY,6506
17
- src/indexers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ src/indexers/__init__.py,sha256=ixS6qYjcW9jWO8TY-pRPEONkOBaVIEa99cQNVkXHqEg,261
19
+ src/indexers/code.py,sha256=f-D6NLgayPbD-8goVKI-vlsiHgyrzS8Mkmo1oRFrBII,16473
18
20
  src/indexers/docs.py,sha256=7FENHaKSvC1T557bRzvmrjyaG_vK94GuQG9XMZdr89w,3349
19
- ragtime_cli-0.2.3.dist-info/METADATA,sha256=QaKUlKE4A2BwGX3NNTXm02JLwko_msFmJg3K6RyOmmo,5311
20
- ragtime_cli-0.2.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
21
- ragtime_cli-0.2.3.dist-info/entry_points.txt,sha256=cWLbeyMxZNbew-THS3bHXTpCRXt1EaUy5QUOXGXLjl4,75
22
- ragtime_cli-0.2.3.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
23
- ragtime_cli-0.2.3.dist-info/RECORD,,
21
+ ragtime_cli-0.2.5.dist-info/METADATA,sha256=HZOUb5o2lJVNytAUjUknt1YnxbV3PJGXUEfUz-YPdFM,9875
22
+ ragtime_cli-0.2.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
23
+ ragtime_cli-0.2.5.dist-info/entry_points.txt,sha256=cWLbeyMxZNbew-THS3bHXTpCRXt1EaUy5QUOXGXLjl4,75
24
+ ragtime_cli-0.2.5.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
25
+ ragtime_cli-0.2.5.dist-info/RECORD,,