Skip to content
Atuin

Installation

Simply run the installation script and that will walk you through installing Atuin:

Terminal window
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh

After installing, the script runs atuin setup. Setup hooks Atuin into your shells, imports your shell history, and offers to set up a sync account.

This will install a binary to ~/.atuin/bin.

Run atuin update, and if that command isn’t available, run the install script again.

Older versions of Atuin stored data in ~/.config/atuin (or $XDG_CONFIG_HOME/atuin) and ~/.local/share/atuin (or $XDG_DATA_HOME/atuin). While ATUIN_HOME is unset, Atuin still looks for data in the old locations when it doesn’t find it in ~/.atuin, so an older install keeps working as it is.

To move to the new layout, run these commands in Bash, Zsh or fish. Adjust the paths if you set XDG_CONFIG_HOME or XDG_DATA_HOME.

Stop the daemon, and turn autostart off for now:

Terminal window
atuin config set daemon.autostart false
atuin daemon stop

Make sure ~/.atuin exists:

Terminal window
mkdir -p ~/.atuin

Check whether you have any AI-related files in ~/.atuin:

Terminal window
ls ~/.atuin | grep -Fxe permissions.ai.toml -e skills

If you do, follow this section first:

Migrating home-scoped AI config

In older installs, permissions.ai.toml and skills in ~/.atuin apply to your home directory. In newer installs, they apply globally. Whether ~/.atuin/config.toml exists decides which: if it does, these items are global.

Before you move your config.toml to ~/.atuin, review the AI files already in ~/.atuin, especially permissions.ai.toml. Leave anything you’re fine with applying globally, which is close to applying to your whole home directory anyway. Delete anything else, or move it into ~/subdir/.atuin/ for each subdirectory it should apply to.

Then check whether any AI items appear in both ~/.atuin and ~/.config/atuin:

Terminal window
ls ~/.atuin ~/.config/atuin | grep -Fxe permissions.ai.toml -e skills | \
sort | uniq -d

Those in ~/.atuin shadow those in ~/.config/atuin. Merge any you still want into ~/.atuin.

Move your config:

Terminal window
cd ~/.config/atuin && mv -n $(ls | grep -Fxe config.toml -e server.toml \
-e themes -e skills -e permissions.ai.toml) ~/.atuin/

Move your data:

Terminal window
[ -e ~/.atuin/data ] && echo 'error: destination exists' || \
mv -n ~/.local/share/atuin ~/.atuin/data

Turn daemon autostart back on, if you had it on before:

Terminal window
atuin config set daemon.autostart true

If you’d like to uninstall Atuin, please check out the uninstall page.

TODO avoid this section

We do not recommend using alternative installation methods, but we try our best to support them:

Atuin requires a recent Rust toolchain. Distribution package managers often ship an older Rust, so it’s best to use rustup to set up an up-to-date toolchain, then you can run:

Terminal window
cargo install atuin --locked

Once the binary is installed, the shell plugin needs installing. For zsh, bash, fish, and PowerShell, atuin setup installs it for you, and the install script runs atuin setup. After installing, remember to restart your shell.

To hook only some shells and change nothing else, pass --only and name the shells with --shells. For example, this command hooks zsh and fish:

Terminal window
atuin setup --only --shell-history --shells zsh,fish

Run setup, which adds eval "$(atuin init zsh)" to $ZDOTDIR/.zshrc, or to ~/.zshrc when ZDOTDIR isn’t set:

Terminal window
atuin setup --only --shell-history --shells zsh

If you use a plugin manager, load Atuin with it instead.

Terminal window
# if you _only_ want to install the shell-plugin, do this; otherwise look above for a "everything via zinit" solution
zinit load atuinsh/atuin