Troubleshooting
Enable Debug Logging
Section titled “Enable Debug Logging”dotfiles install tool-name --trace --log=verbose--log=verbose also shows the DEBUG lines that explain why a step was skipped.
Where Generated Files Live
Section titled “Where Generated Files Live”Every location the CLI writes to comes from the paths section of dotfiles.config.ts, documented in Project Configuration. The steps below name those keys instead of fixed paths, because a project that customises them has a different layout:
paths.targetDirholds the shims. The generated shell scripts add it toPATH.paths.shellScriptsDirholdsmain.zsh,main.bashandmain.ps1, plus thezsh/completionsdirectory.paths.binariesDirholds installed tools as<tool>/current/<binary>.
dotfiles tool files (with no argument) prints every file the CLI has written, tagged with its kind, so it is the quickest way to see the resolved locations:
- github-release--rg (shim): <paths.targetDir>/rg- system (init): <paths.shellScriptsDir>/main.zsh- system (completion): <paths.shellScriptsDir>/zsh/completions/_dotfilesCommon Issues
Section titled “Common Issues”Tool Not Found After Installation
Section titled “Tool Not Found After Installation”- Verify
.bin()names the executables the tool actually ships.dotfiles tool listprints every configured tool and its binaries. - Check the shim exists:
dotfiles tool filesmust show a(shim)entry for the binary underpaths.targetDir. If it is missing, rundotfiles state generate. - Ensure
PATHincludespaths.targetDir. The generatedmain.zsh/main.bashadd it, so source them as described in Getting Started;command -v tool-nameshould then resolve to the shim. - Check the tool itself is installed:
dotfiles tool which --bin tool-nameprints the installed binary underpaths.binariesDir, and fails withbinary path does not exist: ...when nothing has been installed yet.dotfiles tool install tool-nameinstalls or repairs it.
Installation Fails
Section titled “Installation Fails”- Check asset patterns match actual GitHub release assets
- Verify repository name is correct
- Use
--trace --log=verboseto see detailed error messages
Infinite Recursion Error
Section titled “Infinite Recursion Error”Message: Recursive installation detected for <tool>. Aborting to prevent infinite loop.
The shim refuses to run while an installation of the same tool is already in progress. If you see this, check that your installation scripts and hooks don’t call the tool being installed via its shim.
Disable Shim Usage Tracking
Section titled “Disable Shim Usage Tracking”Shim usage tracking is enabled by default: every run of a shim appends a line to usage/shim-usage.log under paths.generatedDir. See .bin() in Core API.
- Disable temporarily for a single command:
DOTFILES_LOCAL_USAGE_TRACKING=0 rg --version - Disable for the current shell session:
export DOTFILES_LOCAL_USAGE_TRACKING=0
Dependency Errors
Section titled “Dependency Errors”Messages:
-
tool "<tool>" depends on missing dependency "<binary>" -
ambiguous dependency: binary "<binary>" is provided by multiple tools: <tool>, <tool> -
dependency cycle detected among tools: <tool>, <tool> -
Ensure every
.dependsOn()references a binary from.bin()in exactly one tool;dotfiles tool listshows which tool provides each binary -
Verify providers include active platform/architecture for platform-specific configs
Shell Integration Not Working
Section titled “Shell Integration Not Working”- Source the generated script for your shell from
paths.shellScriptsDir(dotfiles tool fileslists it as asystem (init)entry). Setup instructions are in Getting Started. - Check for syntax errors:
zsh -n "<paths.shellScriptsDir>/main.zsh" - Rerun
dotfiles state generateafter changing any.tool.tsfile; the scripts are not regenerated on their own - Use declarative
.env()instead of inline exports
Completions Not Loading
Section titled “Completions Not Loading”- Check the completion file was generated:
dotfiles tool fileslists each one as a(completion)entry. A completion produced by running the tool (cmd) is skipped until the tool is installed;dotfiles state generate --log=verbosereports it asSkipping zsh completion: binary "<name>" not installed at ... - Reload completions:
autoload -U compinit && compinit - Check the configuration against Shell Completions
Shadow Warnings During Generate
Section titled “Shadow Warnings During Generate”Messages:
WARN [tool] Binary 'name' shadows '/usr/bin/name'WARN [tool] [zsh] Alias "ls" shadows /bin/lsWARN [tool] [zsh] Function "cd" shadows zsh builtin "cd"
dotfiles state generate inspects active tool configurations for potential shadowing against external commands found on system PATH and standard shell builtins for zsh, bash, and powershell.
- Intentional Binary Delegation: If a tool’s binary targets or delegates directly to the host system binary (e.g., via
install("manual", { binaryPath: "/usr/bin/..." })), the warning is automatically suppressed. - Shimless Binaries: If a binary is configured with
.bin("name", { shim: false }), it is not placed on PATH and will not trigger a binary shadow warning. - Resolving Conflicts: If the shadowing is unintentional, consider renaming the conflicting alias or function, or scoping it appropriately.
Hook Not Executing
Section titled “Hook Not Executing”.hook('after-install', async ({ log, $ }) => { try { await $`./setup.sh`; } catch (error) { log.error('Setup failed'); throw error; }})$runs from the directory containing the.tool.tsfile; see Working Directory in Hooks- Always await
$commands - A rejected hook fails the installation, so handle expected errors with try/catch
Testing and Verification
Section titled “Testing and Verification”Validate Configuration
Section titled “Validate Configuration”dotfiles tool validate # every configured tooldotfiles tool validate tool-name # one toolType-check the .tool.ts files with the TypeScript compiler against the project’s tsconfig.json (tsc -p tsconfig.json).
Useful Commands
Section titled “Useful Commands”dotfiles tool install tool-name # Install by tool or binary name (or: dotfiles i)dotfiles tool install tool-name --force # Force reinstalldotfiles tool install tool-name --trace --log=verbose # Debug loggingdotfiles tool which tool-or-binary # Print path to the .tool.ts that defines itdotfiles tool which --bin tool-or-binary # Print path to the installed binarydotfiles tool files tool-name # Tree of the installed filesEvery command and flag is documented in the CLI Reference.
Verification Steps
Section titled “Verification Steps”- Binary works:
tool-name --version(the first run through the shim installs the tool) - Shim created:
dotfiles tool filesshows a(shim)entry for it underpaths.targetDir, andcommand -v tool-nameresolves to that path - Tool installed:
dotfiles tool which --bin tool-nameprints the binary underpaths.binariesDir - Shell integration: Source the generated shell script and test aliases/environment