Crate terraphim_session_analyzer

Crate terraphim_session_analyzer 

Source
Expand description

Claude Log Analyzer

A high-performance Rust tool for analyzing Claude Code session logs to identify which AI agents were used to build specific documents.

§Features

  • Parse JSONL session logs from $HOME/.claude/projects/
  • Identify Task tool invocations with agent types
  • Track file operations and attribute them to agents
  • Generate rich terminal output with colored tables
  • Export to JSON, CSV, and Markdown formats
  • Timeline visualization and collaboration pattern detection
  • Real-time session monitoring

§Example Usage

use terraphim_session_analyzer::{Analyzer, Reporter};

// Analyze sessions from default location
let analyzer = Analyzer::from_default_location()?;
let analyses = analyzer.analyze(None)?;

// Generate terminal report
let reporter = Reporter::new();
reporter.print_terminal(&analyses);

// Export to JSON
let json = reporter.to_json(&analyses)?;
println!("{}", json);

Re-exports§

pub use analyzer::Analyzer;
pub use analyzer::SummaryStats;
pub use models::get_agent_category;
pub use models::normalize_agent_name;
pub use models::AgentAttribution;
pub use models::AgentInvocation;
pub use models::AgentStatistics;
pub use models::AgentToolCorrelation;
pub use models::AnalyzerConfig;
pub use models::CollaborationPattern;
pub use models::FileOperation;
pub use models::SessionAnalysis;
pub use models::ToolAnalysis;
pub use models::ToolCategory;
pub use models::ToolChain;
pub use models::ToolInvocation;
pub use models::ToolStatistics;
pub use parser::SessionParser;
pub use parser::TimelineEvent;
pub use parser::TimelineEventType;
pub use patterns::create_matcher;
pub use patterns::load_patterns;
pub use patterns::AhoCorasickMatcher;
pub use patterns::PatternMatcher;
pub use patterns::ToolMatch;
pub use patterns::ToolMetadata;
pub use patterns::ToolPattern;
pub use reporter::Reporter;

Modules§

analyzer
connectors
Session Connectors for multi-agent support
models
parser
patterns
Pattern matching infrastructure for identifying tools in Bash commands
reporter
tool_analyzer
Tool analysis and command parsing logic
utils
Utility functions for common operations

Constants§

COMMON_AGENT_TYPES
Common agent types used in Claude Code
DEFAULT_SESSION_DIR
Default Claude session directory relative to home
VERSION
Version information