atuinsh/atuin · error

unknown tag: {tag}

Error message

unknown tag: {tag}

What it means

`atuin store rebuild <tag>` dispatches to a type-specific rebuild routine matched against known record tags (e.g. "history", "scripts", KV, aliases, vars). If the supplied tag doesn't match any known handler, it bails with "unknown tag: {tag}". Rebuilds are intentionally explicit per data type, so arbitrary/misspelled tags are rejected.

Source

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

        // 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?;
            }

            "dotfiles" => {
                self.rebuild_dotfiles(settings, store.clone()).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 c0c717ab04)

Solutions

  1. Use an exact supported tag, e.g. `atuin store rebuild history` or `atuin store rebuild scripts`.
  2. Check `atuin store status` to see which record types/tags exist in your store.
  3. Consult `atuin store rebuild --help` for the current list of valid tags.

Example fix

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

Strategy: validation

Validate before calling

# shell
case "$tag" in
  history|scripts|kv|aliases|vars) atuin store rebuild "$tag" ;;
  *) echo "unsupported tag: $tag" >&2; exit 1 ;;
esac

Try / catch

if ! atuin store rebuild "$tag"; then
  atuin store status   # inspect valid record types
fi

Prevention

When it happens

Trigger: Running `atuin store rebuild <tag>` with a tag that is not one of the supported record types (misspelling like "histroy", or inventing a tag that has no rebuild path).

Common situations: Typos in the tag, following outdated docs for a renamed/removed data type, or attempting to rebuild a synced data type that has no rebuild implementation.

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@c0c717ab04 (2026-09-12). Data as JSON: /api/errors/5531f710a585938e. Report an issue: GitHub.