atuinsh/atuin · error
You are not logged in
Error message
You are not logged in
What it means
atuin's `account change-password` command refuses to run when the local settings indicate the user has no saved login session. Before creating an authenticated client, `Cmd::run` calls `settings.logged_in().await?`; if no session token exists on this machine, it bails with this message instead of making a doomed API call. It is a pre-flight guard, not a server rejection.
Source
Thrown at crates/atuin/src/command/client/account/change_password.rs:23
use rpassword::prompt_password;
#[derive(Parser, Debug)]
pub struct Cmd {
#[clap(long, short)]
pub current_password: Option<String>,
#[clap(long, short)]
pub new_password: Option<String>,
/// The two-factor authentication code for your account, if any
#[clap(long, short)]
pub totp_code: Option<String>,
}
impl Cmd {
pub async fn run(&self, settings: &Settings) -> Result<()> {
if !settings.logged_in().await? {
bail!("You are not logged in");
}
let client = auth::auth_client(settings).await;
let current_password = self.current_password.clone().unwrap_or_else(|| {
prompt_password("Please enter the current password: ")
.expect("Failed to read from input")
});
if current_password.is_empty() {
bail!("please provide the current password");
}
let new_password = self.new_password.clone().unwrap_or_else(|| {
prompt_password("Please enter the new password: ").expect("Failed to read from input")
});
if new_password.is_empty() {View on GitHub (pinned to c0c717ab04)
Solutions
- Run `atuin login` with your username/password first, then retry the password change
- Verify you are using the intended config directory (check ATUIN_CONFIG_DIR) so the saved session is actually found
- If you believed you were logged in, re-login to refresh a stale/removed session token
- Use the web/dashboard to change the password if you cannot log in on this machine
Example fix
// before (fails when not logged in) atuin account change-password // after atuin login atuin account change-password
Defensive patterns
Strategy: validation
Validate before calling
# shell pre-check
atuin status >/dev/null 2>&1 || { echo 'Not logged in: run `atuin login` first'; exit 1; } Try / catch
if ! atuin account change-password ...; then echo "Not logged in — run 'atuin login' and retry" >&2 fi
Prevention
- Run `atuin login` as part of machine setup before any account commands
- Pin ATUIN_CONFIG_DIR explicitly so scripts always find the session
- Check login state with `atuin status` before scripted account operations
- Avoid logging out in shared automation environments
When it happens
Trigger: Running `atuin account change-password` (with or without --current-password/--new-password flags) on a machine where `atuin login` was never run, where the session was removed from the meta store, or where a fresh/blank ATUIN_CONFIG_DIR points at a meta store with no session token.
Common situations: CI containers that mount config but never logged in; switching ATUIN_CONFIG_DIR/ATUIN_SESSION so the session is invisible; running the command on a second machine synced only via a record store without a login; after logging out.
Related errors
- You are not logged in
- No CLI session found. Please log in first with 'atuin login'
- unexpected two-factor requirement during registration
- Failed to read from input
- authentication canceled
AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12).
Data as JSON: /api/errors/939f9c4525b8a19b.
Report an issue: GitHub.