use std::path::PathBuf;
fn main() {
let home = PathBuf::from(std::env::var("HOME").expect("HOME"));
let now: f64 = std::env::var("CONTEXTBAR_NOW")
.ok()
.and_then(|s| s.parse().ok())
.unwrap_or_else(|| {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_secs_f64()
});
let (table, _src) = context_bar_core::pricing::load_pricing();
let claude = context_bar_core::collect::collect_claude(&home, now, &table);
let codex = context_bar_core::collect::collect_codex(&home, now, &table);
let others = context_bar_core::others::collect_others(&home, now);
let out = serde_json::json!({ "claude": claude, "codex": codex, "others": others });
println!("{}", serde_json::to_string(&out).unwrap());
}