feat: restore index-* CLI commands and user automation scripts#269
feat: restore index-* CLI commands and user automation scripts#269tolgakaratas wants to merge 4 commits intoyichuan-w:mainfrom
Conversation
…ts documentation - Add index-browser (chrome/brave), index-email, index-calendar, index-wechat, index-imessage, index-slack, index-chatgpt, index-claude commands - Add add_embedding_args() helper function for all parsers - Restore readers.py with all data readers (ChromeHistoryReader, AppleMailReader, AppleCalendarReader, IMessageReader, WeChatReader, SlackReader, ChatGPTReader, ClaudeReader) - Add user-scripts.md documentation for daily automation workflows Fixes: Missing embedding arguments in index-* commands (PR yichuan-w#227 comment) Co-authored-by: tolgakaratas
- Add user-scripts.md (English version) for daily automation - Add user-scripts-tr.md (Turkish version) for Turkish users - Update ~/bin scripts with English comments and output
- Fix IMessageReader initialization (remove db_path argument) - Fix WeChatHistoryReader initialization and load_data parameters - Fix SlackMCPReader initialization and load_data parameters - Fix ChatGPTReader initialization and load_data parameters - Fix ClaudeReader initialization and load_data parameters These fixes ensure all index-* commands work correctly with the reader classes.
|
@tolgakaratas fix link error please |
|
@tolgakaratas Thanks for working on this, having 1. Duplicate readers instead of reusing existing onesThe new
These should be imported from their existing locations rather than duplicated — the originals are more complete and already tested. 2. Stub readers that do nothing
3. CLI handler duplicationEach async def _build_index_from_documents(self, args, index_name, documents):
"""Shared builder logic for all index-* commands."""
...4. Hardcoded
|
Addresses all review comments on PR #269: 1. No duplicate readers — imports directly from existing apps/ readers (ChromeHistoryReader, IMessageReader, EmlxReader, WeChatHistoryReader, ChatGPTReader, ClaudeReader) instead of duplicating 687 lines 2. Removed stub commands — dropped index-slack and index-twitter since SlackMCPReader and TwitterMCPReader return [] (async MCP readers need separate implementation) 3. Single shared helper — _build_index_from_documents() replaces 8x copy-pasted ~30-line handlers 4. Default is_recompute=True — preserves LEANN's 97% storage savings; users can opt out with --no-recompute 5. Clean docs — user-scripts.md has no missing script references and no Turkish translation 6. No CI link check failures — removed all broken references Commands added: leann index-browser [chrome|brave] leann index-email leann index-calendar leann index-imessage leann index-wechat --export-dir <path> leann index-chatgpt --export-path <path> leann index-claude --export-path <path> Made-with: Cursor
Addresses all review comments on PR #269: 1. No duplicate readers — imports directly from existing apps/ readers (ChromeHistoryReader, IMessageReader, EmlxReader, WeChatHistoryReader, ChatGPTReader, ClaudeReader) instead of duplicating 687 lines 2. Removed stub commands — dropped index-slack and index-twitter since SlackMCPReader and TwitterMCPReader return [] (async MCP readers need separate implementation) 3. Single shared helper — _build_index_from_documents() replaces 8x copy-pasted ~30-line handlers 4. Default is_recompute=True — preserves LEANN's 97% storage savings; users can opt out with --no-recompute 5. Clean docs — user-scripts.md has no missing script references and no Turkish translation 6. No CI link check failures — removed all broken references Commands added: leann index-browser [chrome|brave] leann index-email leann index-calendar leann index-imessage leann index-wechat --export-dir <path> leann index-chatgpt --export-path <path> leann index-claude --export-path <path>
Summary
Changes
CLI Commands Added
leann index-browser chrome- Chrome browser history indexingleann index-browser brave- Brave browser history indexing (our contribution)leann index-email- Apple Mail indexingleann index-calendar- Apple Calendar indexingleann index-wechat- WeChat chat historyleann index-imessage- iMessage historyleann index-slack- Slack workspace via MCPleann index-chatgpt- ChatGPT export indexingleann index-claude- Claude export indexingTechnical Fixes
add_embedding_args()helper function for all index-* parsersDocumentation
docs/user-scripts.mdwith installation and usage examples for daily automationTesting
Breaking Changes
Related Issues