oh-my-dot is a cross-platform dotfile manager designed to simplify the management of configuration files across multiple devices. It enables users to organize, synchronize, and deploy their dotfiles efficiently, ensuring consistency across different environments.
Key Features:
Git Integration: Seamlessly integrates with Git, allowing users to store their dotfiles in a version-controlled repository for easy sharing and backup.
Profile Management: Supports multiple profiles, enabling users to maintain distinct configurations for different machines or user accounts.
Cross-Platform Compatibility: Built using Go, oh-my-dot runs on Windows, macOS, and Linux, providing consistent functionality across operating systems.
Simplified Installation: Can be installed manually by downloading the executable or via Winget on Windows for an automatic setup.
Audience & Benefit:
Ideal for developers, system administrators, and users who need to maintain consistent configurations across multiple devices. oh-my-dot streamlines the process of managing dotfiles, saving time and reducing errors associated with manual configuration management.
README
oh-my-dot
A cross-platform dotfile manager with an advanced shell framework written in Go.
Oh-my-dot helps you manage your dotfiles across multiple machines with git integration and provides a powerful shell framework for managing shell configurations (aliases, prompts, completions) across bash, zsh, fish, PowerShell, and POSIX sh.
Features
Cross-Platform: Works on Windows, macOS, and Linux
Git Integration: Store and sync your dotfiles with git
Shell Framework: Manage shell features with advanced loading strategies
Eager loading for instant availability
Deferred loading for faster shell startup
On-command loading for lazy evaluation
Local Overrides: Per-machine customizations with security validation
Health Checks: Built-in doctor command to validate configuration
Interactive Mode: Browse and manage features interactively
Install
Linux and macOS (Automatic)
Run the install script to automatically download and install the latest version:
> Security Note: For added security, you can download and inspect the script before running it:
> sh > curl -fsSL https://raw.githubusercontent.com/PatrickMatthiesen/oh-my-dot/main/install.sh -o install.sh > # Review the script > cat install.sh > # Run it > bash install.sh >
This script will:
Detect your OS and architecture automatically
Download the latest release from GitHub
Install the binary to ~/.oh-my-dot/bin
Create a symlink in ~/.local/bin
Add the binary to your current session's PATH
If you need to install a specific version, you can set the OH_MY_DOT_VERSION environment variable:
Download the executable to a persistent folder.
> A folder you know won't change or randomly be deleted
>
> I recommend putting it under $HOME/oh-my-dot
Add the folder to your PATH
Start using oh-my-dot
Quick Start
Initialize Repository
# New fresh config
oh-my-dot init github.com/username/dotfiles
# Or with explicit remote
oh-my-dot init --remote github.com/username/dotfiles
# Existing config (use --force to override)
oh-my-dot init -r github.com/username/dotfiles -f /path/to/dotfiles --force
The shell framework allows you to manage shell configurations as modular features with advanced loading strategies.
Adding Features
Interactive Mode (Recommended)
oh-my-dot feature add -i
Browse the catalog and select features to add. The interactive mode automatically detects your current shell, places it at the top of the shell selection list, and pre-selects it for your convenience.
Supported Shells: bash, zsh, fish, PowerShell, and POSIX sh
Direct Addition
# Add to current shell (auto-detected)
oh-my-dot feature add git-prompt
# Add to specific shell
oh-my-dot feature add kubectl-completion --shell bash
# Add to all supported shells
oh-my-dot feature add core-aliases --all
When no --shell flag is provided, oh-my-dot tries to detects your current shell and adds the feature to it.
Loading Strategies
Features can be loaded with different strategies to optimize shell startup:
Eager Loading (Default)
Loads immediately during shell startup:
oh-my-dot feature add git-prompt --strategy eager
Deferred Loading
Loads in background for interactive shells (faster startup):
# List features
oh-my-dot feature list
oh-my-dot feature list --shell bash
# Remove features
oh-my-dot feature remove -i # Interactive
oh-my-dot feature remove git-prompt # Direct
oh-my-dot feature remove kubectl --all # From all shells
# Enable/disable features
oh-my-dot feature enable git-prompt
oh-my-dot feature disable kubectl --shell bash
# Show feature info
oh-my-dot feature info git-prompt
Feature Files
Features are stored in omd-shells//features/:
# Example: omd-shells/bash/features/git-prompt.sh
# Add your custom shell code here
parse_git_branch() {
git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\u@\h \W \$(parse_git_branch) $ "
Local Overrides
Create enabled.local.json for per-machine customizations:
# Check health
oh-my-dot doctor
# Fix common issues
oh-my-dot doctor --fix
# Re-apply shell hooks
oh-my-dot apply
# Check git status
oh-my-dot status
Known Issues
SSH
If you are using SSH to clone your dotfiles, you will need to add your SSH key to the SSH-Agent. This is because oh-my-dot uses Git under the hood:
ssh-add ~/.ssh/id_rsa
> If you are having issues on Windows you might want to install a newer version of OpenSSH. The one that comes with Windows is outdated and requires a bit more work to get going.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.