ragtime-cli 0.2.5__py3-none-any.whl → 0.2.6__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.

Potentially problematic release.


This version of ragtime-cli might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragtime-cli
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge
5
5
  Author-email: Bret Martineau <bretwardjames@gmail.com>
6
6
  License-Expression: MIT
@@ -1,9 +1,9 @@
1
- ragtime_cli-0.2.5.dist-info/licenses/LICENSE,sha256=9A0wJs2PRDciGRH4F8JUJ-aMKYQyq_gVu2ixrXs-l5A,1070
1
+ ragtime_cli-0.2.6.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=8L_Ao9NUAVHRJpTCBvrj5dLd2FHrd-R-bvmZtKvgvg8,68996
3
+ src/cli.py,sha256=Hnf2cRcI-czCBV7CGyGMOUTI_ZqxuA8ZDK9R_msw540,70299
4
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=co6BbqNyDwrzN5iXQRsp4m5Ewq3-K5Eqq-sjphlczN4,20374
6
+ src/mcp_server.py,sha256=uOixURyPK0sodt3OqZJJBlUHncas9PPC49N-OGGuSAg,20374
7
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
@@ -15,11 +15,11 @@ src/commands/recall.md,sha256=unQPWsmocKRoQR7jRtjrj8aVcMHverjGR6u5mYL8TLw,6008
15
15
  src/commands/remember.md,sha256=nNewsUhIqF4wtD1jhVDZvmLZjdcmPN6NmUM43SdWepc,5368
16
16
  src/commands/save.md,sha256=7gTpW46AU9Y4l8XVZ8f4h1sEdBfVqIRA7hlidUxMAC4,251
17
17
  src/commands/start.md,sha256=qoqhkMgET74DBx8YPIT1-wqCiVBUDxlmevigsCinHSY,6506
18
- src/indexers/__init__.py,sha256=ixS6qYjcW9jWO8TY-pRPEONkOBaVIEa99cQNVkXHqEg,261
18
+ src/indexers/__init__.py,sha256=MYoCPZUpHakMX1s2vWnc9shjWfx_X1_0JzUhpKhnKUQ,454
19
19
  src/indexers/code.py,sha256=f-D6NLgayPbD-8goVKI-vlsiHgyrzS8Mkmo1oRFrBII,16473
20
20
  src/indexers/docs.py,sha256=7FENHaKSvC1T557bRzvmrjyaG_vK94GuQG9XMZdr89w,3349
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,,
21
+ ragtime_cli-0.2.6.dist-info/METADATA,sha256=fBoyzYYbWaK5RgBU_VGUXAxxhWIsQXozRIMTsFKjbBQ,9875
22
+ ragtime_cli-0.2.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
23
+ ragtime_cli-0.2.6.dist-info/entry_points.txt,sha256=cWLbeyMxZNbew-THS3bHXTpCRXt1EaUy5QUOXGXLjl4,75
24
+ ragtime_cli-0.2.6.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
25
+ ragtime_cli-0.2.6.dist-info/RECORD,,
src/cli.py CHANGED
@@ -11,8 +11,10 @@ import sys
11
11
 
12
12
  from .db import RagtimeDB
13
13
  from .config import RagtimeConfig, init_config
14
- from .indexers.docs import index_directory as index_docs
15
- from .indexers.code import index_directory as index_code
14
+ from .indexers import (
15
+ discover_docs, index_doc_file, DocEntry,
16
+ discover_code_files, index_code_file, CodeEntry,
17
+ )
16
18
  from .memory import Memory, MemoryStore
17
19
 
18
20
 
@@ -167,7 +169,7 @@ def get_remote_branches_with_ragtime(path: Path) -> list[str]:
167
169
 
168
170
 
169
171
  @click.group()
170
- @click.version_option(version="0.2.5")
172
+ @click.version_option(version="0.2.6")
171
173
  def main():
172
174
  """Ragtime - semantic search over code and documentation."""
173
175
  pass
@@ -274,26 +276,43 @@ def index(path: Path, index_type: str, clear: bool):
274
276
  db.clear(type_filter=index_type)
275
277
 
276
278
  if index_type in ("all", "docs"):
277
- total_entries = []
279
+ # Discover all doc files first
280
+ all_doc_files = []
278
281
  for docs_path in config.docs.paths:
279
282
  docs_root = path / docs_path
280
283
  if not docs_root.exists():
281
284
  click.echo(f" Docs path {docs_root} not found, skipping...")
282
285
  continue
