subx_cli/cli/
cache_args.rs

1//! Cache management command-line arguments and operations.
2//!
3//! This module defines the command-line interface for cache-related operations
4//! in SubX. The cache system stores intermediate results from AI analysis and
5//! other computationally expensive operations to improve performance and reduce
6//! API costs during development and testing.
7//!
8//! # Cache System Overview
9//!
10//! SubX maintains several types of caches:
11//! - **AI Analysis Cache**: Results from AI-powered file matching
12//! - **Audio Analysis Cache**: Speech pattern detection results
13//! - **Configuration Cache**: Processed configuration data
14//! - **Dry-run Cache**: Preview results that can be applied later
15//!
16//! # Cache Benefits
17//!
18//! - **Performance**: Avoid re-analyzing the same content
19//! - **Cost Savings**: Reduce AI API calls during testing
20//! - **Development**: Faster iteration during debugging
21//! - **Reliability**: Consistent results across multiple runs
22//!
23//! # Examples
24//!
25//! ```bash
26//! # Clear all cache data
27//! subx cache clear
28//!
29//! # View cache status (future enhancement)
30//! subx cache status
31//!
32//! # Selective cache clearing (future enhancement)
33//! subx cache clear --type ai
34//! ```
35
36use clap::{Args, Subcommand};
37
38/// Command-line arguments for cache management operations.
39#[derive(Args, Debug)]
40pub struct CacheArgs {
41    /// The cache management action to perform
42    #[command(subcommand)]
43    pub action: CacheAction,
44}
45
46/// Cache management operations and subcommands.
47#[derive(Subcommand, Debug)]
48pub enum CacheAction {
49    /// Clear all cached data including dry-run results and AI analysis
50    Clear,
51}