Skip to content

Installation

Let's get started! First up, you will want to install Atuin. The recommended approach is to use the installation script, which automatically handles the installation of Atuin including the requirements for your environment.

It will install a binary to ~/.atuin/bin, and if you'd rather do something else then the manual steps below offer much more flexibility.

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

Setup sync - Move on to the next step, or read on to manually install Atuin instead.

Manual installation

Installing the binary

If you don't wish to use the installer, the manual installation steps are as follows.

It's best to use rustup to get setup with a Rust toolchain, then you can run:

cargo install atuin
brew install atuin

Atuin is also available in MacPorts

sudo port install atuin

This repository is a flake, and can be installed using nix profile:

nix profile install "github:atuinsh/atuin"

Atuin is also available in nixpkgs:

nix-env -f '<nixpkgs>' -iA atuin

Atuin is available in the Arch Linux extra repository:

pacman -S atuin

Atuin is available in the Void Linux repository:

sudo xbps-install atuin

Atuin is available in the Termux package repository:

pkg install atuin

Atuin is installable from github-releases directly:

# line 1: `atuin` binary as command, from github release, only look at .tar.gz files, use the `atuin` file from the extracted archive
# line 2: setup at clone(create init.zsh, completion)
# line 3: pull behavior same as clone, source init.zsh
zinit ice as"command" from"gh-r" bpick"atuin-*.tar.gz" mv"atuin*/atuin -> atuin" \
    atclone"./atuin init zsh > init.zsh; ./atuin gen-completions --shell zsh > _atuin" \
    atpull"%atclone" src"init.zsh"
zinit light atuinsh/atuin

Atuin builds on the latest stable version of Rust, and we make no promises regarding older versions. We recommend using rustup.

git clone https://github.com/atuinsh/atuin.git
cd atuin/crates/atuin
cargo install --path .

Please be advised

If you choose to manually install Atuin rather than using the recommended installation script, merely installing the binary is not sufficient, you should also set up the shell plugin.


Installing the shell plugin

Once the binary is installed, the shell plugin requires installing. If you use the install script, this should all be done for you! After installing, remember to restart your shell.

echo 'eval "$(atuin init zsh)"' >> ~/.zshrc
# if you _only_ want to install the shell-plugin, do this; otherwise look above for a "everything via zinit" solution
zinit load atuinsh/atuin
antigen bundle atuinsh/atuin@main

Atuin works best in bash when using ble.sh >= 0.4.

With ble.sh (>= 0.4) installed and loaded in ~/.bashrc, just add atuin to your ~/.bashrc

echo 'eval "$(atuin init bash)"' >> ~/.bashrc

Bash-preexec can also be used, but you may experience some minor problems with the recorded duration and exit status of some commands.

Please note

bash-preexec currently has an issue where it will stop honoring ignorespace. While Atuin will ignore commands prefixed with whitespace, they may still end up in your bash history. Please check your configuration! All other shells do not have this issue.

To use Atuin in bash < 4 with bash-preexec, the option enter_accept needs to be turned on (which is so by default).

bash-preexec cannot properly invoke the preexec hook for subshell commands (...), function definitions func() { ...; }, empty for-in-statements for i in; do ...; done, etc., so those commands and duration may not be recorded in the Atuin's history correctly.

To use bash-preexec, download and initialize it

curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh
echo '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' >> ~/.bashrc

Then setup Atuin

echo 'eval "$(atuin init bash)"' >> ~/.bashrc

Add

atuin init fish | source

to your is-interactive block in your ~/.config/fish/config.fish file

Run in Nushell:

mkdir ~/.local/share/atuin/
atuin init nu | save ~/.local/share/atuin/init.nu

Add to config.nu:

source ~/.local/share/atuin/init.nu

Add

execx($(atuin init xonsh))
to the end of your ~/.xonshrc

Upgrade

Run atuin update, and if that command is not available, run the install script again.

If you used a package manager to install Atuin, then you should also use your package manager to update Atuin.

Uninstall

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