Skip to main content

get_stats

Function get_stats 

Source
pub fn get_stats(mana_dir: &Path) -> Result<StatsResult, Error>
Expand description

Get aggregate project statistics.

Returns counts by status, priority distribution, completion percentage, and cost/token metrics from unit history (if available).

§Errors

§Example

use mana_core::api::get_stats;
use std::path::Path;

let stats = get_stats(Path::new("/project/.mana")).unwrap();
println!("Completion: {:.1}%", stats.completion_pct);
println!("Total: {}, Open: {}, Closed: {}", stats.total, stats.open, stats.closed);