283
- click.echo(f"Indexing docs in {docs_root}...")
284
- entries = index_docs(
286
+ files = discover_docs(
285
287
  docs_root,
286
288
  patterns=config.docs.patterns,
287
289
  exclude=config.docs.exclude,
288
290
  )
289
- total_entries.extend(entries)
290
-
291
- if total_entries:
292
- ids = [e.file_path for e in total_entries]
293
- documents = [e.content for e in total_entries]
294
- metadatas = [e.to_metadata() for e in total_entries]
295
- db.upsert(ids=ids, documents=documents, metadatas=metadatas)
296
- click.echo(f" Indexed {len(total_entries)} documents")
291
+ all_doc_files.extend(files)
292
+
293
+ if all_doc_files:
294
+ click.echo(f"Found {len(all_doc_files)} doc files")
295
+ total_entries = []
296
+ with click.progressbar(
297
+ all_doc_files,
298
+ label=" Processing",
299
+ show_percent=True,
300
+ show_pos=True,
301
+ item_show_func=lambda f: f.name[:30] if f else "",
302
+ ) as files:
303
+ for file_path in files:
304
+ entry = index_doc_file(file_path)
305
+ if entry:
306
+ total_entries.append(entry)
307
+
308
+ if total_entries:
309
+ ids = [e.file_path for e in total_entries]
310
+ documents = [e.content for e in total_entries]
311
+ metadatas = [e.to_metadata() for e in total_entries]
312
+ db.upsert(ids=ids, documents=documents, metadatas=metadatas)
313
+ click.echo(f" Indexed {len(total_entries)} documents")
314
+ else:
315
+ click.echo(" No valid documents found")
297
316
  else:
298
317
  click.echo(" No documents found")
299
318
 
@@ -303,36 +322,52 @@ def index(path: Path, index_type: str, clear: bool):
303
322
  for docs_path in config.docs.paths:
304
323
  code_exclude.append(f"**/{docs_path}/**")
305
324
 
306
- total_entries = []
325
+ # Discover all code files first
326
+ all_code_files = []
307
327
  for code_path_str in config.code.paths:
308
328
  code_root = path / code_path_str
309
329
  if not code_root.exists():
310
330
  click.echo(f" Code path {code_root} not found, skipping...")
311
331
  continue
312
- click.echo(f"Indexing code in {code_root}...")
313
- entries = index_code(
332
+ files = discover_code_files(
314
333
  code_root,
315
334
  languages=config.code.languages,
316
335
  exclude=code_exclude,
317
336
  )
318
- total_entries.extend(entries)
319
-
320
- if total_entries:
321
- # Create unique IDs: file:line:symbol
322
- ids = [f"{e.file_path}:{e.line_number}:{e.symbol_name}" for e in total_entries]
323
- documents = [e.content for e in total_entries]
324
- metadatas = [e.to_metadata() for e in total_entries]
325
- db.upsert(ids=ids, documents=documents, metadatas=metadatas)
326
- click.echo(f" Indexed {len(total_entries)} code symbols")
327
-
328
- # Show breakdown by type
329
- by_type = {}
330
- for e in total_entries:
331
- by_type[e.symbol_type] = by_type.get(e.symbol_type, 0) + 1
332
- breakdown = ", ".join(f"{count} {typ}s" for typ, count in sorted(by_type.items()))
333
- click.echo(f" ({breakdown})")
337
+ all_code_files.extend(files)
338
+
339
+ if all_code_files:
340
+ click.echo(f"Found {len(all_code_files)} code files")
341
+ total_entries = []
342
+ with click.progressbar(
343
+ all_code_files,
344
+ label=" Processing",
345
+ show_percent=True,
346
+ show_pos=True,
347
+ item_show_func=lambda f: f.name[:30] if f else "",
348
+ ) as files:
349
+ for file_path in files:
350
+ file_entries = index_code_file(file_path)
351
+ total_entries.extend(file_entries)
352
+
353
+ if total_entries:
354
+ # Create unique IDs: file:line:symbol
355
+ ids = [f"{e.file_path}:{e.line_number}:{e.symbol_name}" for e in total_entries]
356
+ documents = [e.content for e in total_entries]
357
+ metadatas = [e.to_metadata() for e in total_entries]
358
+ db.upsert(ids=ids, documents=documents, metadatas=metadatas)
359
+ click.echo(f" Indexed {len(total_entries)} code symbols")
360
+
361
+ # Show breakdown by type
362
+ by_type = {}
363
+ for e in total_entries:
364
+ by_type[e.symbol_type] = by_type.get(e.symbol_type, 0) + 1
365
+ breakdown = ", ".join(f"{count} {typ}s" for typ, count in sorted(by_type.items()))
366
+ click.echo(f" ({breakdown})")
367
+ else:
368
+ click.echo(" No code symbols found")
334
369
  else:
335
- click.echo(" No code symbols found")
370
+ click.echo(" No code files found")
336
371
 
337
372
  stats = db.stats()
338
373
  click.echo(f"\nIndex stats: {stats['total']} total ({stats['docs']} docs, {stats['code']} code)")
@@ -1991,7 +2026,7 @@ def update(check: bool):
1991
2026
  from urllib.request import urlopen
1992
2027
  from urllib.error import URLError
1993
2028
 
1994
- current = "0.2.5"
2029
+ current = "0.2.6"
1995
2030
 
1996
2031
  click.echo(f"Current version: {current}")
1997
2032
  click.echo("Checking PyPI for updates...")
src/indexers/__init__.py CHANGED
@@ -1,6 +1,11 @@
1
1
  """Indexers for ragtime - parse different content types for vector search."""
2
2
 
3
- from .docs import index_directory as index_docs, DocEntry
4
- from .code import index_directory as index_code, CodeEntry
3
+ from .docs import index_directory as index_docs, DocEntry, discover_docs, index_file as index_doc_file
4
+ from .code import index_directory as index_code, CodeEntry, discover_code_files, index_file as index_code_file
5
5
 
6
- __all__ = ["index_docs", "index_code", "DocEntry", "CodeEntry"]
6
+ __all__ = [
7
+ "index_docs", "index_code",
8
+ "DocEntry", "CodeEntry",
9
+ "discover_docs", "discover_code_files",
10
+ "index_doc_file", "index_code_file",
11
+ ]
src/mcp_server.py CHANGED
@@ -487,7 +487,7 @@ class RagtimeMCPServer:
487
487
  "protocolVersion": "2024-11-05",
488
488
  "serverInfo": {
489
489
  "name": "ragtime",
490
- "version": "0.2.5",
490
+ "version": "0.2.6",
491
491
  },
492
492
  "capabilities": {
493
493
  "tools": {},