firecloud-cli 0.2.0

Command-line interface for FireCloud P2P messaging and file sharing
//! Info command - Show node information

use anyhow::Result;
use std::path::PathBuf;
use tracing::info;

pub async fn run(data_dir: PathBuf) -> Result<()> {
    info!("FireCloud Node Information");
    info!("===========================");
    info!("Data directory: {}", data_dir.display());

    // Check chunk store
    let store_path = data_dir.join("chunks");
    if store_path.exists() {
        let store = firecloud_storage::ChunkStore::open(&store_path)?;
        let count = store.count()?;
        info!("Stored chunks: {}", count);
    } else {
        info!("Stored chunks: 0 (store not initialized)");
    }

    // TODO: Show more info
    // - Node identity (peer ID)
    // - Listening addresses
    // - Known peers
    // - Storage usage

    Ok(())
}