everruns-cli 0.18.1

Command-line interface for Everruns — run and manage agents from your terminal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// CLI logout command — remove stored credentials

use anyhow::Result;

use crate::auth::CredentialStore;

pub fn run(profile: &str) -> Result<()> {
    let mut store = CredentialStore::load().unwrap_or_default();

    if store.remove_profile(profile) {
        store.save()?;
        eprintln!("Logged out (profile: {})", profile);
    } else {
        eprintln!("Not logged in (profile: {})", profile);
    }

    Ok(())
}