Skip to main content

Module state

Module state 

Source
Expand description

In-memory CLI state for a single invocation, plus the on-disk locations it’s seeded from.

Re-exportsΒ§

use std::path::PathBuf; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::LazyLock; πŸ”’
use haste_server::auth_n::oidc::routes::discovery::WellKnownDiscoveryDocument; πŸ”’
use tokio::sync::Mutex; πŸ”’
use crate::cli::config::CliConfiguration; πŸ”’
use crate::cli::secrets::CliSecrets; πŸ”’

StructsΒ§

CliState πŸ”’

StaticsΒ§

CLI_STATE πŸ”’
Lazily loads CONFIG_LOCATION/SECRETS_LOCATION from disk on first access.
CONFIG_DIR πŸ”’
Directory holding the CLI’s config and secrets files (~/.haste_health).
CONFIG_LOCATION πŸ”’
Non-secret profile config (server URLs, auth mode). Safe to inspect or back up.
SECRETS_LOCATION πŸ”’
Client secrets and cached OAuth tokens, kept out of CONFIG_LOCATION so they never show up via profile show or similar.