Configuration
pdtm uses a combination of configuration files and default paths to manage tool installations.
File Locations
- Configuration File:
$HOME/.config/pdtm/config.yaml - Cache File:
$HOME/.config/pdtm/cache.json(Stores tool lists to handle API downtime) - Default Install Path:
$HOME/.pdtm/go/bin
You can override the configuration file location using the -config flag.
Path Management
One of pdtm's core features is managing the system $PATH to ensure installed tools are executable.
Unix-like Systems (Linux/macOS)
pdtm attempts to detect your shell and modify the appropriate RC file:
- Bash:
.bashrc - Zsh:
.zshrc - Fish:
.config/fish/config.fish
When you run pdtm -ip, it appends an export command to the detected file. You may need to run source <rcfile> or restart your terminal for changes to take effect.
Windows
On Windows, pdtm interacts with the User Environment Variables in the Registry (HKCU\Environment).
- It modifies the
Pathregistry key directly to avoid truncation issues common withsetx. - It broadcasts a
WM_SETTINGCHANGEmessage to notify running applications of the change, though a terminal restart is usually required.