1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//! # `claude_storage` - CLI Tool for Claude Code Storage
//!
//! Command-line interface for exploring and analyzing Claude Code's filesystem-based storage.
//!
//! ## Overview
//!
//! This crate provides a CLI tool for querying Claude Code's conversation storage at `~/.claude/`.
//! It wraps the `claude_storage_core` library with an interactive REPL and one-shot command interface.
//!
//! **Extraction context**: This is the CLI-focused crate after extracting core library functionality
//! to `claude_storage_core` (2025-11-29). All storage access logic now lives in the core library;
//! this crate provides the command-line interface.
//!
//! ## Usage
//!
//! ### REPL mode (interactive):
//! ```bash
//! cargo run --features cli
//! > .status
//! > .list target::projects
//! > exit
//! ```
//!
//! ### One-shot mode (scripting):
//! ```bash
//! cargo run --features cli -- .status
//! cargo run --features cli -- .count target::projects
//! ```
//!
//! ## CLI Commands
//!
//! - `.status` - Show storage statistics (projects, sessions, entries, tokens)
//! - `.list` - List projects or sessions with optional filtering
//! - `.show` - Display details about a specific session
//! - `.count` - Fast counting of entries, sessions, or projects
//!
//! ## Library API
//!
//! For programmatic access to Claude Code storage, use the `claude_storage_core` crate directly:
//!
//! ```rust,no_run
//! use claude_storage_core::{ Storage, ProjectId };
//!
//! fn main() -> claude_storage_core::Result< () >
//! {
//! let storage = Storage::new()?;
//! for project in storage.list_projects()?
//! {
//! println!( "Project: {:?}", project.id() );
//! }
//! Ok( () )
//! }
//! ```
// Re-export core library types for convenience
pub use
;
/// Absolute path to this crate's command definitions YAML.
///
/// Use in `build.rs` for compile-time aggregation or at runtime for dynamic registration.
pub const COMMANDS_YAML : &str = concat!;
pub use parse_project_parameter;
/// Register `claude_storage` commands into an existing registry.
///
/// Commands are defined in [`COMMANDS_YAML`] for compile-time aggregation
/// (used by `assistant/build.rs`). This function is provided for API consistency with
/// other Layer 2 crates; the body is intentionally empty because runtime registration of
/// `claude_storage` commands is handled by the build-time YAML aggregation path in `assistant`.