Configuration Reference
Tildr stores its user configuration in TOML format at ~/.config/tildr/config.toml.
The configuration file is created by tildr init and is never written automatically by any other command. If the file does not exist, all defaults are applied silently at runtime.
Configuration File Location
| Platform | Path |
|---|---|
| Linux / macOS | $XDG_CONFIG_HOME/tildr/config.toml |
| Fallback | $HOME/.config/tildr/config.toml |
Tildr uses the XDG Base Directory specification when available. On systems where XDG is not configured, it falls back to $HOME/.config/tildr/config.toml.
Full Configuration Example
[core]
repo = "~/.dotfiles"
search_threshold = 15
color = true
[git]
available = true
# enable = true # optional: explicitly enable/disable Git operations
auto_commit = true
[crypto]
mode = "symmetric"
# gpg_key = "" # only used when mode = "asymmetric"
[core] Section
Core settings control the repository path, interactive behavior, and output formatting.
| Field | Type | Default | Description |
|---|---|---|---|
repo | String | "~/.dotfiles" | Path to the Tildr repository. Accepts ~/... or an absolute path inside $HOME. |
search_threshold | Integer | 15 | Number of managed files above which interactive pickers show a fuzzy search step before the selection list. |
color | Boolean | true | When false, disables all colored output by setting NO_COLOR=1 before dispatch. Also respected if NO_COLOR is already set in the environment. |
core.repo
The repository path must satisfy these constraints:
- Must be inside
$HOME - Cannot be
$HOMEitself - Must be on the same filesystem as
$HOME(no cross-disk layouts)
# Good
repo = "~/.dotfiles"
repo = "~/.config/dotfiles"
repo = "/home/user/.dotfiles"
# Bad — outside $HOME
repo = "/opt/dotfiles"
# Bad — is $HOME itself
repo = "~"
core.search_threshold
When the number of managed files exceeds this threshold, interactive pickers (used by tildr add, tildr cat, tildr edit, tildr unlink, tildr restore, tildr del, tildr mv) display a search input before the file list. Type a fragment to filter by fuzzy match, or press Enter with empty input to see the full list.
# Show search immediately for any number of files
search_threshold = 0
# Only show search for 50+ files
search_threshold = 50
core.color
Controls whether Tildr uses ANSI color codes in terminal output.
# Disable colors in output
color = false
Colors are also disabled when the NO_COLOR environment variable is set:
NO_COLOR=1 tildr status
[git] Section
Git settings control version control integration, automatic commits, and the ability to disable Git operations entirely.
| Field | Type | Default | Description |
|---|---|---|---|
available | Boolean | true | Whether Git was detected by tildr init. Written automatically by Tildr. |
enable | Boolean | unset | Optional override. When explicitly set to false, disables all Git operations even if Git is installed. |
auto_commit | Boolean | true | When true, auto-runs git add -A && git commit after add, restore, del, mv, and secret operations. |
git.available
This field is written automatically by tildr init based on whether Git was found in PATH at initialization time. You should not edit this field manually.
git.enable
This is an optional override that allows you to disable Git operations without uninstalling Git. When set to false:
tildr syncwill not worktildr git statuswill not work- Auto-commit after
add,restore,del,mv, andsecretwill be skipped
[git]
# Explicitly disable all Git operations
enable = false
When unset (the default), Git operations are enabled if git.available = true.
git.auto_commit
When true, Tildr automatically commits changes after these commands:
| Command | Auto-commit behavior |
|---|---|
tildr add | Commits after adding files |
tildr restore | Commits after restoring files |
tildr del | Commits after deleting files |
tildr mv | Commits after moving/renaming files |
tildr secret add | Commits after registering a secret file |
tildr secret rm | Commits after unregistering a secret file |
tildr secret encrypt | Commits after re-encrypting the bundle |
tildr exclude add | Commits after adding an ignore pattern |
tildr exclude rm | Commits after removing an ignore pattern |
Commands that do not trigger auto-commit: tildr apply, tildr unlink, tildr status, tildr list, tildr git, tildr sync, tildr doctor.
[git]
# Disable automatic commits
auto_commit = false
Git Operations Logic
Tildr determines whether Git operations are enabled using this logic:
operations_enabled = git.available AND git.enable != false
auto_commit_enabled = git.auto_commit AND operations_enabled
[crypto] Section
Encryption settings control how tildr secret encrypts and decrypts sensitive files.
| Field | Type | Default | Description |
|---|---|---|---|
mode | String | "symmetric" | Encryption mode. Accepted values: "symmetric" or "asymmetric". |
gpg_key | String | "" (empty) | GPG key ID or email for asymmetric mode. When empty, Tildr prompts on first use and saves the choice. |
crypto.mode
Tildr supports two GPG encryption modes:
Symmetric (default):
- No key pair required — only a passphrase
- GPG prompts for the passphrase via the system pinentry on first use
- The same passphrase must be used to decrypt on any machine
- Simpler setup, suitable for single-user environments
Asymmetric:
- Uses an existing GPG key pair — no separate passphrase to remember
crypto.gpg_keymust be set to the recipient key ID or email- Decryption uses the private key silently (subject to GPG Agent caching)
- Preferred when you already manage GPG keys and want a seamless new-machine setup
[crypto]
# Symmetric mode (default)
mode = "symmetric"
# Asymmetric mode
mode = "asymmetric"
gpg_key = "[email protected]"
crypto.gpg_key
Only used when crypto.mode = "asymmetric". Specifies the GPG key ID or email address used for encryption.
If left empty, Tildr will:
- List all available GPG secret keys
- If only one key exists, use it automatically
- If multiple keys exist, show an interactive selection prompt
- Save the chosen key to
config.tomlfor future use
[crypto]
# By key ID
gpg_key = "ABC123DEF456"
# By email
gpg_key = "[email protected]"
Configuration Loading Behavior
- Tildr loads
config.tomlon startup - If the file does not exist, all defaults are applied silently
- Missing fields within an existing file fall back to their defaults
- The config is never written automatically except by
tildr init tildr secretmay updatecrypto.gpg_keyafter interactive key selection
Environment Variables
Tildr respects the following environment variable:
| Variable | Effect |
|---|---|
NO_COLOR | When set (any value), disables colored output. Equivalent to core.color = false. |
PAGER | Used by --less flag in tildr status, tildr list, and tildr cat. Defaults to less -RFX. |
Viewing Current Configuration
Use tildr cat config to display the current configuration file:
tildr cat config
This opens the config file in your configured editor, or prints it to stdout.