atuinsh/atuin · error

unknown tag

Error message

unknown tag: {tag}

What it means

`atuin store rebuild <tag>` only knows how to rebuild a fixed set of record tags (history, kv, scripts, etc.). Any other tag passed on the CLI hits the catch-all match arm and bails with 'unknown tag'.

Solutions

  1. Run `atuin store rebuild` with no tag (or `atuin store status`) to see valid tags
  2. Fix the tag spelling against the match arms in the source
  3. Upgrade/downgrade atuin so the binary supports the record tag you need

Example fix

// before
atuin store rebuild histroy
// after
atuin store rebuild history
Defensive patterns

Strategy: validation

Validate before calling

let valid = ["history", "kv", "scripts", "aliases", "dotfiles", "config"];
if !valid.contains(&tag.as_str()) {
    eprintln!("unsupported tag: {tag}");
    return Ok(());
}

Prevention

When it happens

Trigger: `atuin store rebuild <tag>` with a tag string not in the handler's match list, e.g. a typo like 'histroy' or a tag from a newer/older atuin version.

Common situations: Misspelled tag names, following docs for a different atuin version whose tag set differs, or attempting to rebuild a record type the binary was not built with.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/5531f710a585938e. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin/src/command/client/store/rebuild.rs:39

        settings: &Settings,
        store: SqliteStore,
        database: &Sqlite,
    ) -> Result<()> {
        // keep it as a string and not an enum atm
        // would be super cool to build this dynamically in the future
        // eg register handles for rebuilding various tags without having to make this part of the
        // binary big
        match self.tag.as_str() {
            "history" => {
                self.rebuild_history(settings, store.clone(), database).await?;
            }

            "scripts" => {
                self.rebuild_scripts(settings, store.clone()).await?;
            }

            tag => {
                bail!("unknown tag: {tag}");
            }
        }

        Ok(())
    }

    /// The daemon owns the rebuild when enabled; otherwise we rebuild locally.
    async fn rebuild_history(
        &self,
        settings: &Settings,
        store: SqliteStore,
        database: &Sqlite,
    ) -> Result<()> {
        #[cfg(feature = "daemon")]
        if settings.daemon.enabled {
            daemon::rebuild_history(settings).await?;
            return Ok(());
        }

View on GitHub (pinned to 900007c480)