vios_app 0.1.1

Small JSON vaults: Argon2id + AES-GCM, with optional AAD binding.
Documentation
use anyhow::Result;
use chrono::Utc;
use clap::Parser;
use vios_core::vault::types::{VaultV2, ToneDriftEntry};

#[derive(Parser, Debug)]
struct Args {
    #[arg(long)] file: String,
    #[arg(long)] tone: String,
    #[arg(long)] reem: String,
    #[arg(long)] note: Option<String>,
}

fn main() -> Result<()> {
    let a = Args::parse();
    let mut v: VaultV2 = serde_json::from_slice(&std::fs::read(&a.file)?)?;
    v.drift_log.push(ToneDriftEntry { at: Utc::now(), tone: a.tone, reem: a.reem, note: a.note });
    v.modified_at = Utc::now();
    std::fs::write(&a.file, serde_json::to_vec_pretty(&v)?)?;
    println!("Drift appended.");
    Ok(())
}