Config
Atuin maintains two configuration files, stored in ~/.config/atuin/
. We store
data in ~/.local/share/atuin
(unless overridden by XDG_*).
The full path to the config file would be ~/.config/atuin/config.toml
The config location can be overridden with ATUIN_CONFIG_DIR
db_path
Default: ~/.local/share/atuin/history.db
The path to the Atuin SQLite database.
key_path
Default: ~/.local/share/atuin/key
The path to the Atuin encryption key.
session_path
Default: ~/.local/share/atuin/session
The path to the Atuin server session file. This is essentially just an API token
dialect
Default: us
This configures how the stats command parses dates. It has two possible values
or
auto_sync
Default: true
Configures whether or not to automatically sync, when logged in.
update_check
Default: true
Configures whether or not to automatically check for updates.
sync_address
Default: https://api.atuin.sh
The address of the server to sync with!
sync_frequency
Default: 1h
How often to automatically sync with the server. This can be given in a
“human-readable” format. For example, 10s
, 20m
, 1h
, etc.
If set to 0
, Atuin will sync after every command. Some servers may potentially
rate limit, which won’t cause any issues.
search_mode
Default: fuzzy
Which search mode to use. Atuin supports “prefix”, “fulltext”, “fuzzy”, and “skim” search modes.
Prefix mode searches for “query*”; fulltext mode searches for “*query*”; “fuzzy” applies the fuzzy search syntax; “skim” applies the skim search syntax.
fuzzy
search syntax
The “fuzzy” search syntax is based on the fzf search syntax.
Token | Match type | Description |
---|---|---|
sbtrkt | fuzzy-match | Items that match sbtrkt |
'wild | exact-match (quoted) | Items that include wild |
^music | prefix-exact-match | Items that start with music |
.mp3$ | suffix-exact-match | Items that end with .mp3 |
!fire | inverse-exact-match | Items that do not include fire |
!^music | inverse-prefix-exact-match | Items that do not start with music |
!.mp3$ | inverse-suffix-exact-match | Items that do not end with .mp3 |
A single bar character term acts as an OR operator. For example, the following
query matches entries that start with core
and end with either go
, rb
,
or py
.
filter_mode
Default: global
The default filter to use when searching
Mode | Description |
---|---|
global (default) | Search history from all hosts, all sessions, all directories |
host | Search history just from this host |
session | Search history just from the current session |
directory | Search history just from the current directory |
Filter modes can still be toggled via ctrl-r
search_mode_shell_up_key_binding
Atuin version: >= 17.0
Default: fuzzy
The default searchmode to use when searching and being invoked from a shell up-key binding.
Accepts exactly the same options as search_mode
above
Defaults to the value specified for search_mode
.
filter_mode_shell_up_key_binding
Default: global
The default filter to use when searching and being invoked from a shell up-key binding.
Accepts exactly the same options as filter_mode
above
Defaults to the value specified for filter_mode
.
workspaces
Atuin version: >= 17.0
Default: false
This flag enables a pseudo filter-mode named “workspace”: the filter is automatically activated when you are in a git repository.
With workspace filtering enabled, Atuin will filter for commands executed in any directory within a git repository tree.
Filter modes can still be toggled via ctrl-r.
style
Default: auto
Which style to use. Possible values: auto
, full
and compact
.
compact
:
full
:
This means that Atuin will automatically switch to compact
mode when the terminal window is too short for full
to display properly.
invert
Atuin version: >= 17.0
Default: false
Invert the UI - put the search bar at the top.
inline_height
Default: 0
Set the maximum number of lines Atuin’s interface should take up.
If set to 0
, Atuin will always take up as many lines as available (full screen).
show_preview
Default: true
Configure whether or not to show a preview of the selected command.
Useful when the command is longer than the terminal width and is cut off.
max_preview_height
Atuin version: >= 17.0
Default: 4
Configure the maximum height of the preview to show.
Useful when you have long scripts in your history that you want to distinguish by more than the first few lines.
show_help
Atuin version: >= 17.0
Default: true
Configure whether or not to show the help row, which includes the current Atuin version (and whether an update is available), a keymap hint, and the total amount of commands in your history.
show_tabs
Atuin version: >= 18.0
Default: true
Configure whether or not to show tabs for search and inspect.
exit_mode
Default: return-original
What to do when the escape key is pressed when searching
Value | Behaviour |
---|---|
return-original (default) | Set the command-line to the value it had before starting search |
return-query | Set the command-line to the search query you have entered so far |
Pressing ctrl+c or ctrl+d will always return the original command-line value.
history_format
Default to history list
The history format allows you to configure the default history list
format - which can also be specified with the —format arg.
The specified —format arg will prioritize the config when both are present
More on history list
history_filter
The history filter allows you to exclude commands from history tracking - maybe you want to keep ALL of your curl
commands totally out of your shell history, or maybe just some matching a pattern.
This supports regular expressions, so you can hide pretty much whatever you want!
cwd_filter
The cwd filter allows you to exclude directories from history tracking.
This supports regular expressions, so you can hide pretty much whatever you want!
After updating that parameter, you can run the prune command to remove old history entries that match the new filters.
store_failed
Atuin version: >= 18.3.0
Default: true
Configures whether to store commands that failed (those with non-zero exit status) or not.
secrets_filter
Atuin version: >= 17.0
Defatults: true
This matches history against a set of default regex, and will not save it if we get a match. Defaults include
- AWS key id
- Github pat (old and new)
- Slack oauth tokens (bot, user)
- Slack webhooks
- Stripe live/test keys
- Atuin login command
- Cloud environment variable patterns (
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AZURE_STORAGE_CLASS_KEY
,GOOGLE_SERVICE_ACCOUNT_KEY
) - Netlify authentication tokens
- Npm pat
- Pulumi pat
macOS Ctrl-n key shortcuts
Default: true
macOS does not have an Alt key, although terminal emulators can often be configured to map the Option key to be used as Alt. However, remapping Option this way may prevent typing some characters, such as using Option-3 to type #
on the British English layout. For such a scenario, set the ctrl_n_shortcuts
option to true
in your config file to replace Alt-0 to Alt-9 shortcuts with Ctrl-0 to Ctrl-9 instead:
network_timeout
Atuin version: >= 18.0
Default: 30
The max amount of time (in seconds) to wait for a network request. If any operations with a sync server take longer than this, the code will fail - rather than wait indefinitely.
network_connect_timeout
Atuin version: >= 18.0
Default: 5
The max time (in seconds) we wait for a connection to become established with a remote sync server. Any longer than this and the request will fail.
local_timeout
Atuin version: >= 18.0
Default: 5
Timeout (in seconds) for acquiring a local database connection (sqlite).
enter_accept
Atuin version: >= 17.0
Default: false
Not supported by NuShell presently
When set to true, Atuin will default to immediately executing a command rather than the user having to press enter twice. Pressing tab will return to the shell and give the user a chance to edit.
This technically defaults to true for new users, but false for existing. We
have set enter_accept = true
in the default config file. This is likely to
change to be the default for everyone in a later release.
keymap_mode
Atuin version: >= 18.0
Default: emacs
The initial keymap mode of the interactive Atuin search (e.g. started by the
keybindings in the shells). There are four supported values: "emacs"
,
"vim-normal"
, "vim-insert"
, and "auto"
. The keymap mode "emacs"
is the
most basic one. In the keymap mode "vim-normal"
, you may use k
and j to navigate the history list as in Vim, whilst pressing
i changes the keymap mode to "vim-insert"
. In the keymap mode
"vim-insert"
, you can search for a string as in the keymap mode "emacs"
,
while pressing Esc switches the keymap mode to "vim-normal"
. When
set to "auto"
, the initial keymap mode is automatically determined based on
the shell’s keymap that triggered the Atuin search. "auto"
is not supported
by NuShell at present, where it will always trigger the Atuin search with the
keymap mode "emacs"
.
keymap_cursor
Atuin version: >= 18.0
Default: (empty dictionary)
The terminal’s cursor style associated with each keymap mode in the Atuin
search. This is specified by a dictionary whose keys and values being the
keymap names and the cursor styles, respectively. A key specifies one of the
keymaps from emacs
, vim_insert
, and vim_normal
. A value is one of the
cursor styles, default
or {blink,steady}-{block,underline,bar}
. The
following is an example.
If the cursor style is specified, the terminal’s cursor style is changed to the specified one when the Atuin search starts with or switches to the corresponding keymap mode. Also, the terminal’s cursor style is reset to the one associated with the keymap mode corresponding to the shell’s keymap on the termination of the Atuin search.
prefers_reduced_motion
Atuin version: >= 18.0
Default: false
Enable this, and Atuin will reduce motion in the TUI as much as possible. Users with motion sensitivity can find the live-updating timestamps distracting.
Alternatively, set env var NO_MOTION
Stats
This section of client config is specifically for configuring Atuin stats calculations
common_subcommands
Default:
Configures commands where we should consider the subcommand as part of the statistics. For example, consider kubectl get
rather than just kubectl
.
common_prefix
Atuin version: >= 17.1
Default:
Configures commands that should be totally stripped from stats calculations. For example, ‘sudo’ should be ignored.
sync
We have developed a new version of sync, that is both faster and more efficient than the original version.
Presently, it is the default for fresh installs but not for existing users. This will change in a later release.
To enable sync v2, add the following to your config
dotfiles
Atuin version: >= 18.1
Default: false
To enable sync of shell aliases between hosts. Requires sync
enabled.
Add the new section to the bottom of your config file, for every machine you use Atuin with
Note: you will need to have sync v2 enabled. See the above section.
Manage aliases using the command line options
After setting an alias, you will either need to restart your shell or source the init file for the change to take affect
keys
This section of the client config is specifically for configuring key-related settings.
scroll_exits
Atuin version: >= 18.1
Default: true
Configures whether the TUI exits, when scrolled past the last or first entry.
prefix
Atuin version: > 18.3
Default: a
Which key to use as the prefix
preview
This section of the client config is specifically for configuring preview-related settings. (In the future the other 2 preview settings will be moved here.)
strategy
Atuin version: >= 18.3
Default: auto
Which preview strategy is used to calculate the preview height. It respects max_preview_height
.
Value | Preview height is calculated from the length of the |
---|---|
auto (default) | selected command |
static | longest command in the current result set |
fixed | use max_preview_height as fixed value |
By using auto
a preview is shown, iff the command is longer than the width of the terminal.
Daemon
Atuin version: >= 18.3
Default: false
Enable the background daemon
Add the new section to the bottom of your config file
sync_frequency
Default: 300
How often the daemon should sync, in seconds
socket_path
Default:
Where to bind a unix socket for client -> daemon communication
systemd_socket
Default false
Use a socket passed via systemd socket activation protocol instead of the path
tcp_port
Default: 8889
The port to use for client -> daemon communication. Only used on non-unix systems.
theme
Atuin version: >= 18.4
The theme to use for showing the terminal interface.
name
Default: ""
A theme name that must be present as a built-in (an empty string for the default,
autumn
or marine
), or found in the themes directory, with the suffix .toml
.
By default this is ~/.config/atuin/themes/
but can be overridden with the
ATUIN_THEME_DIR
environment variable.
debug
Default: false
Output information about why a theme will not load. Independent from other log levels as it can cause data from the theme file to be printed unfiltered to the terminal.
max_depth
Default: 10
Number of levels of “parenthood” that will be traversed for a theme. This should not need to be added in or changed in normal usage.