UNPKG

claude-conversation-manager

Version:

A CLI tool for managing Claude Code conversation history with parsing and i18n support

82 lines (81 loc) 2.44 kB
import { ConversationFile, ConversationMetadata, ManagerConfig, SearchOptions, BackupInfo } from './types'; export declare class ConversationManager { private config; constructor(customConfig?: Partial<ManagerConfig>); /** * Initialize manager and ensure directories exist */ initialize(): Promise<void>; /** * List all conversations with metadata */ listConversations(): Promise<ConversationMetadata[]>; /** * List conversations with grouping by project and summary * This helps identify multiple files that belong to the same conversation */ listConversationsGrouped(): Promise<{ [key: string]: ConversationMetadata[]; }>; /** * Search conversations by criteria */ searchConversations(options: SearchOptions): Promise<ConversationMetadata[]>; /** * Get conversation details by ID */ getConversation(conversationId: string): Promise<ConversationFile | null>; /** * Delete a conversation by ID */ deleteConversation(conversationId: string, createBackup?: boolean): Promise<boolean>; /** * Delete multiple conversations */ deleteConversations(conversationIds: string[], createBackup?: boolean): Promise<{ deleted: string[]; failed: string[]; }>; /** * Delete all conversations for a project */ deleteProjectConversations(projectPath: string, createBackup?: boolean): Promise<number>; /** * Repair corrupted conversations */ repairCorruptedConversations(): Promise<{ repaired: string[]; failed: string[]; }>; /** * Find conversation file path by ID */ private findConversationFile; /** * Create backup of specific conversation */ private backupConversation; /** * Create full backup of all conversations */ createBackup(): Promise<BackupInfo>; /** * List available backups */ listBackups(): Promise<BackupInfo[]>; /** * Clean up old backups beyond the configured limit */ private cleanupOldBackups; /** * Get storage statistics */ getStorageStats(): Promise<{ totalConversations: number; totalSize: number; projectCount: number; corruptedCount: number; largestConversation: ConversationMetadata | null; oldestConversation: ConversationMetadata | null; }>; }