Command Reference
[!TIP] The
add,restore, andunlinkcommands accept multiple file parameters simultaneously.tildr add .config/nvim/init.vim .config/nvim/lua/plugins.lua tildr restore .config/nvim/init.vim .config/nvim/lua/plugins.lua tildr unlink .config/nvim/init.vim .config/nvim/lua/plugins.luaIf a path contains spaces, use single or double quotes:
tildr unlink '.config/my app/config.toml' .config/nvim/init.vim
tildr init
Initializes the Tildr repository and writes the user configuration file.
tildr init
tildr init --repo ~/.dotfiles-work
tildr init --no-git
tildr init --force
tildr init --quiet
Options:
| Flag | Short | Description |
|---|---|---|
--repo <PATH> | -r | Repository path, must be inside $HOME |
--no-git | Skip git init | |
--force | -f | Reinitialize even if config already exists |
--quiet | -q | Suppress output |
Behavior:
- Creates the repository directory
- Writes
~/.config/tildr/config.toml - Detects whether Git is available in
PATH - Writes
[git].availableto the config - Initializes a Git repository only when Git is available and
--no-gitis not used - Refuses
$HOMEitself as the repository root - Refuses repositories outside
$HOME - If already initialized and
--forceis not passed, refreshes the saved Git availability state
tildr import
Clone a remote dotfiles repository and apply it.
tildr import https://github.com/user/dotfiles
tildr import https://github.com/user/dotfiles ~/.dotfiles
tildr import https://github.com/user/dotfiles --force
Options:
| Flag | Short | Description |
|---|---|---|
--dest <PATH> | -d | Local destination path (default: ~/.dotfiles) |
--force | -f | Overwrite existing config if it points to a different repo |
--dry-run | -n | Show what would be done without making changes |
--quiet | -q | Suppress output |
Behavior:
- Clones the Git repository to the specified destination (or
~/.dotfiles) - Creates or updates
~/.config/tildr/config.tomlwith the repository path - Automatically runs
applyto establish symlinks - Destination must be inside
$HOME - Refuses to overwrite a config pointing to a different repository unless
--forceis used
tildr add
Adds a file or a directory tree from $HOME into the repository and replaces each file with a symlink.
tildr add .bashrc
tildr add .config/nvim
tildr add .config/nvim/init.lua --dry-run
tildr add .bashrc .config/nvim/init.lua
tildr add .config/app01.json --nolink
Options:
| Flag | Short | Description |
|---|---|---|
--dry-run | -n | Preview actions without modifying files |
--nolink | Add to repository without creating a symlink (adds to .tildrignore) | |
--force | -f | Remove an existing repository target before moving the file |
--quiet | -q | Suppress output |
Behavior:
- Files are moved into the repository
- Symlinks are created at the original home path
- With
--nolink, files are moved but no symlink is created and the file is added to.tildrignore - Directories are traversed recursively
- Paths matched by
.tildrignoreare skipped - Already-correct symlinks are skipped silently
- If
git.auto_commit = true, the repository is auto-committed after a successful run
tildr apply
Applies repository state into $HOME by creating or repairing symlinks.
tildr apply
tildr apply --dry-run
tildr apply --force --verbose
Options:
| Flag | Short | Description |
|---|---|---|
--dry-run | -n | Preview actions |
--verbose | -v | Include unchanged or skipped entries in output |
--force | -f | Replace conflicting regular files or directories in $HOME |
--quiet | -q | Suppress output |
Behavior:
- Creates missing symlinks for all managed files
- Repairs broken or incorrect symlinks automatically
- Skips regular files already present in
$HOMEunless--forceis used - Uses the repository as the source of truth
- Does not modify repository content
tildr status
Shows the synchronization state of all managed files.
tildr status
tildr status --json
tildr status --counter
Options:
| Flag | Short | Description |
|---|---|---|
--json | -j | Emit structured JSON output |
--counter | -c | Print aggregated counters only |
Status values:
| Status | Meaning |
|---|---|
linked | Symlink exists and points to the correct repository file |
missing_link | Repository file exists but the home symlink is absent |
broken_symlink | A symlink exists but points to a wrong target |
not_a_symlink | A regular file or directory exists where the symlink should be |
The --counter mode prints a summary like:
Managed: 12
Linked: 10
Missing: 1
Broken: 0
Not symlink: 1
tildr list
Lists managed files in the repository.
tildr list
tildr list --long
tildr list --tree
Options:
| Flag | Short | Description |
|---|---|---|
--tree | -t | Show the repository as a directory tree |
--long | -l | Show type and file size for each entry |
Notes:
- Standard listing includes only managed files discovered by repository scanning
- Tree view prints the repository directory structure directly
.tildrignorepatterns and internally excluded files are not shown
tildr repo path
Prints the absolute path to the configured Tildr repository.
tildr repo path
Useful for shell automation and aliases:
alias tildr-repo='cd "$(tildr repo path)"'
After that, tildr-repo takes you directly to the repository.
tildr git status
Runs git status scoped to the Tildr repository.
tildr git status
Behavior:
- Uses the configured repository as both
--git-dirand--work-tree - Prints a success message when the repository is clean
- Prints an informational message plus the normal
git statusoutput when there are tracked or untracked changes
tildr cat
Prints the content of a managed file from the repository.
tildr cat .bashrc
tildr cat .config/nvim/init.lua --less
tildr cat config
tildr cat
Options:
| Flag | Short | Description |
|---|---|---|
--less | -l | Open output in a pager |
Behavior:
- If no target is passed, Tildr opens an interactive picker
- The special target
configresolves to the Tildr config file itself - When
--lessis used, Tildr respects$PAGERand falls back toless -RFXon TTY output
You can use your preferred file viewers by using the PAGER environment variable like this:
PAGER=bat tildr cat --less
tildr edit
Opens a managed file in the repository with the configured editor.
tildr edit .bashrc
tildr edit
Behavior:
- If no target is passed, Tildr opens an interactive picker
- Editor resolution order:
$EDITOR→$VISUAL→nano - Edits are made directly in the repository file; the symlink in
$HOMEreflects the change immediately
You can open it with your preferred editor using the EDITOR environment variable like this:
EDITOR=vim tildr edit .bashrc
tildr unlink
Removes symlinks from $HOME without touching the repository content.
tildr unlink .bashrc
tildr unlink .config/nvim
tildr unlink .bashrc .config/nvim/init.lua
tildr unlink --all
Options:
| Flag | Short | Description |
|---|---|---|
--all | -a | Unlink all managed files |
--dry-run | -n | Preview changes |
--force | -f | Skip confirmation prompts |
--quiet | -q | Suppress output |
Behavior:
- Only symlinks in
$HOMEare removed - Repository files remain untouched
- Directory targets are expanded recursively over managed files
- Confirms before acting on a directory target unless
--forceis passed - Empty parent directories in
$HOMEare cleaned up when possible - If no target is passed, Tildr opens an interactive picker
tildr restore
Moves managed files back from the repository into $HOME and removes the symlinks.
tildr restore .bashrc
tildr restore .config/nvim
tildr restore .bashrc .config/nvim/init.lua
tildr restore --all
Options:
| Flag | Short | Description |
|---|---|---|
--all | -a | Restore all managed files |
--dry-run | -n | Preview changes |
--force | -f | Skip confirmation prompts |
--quiet | -q | Suppress output |
Behavior:
- Removes the home symlink if present
- Moves the real file back from the repository into
$HOME - Removes empty directories from the repository after restoration
- Confirms before acting on a directory target unless
--forceis passed - If no target is passed, Tildr opens an interactive picker
- Auto-commits the repository when
git.auto_commit = true
tildr del
Deletes managed files from the repository and unlinks them from $HOME.
tildr del .bashrc
tildr del .config/nvim
tildr del --all
tildr del .bashrc --purge
Options:
| Flag | Short | Description |
|---|---|---|
--all | -a | Delete all managed files |
--dry-run | -n | Preview changes |
--force | -f | Skip confirmation prompts |
--purge | -p | Permanently delete instead of moving to trash |
--quiet | -q | Suppress output |
Behavior:
- Removes the symlink from
$HOMEif it exists - Deletes the file from the repository
- Default mode tries to send files to the system trash
--purgepermanently removes repository files without trash- Confirms before acting on a directory target unless
--forceis passed - If no target is passed, Tildr opens an interactive picker
- Auto-commits the repository when
git.auto_commit = true
tildr sync
Synchronizes the repository with its configured Git remote in both directions.
tildr sync
tildr sync --dry-run
tildr sync --force
Options:
| Flag | Short | Description |
|---|---|---|
--dry-run | -n | Preview pull / merge / push actions without executing |
--force | -f | Pass --force to the final git push |
--quiet | -q | Suppress output |
Behavior:
- Uses the current branch dynamically
- Uses the branch tracking remote and upstream branch from Git config
- Fetches from the tracked remote before deciding what to do
- If only local commits exist, pushes them
- If only remote commits exist, performs a fast-forward pull
- If both local and remote commits exist, simulates a merge first
- Aborts safely and reports conflicting files when a merge conflict would occur
- Uses the saved Git availability from Tildr config instead of probing
PATHon every run
tildr doctor
Runs a health check against the Tildr environment and reports any issues found.
tildr doctor
Checks performed:
| Check | What is verified |
|---|---|
| Repository | Repository directory exists |
| Config | Config file exists at expected path |
| Git | Repository is a Git repo and the working tree has no pending or untracked changes |
| Permissions | Repository and managed files are accessible |
| Disk | Repository total size |
| Symlinks | All managed symlinks are correct; reports broken or missing links |
Output example:
Checking environment...
✓ Repository OK
✓ Config OK
✓ Git OK
✓ Permissions OK
✓ Disk OK (42.3 KB)
✓ Symlinks OK
All checks passed
tildr completions
Generate shell completion scripts for various shells.
tildr completions bash
tildr completions zsh
tildr completions fish
Argument:
The shell to generate completions for: bash, zsh, or fish.
Installation:
Bash:
tildr completions bash >> ~/.bash_completion
Zsh (Oh My Zsh):
tildr completions zsh > ~/.oh-my-zsh/completions/_tildr
Zsh (vanilla):
Add the following to ~/.zshrc:
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit
Then install the completions:
tildr completions zsh > ~/.zfunc/_tildr
Finally, restart your shell or run exec zsh for the changes to take effect.
Fish:
tildr completions fish > ~/.config/fish/completions/tildr.fish
Behavior:
- Generates and outputs shell-specific completion scripts
- No interactive installation — output is printed to stdout for you to redirect or pipe
- Each shell has its own completion script format and installation location
tildr mv
Renames or moves a managed file inside the repository and updates its symlink in $HOME. Mirrors the behavior of the Linux mv command — rename and move are the same operation.
tildr mv .bashrc .bashrc_backup
tildr mv files/file.txt configs/file.txt
tildr mv
Options:
| Flag | Short | Description |
|---|---|---|
--dry-run | -n | Show what would be done without making changes |
--quiet | -q | Suppress output |
Behavior:
- Renames or moves the file inside the repository
- Removes the old symlink from
$HOME - Creates a new symlink at the new path in
$HOME - If the destination is a filename only (no directory), the original directory is preserved
- If no arguments are passed, Tildr opens an interactive picker to select the source, then prompts for the new path
- Auto-commits the repository when
git.auto_commit = true
tildr exclude
Manages patterns in .tildrignore without editing the file manually.
tildr exclude add *.log
tildr exclude add cache/
tildr exclude remove *.log
tildr exclude list
Options:
| Subcommand | Description |
|---|---|
add <PATTERN> | Add a gitignore-style pattern to .tildrignore |
remove <PATTERN> | Remove the exact pattern from .tildrignore |
list | Print all patterns in .tildrignore |
Behavior:
- Creates
.tildrignoreif it does not exist - Duplicate patterns are ignored when adding
- Fails if the pattern is not found when removing
- Patterns use gitignore-style matching semantics
- Patterns added here prevent files from being discovered by
list,status, andapply - Does not remove existing symlinks — use
tildr unlinkfor that
tildr info
Displays project metadata.
tildr info credits
tildr info license
Modes:
| Mode | Output |
|---|---|
credits | Build metadata, repository URL, license, commit hash, maintainer, homepage |
license | Installed license text, opened through a pager when available |