claude-dashboard 0.2.2

A terminal TUI dashboard that renders Claude Code usage reports with token stats, project breakdowns, and language distribution.
Documentation
1
2
3
4
5
6
7
8
9
10
use std::fs;
use std::path::Path;
use crate::data::models::StatsCache;

pub fn parse_stats_cache(path: &Path) -> Result<StatsCache, String> {
    let content = fs::read_to_string(path)
        .map_err(|e| format!("Failed to read stats-cache.json: {}", e))?;
    serde_json::from_str(&content)
        .map_err(|e| format!("Failed to parse stats-cache.json: {}", e))
}