A Linux-focused, config-driven dotfiles manager with a simple Python CLI.
git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.shThat's it! The installer will automatically install uv if needed and set up your dotfiles.
- Symlinks dotfiles from
home/to your$HOME - Manages PATH centrally via
~/.config/shell/path.conf - Sets up shell environments for bash and zsh
- Configures essential tools like git, ssh, and readline
- Supports tool integration for cargo, nvm, pnpm, and more
./install.sh./install.sh --dry-run # Preview what will be installed
./install.sh --force # Replace existing files (creates backups)
./install.sh --schema # Regenerate config schemaThe entire setup is driven by config.yaml. Key features:
- Declarative: Everything is defined in YAML
- Environment variables: Support
${HOME}and other variables - Conditional links: Install files only when certain conditions are met
- Collision handling: Skip, backup, or replace existing files
PATH is managed centrally in ~/.config/shell/path.conf:
# Add custom paths (one per line)
$HOME/.local/bin
$HOME/bin
$HOME/.opencode/binExternal tools (cargo, nvm) manage their own PATH entries automatically.
.dotfiles/
├── install.sh # Main installer
├── config.yaml # Declarative configuration
├── config.schema.json # Generated JSON schema
├── bin/dotfiles # Python CLI tool
├── home/ # Source dotfiles
│ ├── .profile # Login shell setup
│ ├── .bashrc/.zshrc # Interactive shell setup
│ ├── .config/
│ │ ├── git/config # Git configuration
│ │ ├── ssh/config # SSH configuration
│ │ └── shell/ # Shell snippets and PATH config
│ └── .local/bin/ # Helper scripts
└── AGENTS.md # Development documentation
The bin/dotfiles script provides several commands:
# Apply dotfiles configuration
uv run --script bin/dotfiles apply
# Validate configuration
uv run --script bin/dotfiles validate
# Print expanded configuration
uv run --script bin/dotfiles print-effective
# Generate JSON schema
uv run --script bin/dotfiles schema-json~/.profile: Login shell entrypoint- Initializes tools (cargo, nvm, etc.)
- Sets up PATH via centralized system
- Sources profile snippets
~/.bashrc/~/.zshrc: Interactive shell setup- Sources interactive snippets (aliases, completion, prompt)
- Local overrides: Use
*.localfiles for machine-specific customization
Edit ~/.config/shell/path.conf:
# Your custom paths
$HOME/my-tools/bin
/opt/custom/binCreate local override files that won't be managed by dotfiles:
~/.profile.local- Login shell overrides~/.bashrc.local- Bash interactive overrides~/.config/git/config.local- Git configuration overrides~/.config/shell/path.local.conf- Additional PATH entries
To add support for a new tool:
- Add initialization logic to
home/.config/shell/profile.d/20-tools.sh - If the tool needs PATH entries, add them to
home/.config/shell/path.conf - Update
config.yamlif new files need to be symlinked
- Python 3.11+ (for the CLI tool)
- uv (automatically installed by
install.sh) - Linux/POSIX environment (bash, zsh, basic utilities)
Preview changes without making them:
./install.sh --dry-run
uv run --script bin/dotfiles apply --dry-runReplace existing files (with backup):
./install.sh --force
uv run --script bin/dotfiles apply --forceUse environment variables or shell commands to conditionally install files:
links:
- src: "home/.config/work/config"
dst: "${HOME}/.config/work/config"
when:
env: "WORK_SETUP" # Only install if WORK_SETUP is setlinks:
- src: "home/.config/development/config"
dst: "${HOME}/.config/development/config"
when:
shell: "command -v docker" # Only install if docker is available- Single way of doing things: Avoid multiple methods for the same task
- Centralized configuration: One source of truth for settings
- Minimal dependencies: Only essential tools required
- Local override support: Easy per-machine customization
- POSIX compatibility: Works across Linux distributions
See AGENTS.md for development guidelines and architecture details.
When modifying the configuration model, regenerate the schema:
uv run --script bin/dotfiles schema-jsonAlways validate configuration changes:
uv run --script bin/dotfiles validate