aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMichelle Tilley <michelle@michelletilley.net>2026-03-30 20:44:56 -0700
committerGitHub <noreply@github.com>2026-03-31 04:44:56 +0100
commita129a98c3adb6013ad4848d3884b2f0b49a225a5 (patch)
treeddfdaa0d97f69e0dcdf939bafcb1b5cb90fd1bf3 /docs
parentfeat: opt-in to sharing last command with ai (#3367) (diff)
downloadatuin-a129a98c3adb6013ad4848d3884b2f0b49a225a5.zip
feat: Add 'atuin config' subcommand for reading and setting config values (#3368)
Adds a new `atuin config` command with three subcommands for inspecting and modifying `config.toml` without opening an editor.
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/reference/config.md127
-rw-r--r--docs/mkdocs.yml3
2 files changed, 129 insertions, 1 deletions
diff --git a/docs/docs/reference/config.md b/docs/docs/reference/config.md
new file mode 100644
index 00000000..3e3465d9
--- /dev/null
+++ b/docs/docs/reference/config.md
@@ -0,0 +1,127 @@
+# config
+
+## `atuin config`
+
+Read, write, and inspect Atuin configuration values. Atuin resolves
+configuration from multiple sources (defaults, config file, environment
+variables). The `config` command lets you see what is set where, and change
+values in your `config.toml` without opening an editor.
+
+## Subcommands
+
+### `atuin config get <key>`
+
+Print the value of a key as it appears in your config file.
+
+```
+$ atuin config get search_mode
+fuzzy
+
+$ atuin config get daemon
+[daemon]
+enabled = true
+socket_path = "/tmp/atuin_daemon.sock"
+```
+
+If the key is not present in the config file, you'll see:
+
+```
+$ atuin config get enter_accept
+(not set in config file)
+```
+
+#### `--resolved` / `-r`
+
+Print the effective value after merging defaults, the config file, and
+environment variable overrides:
+
+```
+$ atuin config get enter_accept --resolved
+false
+```
+
+This also works for table keys, showing all resolved children as flat
+dotted key=value pairs:
+
+```
+$ atuin config get logs --resolved
+logs.ai.file = ai.log
+logs.daemon.file = daemon.log
+logs.dir = /home/user/.local/share/atuin/logs
+logs.enabled = true
+logs.level = info
+logs.search.file = search.log
+```
+
+#### `--verbose` / `-v`
+
+Show both the config file value and the resolved value side by side:
+
+```
+$ atuin config get enter_accept --verbose
+Config file:
+ (not set in config file)
+
+Resolved:
+ false
+```
+
+### `atuin config set <key> <value>`
+
+Set a configuration value in your `config.toml`. The file's existing
+formatting and comments are preserved.
+
+```
+$ atuin config set search_mode fuzzy
+$ atuin config set daemon.enabled true
+```
+
+#### Type detection
+
+By default, `set` matches the TOML type of the existing value when the key
+is already in the config file. This prevents accidentally changing a string
+like `"300"` into an integer `300`.
+
+For new keys (not already in the file), `set` auto-detects the type:
+
+| Value | Detected type |
+|---------------|---------------|
+| `true`/`false`| boolean |
+| `42`, `-1` | integer |
+| `3.14` | float |
+| anything else | string |
+
+!!! warning "Scalar values only"
+ `atuin config set` can only set config entries with scalar values; for tables or arrays, edit the config file manually.
+
+#### `--type` / `-t`
+
+Override type detection with an explicit type:
+
+```
+$ atuin config set sync_frequency 600 --type string
+```
+
+Possible values: `auto`, `string`, `boolean`, `integer`, `float`.
+
+Setting a key that is currently a table will produce an error directing you
+to use a dotted key instead:
+
+```
+$ atuin config set logs true
+Error: 'logs' is a table; use a dotted key like 'logs.key' to set a value within it
+```
+
+### `atuin config print [key]`
+
+Print configuration values from your config file in TOML format. Without a
+key, prints the entire file. With a key, prints that section:
+
+```
+$ atuin config print daemon
+[daemon]
+enabled = true
+socket_path = "/tmp/atuin_daemon.sock"
+pidfile_path = "/tmp/atuin_daemon.pid"
+autostart = false
+```
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index 3a06643d..00adcfb2 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -78,8 +78,9 @@ nav:
- Key Binding: configuration/key-binding.md
- Advanced Key Binding: configuration/advanced-key-binding.md
- Reference:
- - doctor: reference/doctor.md
+ - config: reference/config.md
- daemon: reference/daemon.md
+ - doctor: reference/doctor.md
- gen-completions: reference/gen-completions.md
- hex: reference/hex.md
- import: reference/import.md