use clap::Args; use eyre::Result; use crate::atuin_client::{ encryption::load_key, record::sqlite_store::SqliteStore, settings::Settings, }; #[derive(Args, Debug)] pub(crate) struct Verify {} impl Verify { pub(crate) async fn run(&self, settings: &Settings, store: SqliteStore) -> Result<()> { println!("Verifying local store can be decrypted with the current key"); let key = load_key(settings)?; match store.verify(&key.into()).await { Ok(()) => println!("Local store encryption verified OK"), Err(e) => println!("Failed to verify local store encryption: {e:?}"), } Ok(()) } }