atuinsh/atuin · error
You are not logged in
Error message
You are not logged in
What it means
`atuin account delete` checks `settings.logged_in().await?` before constructing an authenticated client. If this machine has no saved login session in the meta store, the command bails with this message because account deletion requires server authentication.
Source
Thrown at crates/atuin/src/command/client/account/delete.rs:21
use clap::Parser;
use eyre::{Result, bail};
use super::login::{or_user_input, read_user_password};
#[derive(Parser, Debug)]
pub struct Cmd {
#[clap(long, short)]
pub 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 password = self.password.clone().unwrap_or_else(read_user_password);
if password.is_empty() {
bail!("please provide your password");
}
let mut totp_code = self.totp_code.clone();
loop {
let response = client.delete_account(&password, totp_code.as_deref()).await?;
match response {
MutateResponse::Success => break,
MutateResponse::TwoFactorRequired => {View on GitHub (pinned to c0c717ab04)
Solutions
- Run `atuin login` with the account credentials, then retry `atuin account delete`
- Confirm ATUIN_CONFIG_DIR points at the directory containing your session
- Re-login to restore a session that was cleared or expired
- Delete the account via the web dashboard if local login is not possible
Example fix
// before (fails when not logged in) atuin account delete // after atuin login atuin account delete
Defensive patterns
Strategy: validation
Validate before calling
atuin status >/dev/null 2>&1 || { echo 'Not logged in: run `atuin login` first'; exit 1; } Try / catch
if ! atuin account delete ...; then echo "Not logged in or wrong config dir — run 'atuin login' first" >&2 fi
Prevention
- Log in before running destructive account commands
- Keep ATUIN_CONFIG_DIR consistent across automation
- Confirm the target account before deletion
- Guard scripts with a login-state check
When it happens
Trigger: Running `atuin account delete` on a machine where `atuin login` was never executed, after logging out, or in an environment with a different/empty ATUIN_CONFIG_DIR that has no session token stored.
Common situations: Fresh CI containers or Docker images where config was not carried over; switching users or config dirs; trying to delete an account from a second machine that was never logged in.
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/297aeb127f362f0f.
Report an issue: GitHub.