···11+MIT License
22+33+Copyright (c) 2025 Kristófer Reykjalín
44+55+Permission is hereby granted, free of charge, to any person obtaining a copy
66+of this software and associated documentation files (the "Software"), to deal
77+in the Software without restriction, including without limitation the rights
88+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99+copies of the Software, and to permit persons to whom the Software is
1010+furnished to do so, subject to the following conditions:
1111+1212+The above copyright notice and this permission notice shall be included in all
1313+copies or substantial portions of the Software.
1414+1515+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121+SOFTWARE.
+272
atuin/config.toml
···11+## where to store your database, default is your system data directory
22+## linux/mac: ~/.local/share/atuin/history.db
33+## windows: %USERPROFILE%/.local/share/atuin/history.db
44+# db_path = "~/.history.db"
55+66+## where to store your encryption key, default is your system data directory
77+## linux/mac: ~/.local/share/atuin/key
88+## windows: %USERPROFILE%/.local/share/atuin/key
99+# key_path = "~/.key"
1010+1111+## where to store your auth session token, default is your system data directory
1212+## linux/mac: ~/.local/share/atuin/session
1313+## windows: %USERPROFILE%/.local/share/atuin/session
1414+# session_path = "~/.session"
1515+1616+## date format used, either "us" or "uk"
1717+# dialect = "us"
1818+1919+## default timezone to use when displaying time
2020+## either "l", "local" to use the system's current local timezone, or an offset
2121+## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]"
2222+## for example: "+9", "-05", "+03:30", "-01:23:45", etc.
2323+# timezone = "local"
2424+2525+## enable or disable automatic sync
2626+# auto_sync = true
2727+2828+## enable or disable automatic update checks
2929+# update_check = true
3030+3131+## address of the sync server
3232+# sync_address = "https://api.atuin.sh"
3333+3434+## how often to sync history. note that this is only triggered when a command
3535+## is ran, so sync intervals may well be longer
3636+## set it to 0 to sync after every command
3737+# sync_frequency = "10m"
3838+3939+## which search mode to use
4040+## possible values: prefix, fulltext, fuzzy, skim
4141+# search_mode = "fuzzy"
4242+4343+## which filter mode to use by default
4444+## possible values: "global", "host", "session", "directory", "workspace"
4545+## consider using search.filters to customize the enablement and order of filter modes
4646+# filter_mode = "global"
4747+4848+## With workspace filtering enabled, Atuin will filter for commands executed
4949+## in any directory within a git repository tree (default: false).
5050+##
5151+## To use workspace mode by default when available, set this to true and
5252+## set filter_mode to "workspace" or leave it unspecified and
5353+## set search.filters to include "workspace" before other filter modes.
5454+# workspaces = false
5555+5656+## which filter mode to use when atuin is invoked from a shell up-key binding
5757+## the accepted values are identical to those of "filter_mode"
5858+## leave unspecified to use same mode set in "filter_mode"
5959+# filter_mode_shell_up_key_binding = "global"
6060+6161+## which search mode to use when atuin is invoked from a shell up-key binding
6262+## the accepted values are identical to those of "search_mode"
6363+## leave unspecified to use same mode set in "search_mode"
6464+# search_mode_shell_up_key_binding = "fuzzy"
6565+6666+## which style to use
6767+## possible values: auto, full, compact
6868+# style = "auto"
6969+7070+## the maximum number of lines the interface should take up
7171+## set it to 0 to always go full screen
7272+# inline_height = 0
7373+7474+## Invert the UI - put the search bar at the top , Default to `false`
7575+# invert = false
7676+7777+## enable or disable showing a preview of the selected command
7878+## useful when the command is longer than the terminal width and is cut off
7979+# show_preview = true
8080+8181+## what to do when the escape key is pressed when searching
8282+## possible values: return-original, return-query
8383+# exit_mode = "return-original"
8484+8585+## possible values: emacs, subl
8686+# word_jump_mode = "emacs"
8787+8888+## characters that count as a part of a word
8989+# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
9090+9191+## number of context lines to show when scrolling by pages
9292+# scroll_context_lines = 1
9393+9494+## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts
9595+## alt-0 .. alt-9
9696+# ctrl_n_shortcuts = false
9797+9898+## default history list format - can also be specified with the --format arg
9999+# history_format = "{time}\t{command}\t{duration}"
100100+101101+## prevent commands matching any of these regexes from being written to history.
102102+## Note that these regular expressions are unanchored, i.e. if they don't start
103103+## with ^ or end with $, they'll match anywhere in the command.
104104+## For details on the supported regular expression syntax, see
105105+## https://docs.rs/regex/latest/regex/#syntax
106106+# history_filter = [
107107+# "^secret-cmd",
108108+# "^innocuous-cmd .*--secret=.+",
109109+# ]
110110+111111+## prevent commands run with cwd matching any of these regexes from being written
112112+## to history. Note that these regular expressions are unanchored, i.e. if they don't
113113+## start with ^ or end with $, they'll match anywhere in CWD.
114114+## For details on the supported regular expression syntax, see
115115+## https://docs.rs/regex/latest/regex/#syntax
116116+# cwd_filter = [
117117+# "^/very/secret/area",
118118+# ]
119119+120120+## Configure the maximum height of the preview to show.
121121+## Useful when you have long scripts in your history that you want to distinguish
122122+## by more than the first few lines.
123123+# max_preview_height = 4
124124+125125+## Configure whether or not to show the help row, which includes the current Atuin
126126+## version (and whether an update is available), a keymap hint, and the total
127127+## amount of commands in your history.
128128+# show_help = true
129129+130130+## Configure whether or not to show tabs for search and inspect
131131+# show_tabs = true
132132+133133+## Configure whether or not the tabs row may be auto-hidden, which includes the current Atuin
134134+## tab, such as Search or Inspector, and other tabs you may wish to see. This will
135135+## only be hidden if there are fewer than this count of lines available, and does not affect the use
136136+## of keyboard shortcuts to switch tab. 0 to never auto-hide, default is 8 (lines).
137137+## This is ignored except in `compact` mode.
138138+# auto_hide_height = 8
139139+140140+## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include
141141+## 1. AWS key id
142142+## 2. Github pat (old and new)
143143+## 3. Slack oauth tokens (bot, user)
144144+## 4. Slack webhooks
145145+## 5. Stripe live/test keys
146146+# secrets_filter = true
147147+148148+## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit.
149149+# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise.
150150+enter_accept = true
151151+152152+## Defaults to "emacs". This specifies the keymap on the startup of `atuin
153153+## search`. If this is set to "auto", the startup keymap mode in the Atuin
154154+## search is automatically selected based on the shell's keymap where the
155155+## keybinding is defined. If this is set to "emacs", "vim-insert", or
156156+## "vim-normal", the startup keymap mode in the Atuin search is forced to be
157157+## the specified one.
158158+# keymap_mode = "auto"
159159+160160+## Cursor style in each keymap mode. If specified, the cursor style is changed
161161+## in entering the cursor shape. Available values are "default" and
162162+## "{blink,steady}-{block,underline,bar}".
163163+# keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" }
164164+165165+# network_connect_timeout = 5
166166+# network_timeout = 5
167167+168168+## Timeout (in seconds) for acquiring a local database connection (sqlite)
169169+# local_timeout = 5
170170+171171+## Set this to true and Atuin will minimize motion in the UI - timers will not update live, etc.
172172+## Alternatively, set env NO_MOTION=true
173173+# prefers_reduced_motion = false
174174+175175+[stats]
176176+## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl
177177+# common_subcommands = [
178178+# "apt",
179179+# "cargo",
180180+# "composer",
181181+# "dnf",
182182+# "docker",
183183+# "git",
184184+# "go",
185185+# "ip",
186186+# "jj",
187187+# "kubectl",
188188+# "nix",
189189+# "nmcli",
190190+# "npm",
191191+# "pecl",
192192+# "pnpm",
193193+# "podman",
194194+# "port",
195195+# "systemctl",
196196+# "tmux",
197197+# "yarn",
198198+# ]
199199+200200+## Set commands that should be totally stripped and ignored from stats
201201+# common_prefix = ["sudo"]
202202+203203+## Set commands that will be completely ignored from stats
204204+# ignored_commands = [
205205+# "cd",
206206+# "ls",
207207+# "vi"
208208+# ]
209209+210210+[keys]
211211+# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry.
212212+# scroll_exits = true
213213+# Defaults to true. The left arrow key will exit the TUI when scrolling before the first character
214214+# exit_past_line_start = true
215215+# Defaults to true. The right arrow key performs the same functionality as Tab and copies the selected line to the command line to be modified.
216216+# accept_past_line_end = true
217217+218218+[sync]
219219+# Enable sync v2 by default
220220+# This ensures that sync v2 is enabled for new installs only
221221+# In a later release it will become the default across the board
222222+records = true
223223+224224+[preview]
225225+## which preview strategy to use to calculate the preview height (respects max_preview_height).
226226+## possible values: auto, static
227227+## auto: length of the selected command.
228228+## static: length of the longest command stored in the history.
229229+## fixed: use max_preview_height as fixed height.
230230+# strategy = "auto"
231231+232232+[daemon]
233233+## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon`
234234+# enabled = false
235235+236236+## How often the daemon should sync in seconds
237237+# sync_frequency = 300
238238+239239+## The path to the unix socket used by the daemon (on unix systems)
240240+## linux/mac: ~/.local/share/atuin/atuin.sock
241241+## windows: Not Supported
242242+# socket_path = "~/.local/share/atuin/atuin.sock"
243243+244244+## Use systemd socket activation rather than opening the given path (the path must still be correct for the client)
245245+## linux: false
246246+## mac/windows: Not Supported
247247+# systemd_socket = false
248248+249249+## The port that should be used for TCP on non unix systems
250250+# tcp_port = 8889
251251+252252+# [theme]
253253+## Color theme to use for rendering in the terminal.
254254+## There are some built-in themes, including the base theme ("default"),
255255+## "autumn" and "marine". You can add your own themes to the "./themes" subdirectory of your
256256+## Atuin config (or ATUIN_THEME_DIR, if provided) as TOML files whose keys should be one or
257257+## more of AlertInfo, AlertWarn, AlertError, Annotation, Base, Guidance, Important, and
258258+## the string values as lowercase entries from this list:
259259+## https://ogeon.github.io/docs/palette/master/palette/named/index.html
260260+## If you provide a custom theme file, it should be called "NAME.toml" and the theme below
261261+## should be the stem, i.e. `theme = "NAME"` for your chosen NAME.
262262+# name = "autumn"
263263+264264+## Whether the theme manager should output normal or extra information to help fix themes.
265265+## Boolean, true or false. If unset, left up to the theme manager.
266266+# debug = true
267267+268268+[search]
269269+## The list of enabled filter modes, in order of priority.
270270+## The "workspace" mode is skipped when not in a workspace or workspaces = false.
271271+## Default filter mode can be overridden with the filter_mode setting.
272272+# filters = [ "global", "host", "session", "workspace", "directory" ]
···11+# Git.
22+abbr --add ga git add
33+abbr --add gap git add --patch
44+abbr --add gp git push
55+abbr --add gpf git push --force
66+abbr --add gpl git pull
77+abbr --add gplr git pull --rebase
88+abbr --add gs git status
99+if type --query difft
1010+ abbr --add gd git -c diff.external=difft diff
1111+else
1212+ abbr --add gd git diff
1313+end
1414+1515+function remote_and_branch
1616+ set branch (git rev-parse --abbrev-ref HEAD)
1717+ echo (git config --get branch.$branch.remote) $branch
1818+end
1919+2020+abbr --command git cb --function remote_and_branch
2121+2222+# Zig build.
2323+abbr --add zb zig build
2424+abbr --add zbw zig build --watch
2525+abbr --add zbr zig build run
2626+abbr --add zbf zig build -Doptimize=ReleaseFast
2727+abbr --add zbfl zig build -Doptimize=ReleaseFast --prefix ~/.local
2828+abbr --add zbs zig build -Doptimize=ReleaseSafe
2929+abbr --add zbsl zig build -Doptimize=ReleaseSafe --prefix ~/.local
3030+abbr --add zt zig test
3131+abbr --add zbt zig build test --summary all
3232+3333+if type --query eza
3434+ abbr --add ls eza --icons
3535+ abbr --add ll eza --icons -lh
3636+ abbr --add la eza --icons -lha
3737+end
3838+3939+if type --query bat
4040+ abbr --add cat bat
4141+else if type --query zat
4242+ abbr --add cat zat
4343+end
+4
fish/conf.d/atuin.fish
···11+if type --query atuin; and status is-interactive
22+ # Commands to run in interactive sessions can go here
33+ atuin init fish | source
44+end
+14
fish/conf.d/brew.fish
···11+if type --query /opt/homebrew/bin/brew
22+ set -gx HOMEBREW_PREFIX /opt/homebrew
33+ set -gx HOMEBREW_CELLAR /opt/homebrew/Cellar
44+ set -gx HOMEBREW_REPOSITORY /opt/homebrew
55+66+ fish_add_path /opt/homebrew/bin
77+ fish_add_path /opt/homebrew/sbin
88+99+ set -q MANPATH; or set MANPATH ''
1010+ set -gx MANPATH /opt/homebrew/share/man $MANPATH
1111+1212+ set -q INFOPATH; or set INFOPATH ''
1313+ set -gx INFOPATH /opt/homebrew/share/info $INFOPATH
1414+end
···11+if type --query fzf
22+ fzf --fish | source
33+end
+29
fish/conf.d/set-editor.fish
···11+if type --query hx
22+ set -gx EDITOR hx
33+ return
44+end
55+66+if type --query nvim
77+ set -gx EDITOR nvim
88+ return
99+end
1010+1111+if type --query vim
1212+ set -gx EDITOR vim
1313+ return
1414+end
1515+1616+if type --query vi
1717+ set -gx EDITOR vi
1818+ return
1919+end
2020+2121+if type --query pico
2222+ set -gx EDITOR pico
2323+ return
2424+end
2525+2626+if type --query nano
2727+ set -gx EDITOR nano
2828+ return
2929+end
···11+function e --description 'opens a fuzzy file selector to open your editor if available'
22+ set fuzzer ''
33+ if type --query zf
44+ set fuzzer zf
55+ else if type --query fzf
66+ set fuzzer fzf
77+ end
88+99+ # If a fuzzer isn't available we don't try it and just run the editor.
1010+ if not test -n "$fuzzer"
1111+ $EDITOR $argv
1212+ return
1313+ end
1414+1515+ # We use `fd` if available.
1616+ set find find . -type f
1717+ if type --query fd
1818+ set find fd --type f
1919+ end
2020+2121+ if count $argv >/dev/null
2222+ # If a directory is provided, we move there first.
2323+ # Otherwise: open the provided file in the editor.
2424+ if test -d $argv
2525+ cd $argv
2626+ set file ($find | $fuzzer)
2727+ if test -z $file
2828+ return 1
2929+ end
3030+3131+ $EDITOR $file
3232+ else
3333+ $EDITOR $argv
3434+ end
3535+ else
3636+ # If nothing is provided, open a picker for files in the current directory.
3737+ set file ($find | $fuzzer)
3838+ if test -z $file
3939+ return 1
4040+ end
4141+4242+ $EDITOR $file
4343+ end
4444+end
+57
fish/functions/fish_prompt.fish
···11+function fish_prompt
22+ set -l last_status $status
33+44+ set -l normal (set_color normal)
55+ set -l usercolor (set_color $fish_color_user)
66+77+ # set -l delim \U25BA
88+ # If we don't have unicode use a simpler delimiter
99+ # string match -qi "*.utf-8" -- $LANG $LC_CTYPE $LC_ALL; or set delim ">"
1010+1111+ set -l delim "> "
1212+1313+ fish_is_root_user; and set delim "# "
1414+1515+ set -l cwd (set_color $fish_color_cwd)
1616+ if command -sq cksum
1717+ # randomized cwd color
1818+ # We hash the physical PWD and turn that into a color. That means directories (usually) get different colors,
1919+ # but every directory always gets the same color. It's deterministic.
2020+ # We use cksum because 1. it's fast, 2. it's in POSIX, so it should be available everywhere.
2121+ set -l shas (pwd -P | cksum | string split -f1 ' ' | math --base=hex | string sub -s 3 | string pad -c 0 -w 6 | string match -ra ..)
2222+ set -l col 0x$shas[1..3]
2323+2424+ # If the (simplified idea of) luminance is below 120 (out of 255), add some more.
2525+ # (this runs at most twice because we add 60)
2626+ while test (math 0.2126 x $col[1] + 0.7152 x $col[2] + 0.0722 x $col[3]) -lt 120
2727+ set col[1] (math --base=hex "min(255, $col[1] + 60)")
2828+ set col[2] (math --base=hex "min(255, $col[2] + 60)")
2929+ set col[3] (math --base=hex "min(255, $col[3] + 60)")
3030+ end
3131+ set -l col (string replace 0x '' $col | string pad -c 0 -w 2 | string join "")
3232+3333+ set cwd (set_color $col)
3434+ end
3535+3636+ # Prompt status only if it's not 0
3737+ set -l prompt_status
3838+ test $last_status -ne 0; and set prompt_status (set_color $fish_color_status)"[$last_status]$normal"
3939+4040+ # Only show host if in SSH or container
4141+ # Store this in a global variable because it's slow and unchanging
4242+ if not set -q prompt_host
4343+ set -g prompt_host ""
4444+ if set -q SSH_TTY
4545+ or begin
4646+ command -sq systemd-detect-virt
4747+ and systemd-detect-virt -q
4848+ end
4949+ set prompt_host $usercolor$USER$normal@(set_color $fish_color_host)$hostname$normal":"
5050+ end
5151+ end
5252+5353+ # Shorten pwd if prompt is too long
5454+ set -l pwd (prompt_pwd)
5555+5656+ echo -n -s $prompt_host $cwd $pwd $normal $prompt_status $delim
5757+end
+32
fish/functions/fish_right_prompt.fish
···11+function fish_right_prompt
22+ set -g __fish_git_prompt_showdirtystate 1
33+ set -g __fish_git_prompt_showuntrackedfiles 1
44+ set -g __fish_git_prompt_showupstream informative
55+ set -g __fish_git_prompt_showcolorhints 1
66+ set -g __fish_git_prompt_use_informative_chars 1
77+ # Unfortunately this only works if we have a sensible locale
88+ string match -qi "*.utf-8" -- $LANG $LC_CTYPE $LC_ALL
99+ and set -g __fish_git_prompt_char_dirtystate \U1F4a9
1010+ set -g __fish_git_prompt_char_untrackedfiles "?"
1111+1212+ # The git prompt's default format is ' (%s)'.
1313+ # We don't want the leading space.
1414+ set -l vcs (fish_vcs_prompt '(%s)' 2>/dev/null)
1515+1616+ set -l d (set_color brgrey)(date "+%R")(set_color normal)
1717+1818+ set -l duration "$cmd_duration$CMD_DURATION"
1919+ if test $duration -gt 100
2020+ set duration (math $duration / 1000)s
2121+ else
2222+ set duration
2323+ end
2424+2525+ set -q VIRTUAL_ENV_DISABLE_PROMPT
2626+ or set -g VIRTUAL_ENV_DISABLE_PROMPT true
2727+ set -q VIRTUAL_ENV
2828+ and set -l venv (string replace -r '.*/' '' -- "$VIRTUAL_ENV")
2929+3030+ set_color normal
3131+ string join " " -- $venv $duration $vcs $d
3232+end
+23
fish/functions/j.fish
···11+function j
22+ set old_cwd $PWD
33+ if test -n "$argv[1]"
44+ cd "$argv[1]"
55+ set should_alter_history yes
66+ end
77+88+ set dir (fd . --type d --max-depth 4 | zf --height 40 --preview 'eza --icons=always -1 --classify=always ')
99+ if test -z "$dir"
1010+ cd "$old_cwd"
1111+ if test -n "$should_alter_history"
1212+ set dirprev $dirprev[1..-3]
1313+ else
1414+ set dirprev $dirprev[1..-2]
1515+ end
1616+ return 1
1717+ end
1818+1919+ cd $dir
2020+ if test -n "$should_alter_history"
2121+ set dirprev $dirprev[1..-2]
2222+ end
2323+end
+13
fish/functions/pp.fish
···11+function pp
22+ if not type --query project-picker
33+ echo "project-picker not installed"
44+ return 1
55+ end
66+77+ set dir (project-picker)
88+99+ # A non-zero exit code means no project was selected.
1010+ if test $status -eq 0
1111+ cd $dir
1212+ end
1313+end
+13
fish/functions/y.fish
···11+function y
22+ if type --query yazi
33+ echo 'yazi is not installed'
44+ exit 1
55+ end
66+77+ set tmp (mktemp -t "yazi-cwd.XXXXXX")
88+ yazi $argv --cwd-file="$tmp"
99+ if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
1010+ builtin cd -- "$cwd"
1111+ end
1212+ rm -f -- "$tmp"
1313+end