The all-in-one solution for managing your development environment across any machine
A comprehensive cross-platform CLI that handles everything: package management (Homebrew, pacman, apt, yum), dotfiles with GNU Stow, GitHub SSH setup, shell configuration, migrations, templates, and complete developer onboarding automation.
Works on macOS, Arch Linux, Debian/Ubuntu, and RHEL/Fedora with a single config file!
- π Cross-Platform - Single config works on macOS, Arch Linux, Debian/Ubuntu, RHEL/Fedora
- π Complete Developer Onboarding - One command sets up everything for new developers
- π GitHub SSH Integration - Automated SSH key generation and GitHub configuration
- π¦ Smart Package Management - Auto-detects and uses your system's package manager
- π GNU Stow Integration - Manage dotfiles with symbolic links
- π JSON Configuration - Store your setup in simple, versionable JSON
- π€ Configuration Sharing - Share and discover configs via GitHub Gist
- π Template Library - Pre-built configs for web-dev, data science, DevOps, and more
- π Community Discovery - Find and browse configurations from other developers
- π Interactive Shell Setup - Install oh-my-zsh, Starship, fzf, and plugins
- π Migration Tools - Import from chezmoi, yadm, bare repos, homesick, dotbot
- π₯ Health Checks - Automated diagnostics with auto-fix capabilities
- πΈ Snapshots & Rollback - Version tracking with easy restore
- π Config Linting - Validate and auto-fix configuration issues
- π Secrets Management - Secure storage for API keys and environment variables
- π¨ Template Variables - Dynamic config with
{{VAR}}substitution - π Conditional Configs - OS/hostname-specific configurations (work vs home)
- π¦ Dependency Management - Package dependencies with topological sort
- π Watch Mode - Auto-commit and sync changes
- π§ Shell Completions - Bash, zsh, fish, PowerShell support
brew tap wsoule/tap
brew install dotfilescurl -fsSL https://raw.githubusercontent.com/wsoule/dotfiles-cli/main/install.sh | bashcurl -fsSL https://raw.githubusercontent.com/wsoule/dotfiles-cli/main/install-linux.sh | bash# Download the latest release
curl -L https://github.com/wsoule/dotfiles-cli/releases/latest/download/dotfiles_Linux_x86_64.tar.gz -o dotfiles.tar.gz
# Extract
tar -xzf dotfiles.tar.gz
# Install (requires sudo)
sudo mv dotfiles /usr/local/bin/
# Verify
dotfiles --helpDownload the latest binary from releases
git clone https://github.com/wsoule/dotfiles-cli.git
cd dotfiles-cli
go build -o dotfiles
# macOS / Linux
sudo mv dotfiles /usr/local/bin/
# Or install to user directory
mkdir -p ~/.local/bin && mv dotfiles ~/.local/bin/# Complete onboarding - sets up everything in one command
dotfiles onboard
# Or with your GitHub email
dotfiles onboard --email your@email.comWhat this does:
- Initializes dotfiles directory and config
- Sets up GitHub SSH keys
- Configures shell (zsh or fish)
- Installs essential development packages
- Creates proper directory structure
# Clone your existing dotfiles repo
dotfiles setup https://github.com/your-username/your-dotfiles.git
# This will:
# - Clone your repo to ~/.dotfiles/
# - Create stow/ and private/ directories
# - Set up proper directory structure-
Initialize configuration:
dotfiles init
-
Set up GitHub SSH:
dotfiles github setup --email your@email.com dotfiles github test # Verify connection
-
Add packages:
dotfiles add git lazygit curl dotfiles add --type=cask visual-studio-code dotfiles add --type=stow vim zsh tmux
-
Install everything:
dotfiles install # Installs packages dotfiles stow vim zsh # Creates dotfile symlinks
dotfiles init # Initialize new configuration
dotfiles onboard # Complete developer onboarding
dotfiles tutorial # Interactive tutorial
dotfiles doctor # Health check with auto-fix
dotfiles doctor --fix # Auto-fix common issuesdotfiles add <packages> # Add packages
dotfiles remove <packages> # Remove packages
dotfiles install # Install all packages
dotfiles update # Update packages
dotfiles status # Check installation status
dotfiles diff # Show config vs installed
dotfiles scan # Scan and add installed packagesdotfiles stow <packages> # Create symlinks
dotfiles unstow <packages> # Remove symlinks
dotfiles restow <packages> # Recreate symlinks
dotfiles stow-diff [packages] # Preview stow changes
dotfiles list # List all packages# Configuration Management
dotfiles lint # Validate config
dotfiles lint --fix # Auto-fix issues
dotfiles snapshot create # Create snapshot
dotfiles snapshot list # List snapshots
dotfiles snapshot restore <id> # Restore snapshot
dotfiles backup # Create timestamped backup
dotfiles restore <file> # Restore from backup
# Migration Tools
dotfiles migrate detect # Detect other tools
dotfiles migrate from chezmoi # Migrate from chezmoi
dotfiles migrate from yadm # Migrate from yadm
# Shell Configuration
dotfiles shell setup # Interactive shell setup
dotfiles shell list # List installed tools
# Templates & Sharing
dotfiles templates list # Browse templates
dotfiles templates create <name> # Create template
dotfiles share gist # Share via GitHub Gist
dotfiles clone <source> # Import configuration
dotfiles discover featured # Browse community configs
# Advanced Config
dotfiles conditionals apply # Apply OS-specific config
dotfiles conditionals test # Test which conditionals match
dotfiles secrets init # Initialize secrets management
dotfiles secrets add <NAME> # Add secret (prompts for value)
dotfiles template render # Render template variables
dotfiles depends show <package> # Show dependencies
dotfiles watch # Auto-commit changes
dotfiles roles list # List package roles
# Utilities
dotfiles completion bash # Generate completions
dotfiles completion install zsh # Install completions
dotfiles check # Verify setup
dotfiles bootstrap # Generate bootstrap scriptRun diagnostics and automatically fix common issues:
# Check for issues
dotfiles doctor
# Auto-fix common problems
dotfiles doctor --fixWhat doctor --fix does:
- β Creates missing directories
- β Initializes config.json
- β Initializes git repository
- β Installs git and stow automatically
- β Identifies broken symlinks
- β Detects configuration drift
Configure your shell with popular tools interactively:
dotfiles shell setupInstalls:
- oh-my-zsh / oh-my-fish
- Starship prompt
- fzf (fuzzy finder)
- zsh-autosuggestions
- zsh-syntax-highlighting
Easily migrate from other dotfiles managers:
# Auto-detect installed managers
dotfiles migrate detect
# Migrate from specific tool
dotfiles migrate from chezmoi
dotfiles migrate from yadm
dotfiles migrate from bare-repo
dotfiles migrate from homesick
dotfiles migrate from dotbotCreate snapshots for easy rollback:
# Create snapshot
dotfiles snapshot create "before major update"
# List snapshots
dotfiles snapshot list
# Restore snapshot
dotfiles snapshot restore 20240615-143022
# Compare snapshots
dotfiles snapshot diff v1.0 v2.0
# Delete snapshot
dotfiles snapshot delete 20240615-143022Validate and fix configuration issues:
# Validate configuration
dotfiles lint
# Auto-fix issues
dotfiles lint --fix
# Strict mode validation
dotfiles lint --strictChecks for:
- β Valid JSON syntax
- β Duplicate packages
- β Missing stow directories
- β Circular dependencies
- β Empty values
- β Undefined variables
Use dynamic variables in your configs:
# Set variables
dotfiles template set EMAIL "user@example.com"
dotfiles template set NAME "John Doe"
# List variables
dotfiles template list
# Render templates
dotfiles template renderIn your config files, use {{VARIABLE}} syntax:
email = {{EMAIL}}
name = {{NAME|default-name}}
Safely manage API keys, tokens, and sensitive environment variables:
# Initialize secrets file
dotfiles secrets init
# Add a new secret (prompts for value)
dotfiles secrets add API_KEY
dotfiles secrets add DATABASE_URL
# List secret names (values hidden)
dotfiles secrets list
# Generate template for new machines
dotfiles secrets templateHow it works:
- Secrets stored in
~/.dotfiles/private/.env-private(git-ignored) - File permissions:
0600(owner read/write only) - Template generation removes values for sharing structure
- Source in your shell:
source ~/.dotfiles/private/.env-private
Example workflow:
# On your current machine
dotfiles secrets init
dotfiles secrets add GITHUB_TOKEN
dotfiles secrets add AWS_ACCESS_KEY
dotfiles secrets template # Creates .env-private.template
# Commit template to git (values removed)
git add private/.env-private.template
git commit -m "Add secrets template"
# On new machine
cp ~/.dotfiles/private/.env-private.template ~/.dotfiles/private/.env-private
# Edit .env-private and fill in actual valuesApply different configs based on OS or hostname - perfect for work vs home machines:
# Test what would apply
dotfiles conditionals test
# Apply conditionals
dotfiles conditionals apply
# Preview without applying
dotfiles conditionals apply --dry-run
# Add a conditional
dotfiles conditionals add \
--hostname "work-*" \
--brews slack,zoom,docker \
--casks microsoft-teamsExample: Work vs Home Setup
{
"conditionals": [
{
"hostname": "work-*",
"os": "darwin",
"brews": ["slack", "zoom", "docker"],
"casks": ["microsoft-teams"],
"variables": {
"WORK": "true",
"EMAIL": "you@company.com"
}
},
{
"hostname": "home-*",
"brews": ["steam", "discord"],
"casks": ["spotify"],
"variables": {
"PERSONAL": "true",
"EMAIL": "you@personal.com"
}
}
]
}Glob pattern support:
work-*- Matches anything starting with "work-"*-laptop- Matches anything ending with "-laptop"*macbook*- Matches anything containing "macbook"
How it works:
- Run
dotfiles conditionals applyon any machine - Automatically detects hostname and OS
- Adds matching packages to your config
- Run
dotfiles installto install them - Same dotfiles repo, different packages per machine!
Define dependencies between packages:
# Show dependencies
dotfiles depends show neovim
# Show full tree
dotfiles depends tree neovim
# Resolve install order
dotfiles depends resolveExample config:
{
"package_dependencies": {
"neovim": ["python3", "node"],
"tmux": ["zsh"]
}
}Auto-commit and sync changes:
# Start watching (30 second interval)
dotfiles watch
# Custom interval
dotfiles watch --interval 60
# Stop watching
dotfiles watch stop# Browse available templates
dotfiles templates list
# Preview a template
dotfiles templates show web-dev
# Apply a template
dotfiles clone template:web-dev
# Discover community templates
dotfiles templates discover --search "web-dev"Built-in Templates:
web-dev- Web development (Node.js, Python, Docker)mobile-dev- iOS/Android (Flutter, React Native)data-science- Python, R, Jupyter, analyticsdevops- Kubernetes, Terraform, cloud toolsminimal- Essential tools only
# Share via GitHub Gist
dotfiles share gist --name="My Setup" --description="Full-stack config"
# Share privately
dotfiles share gist --name="My Config" --private
# Export to file
dotfiles share file my-config.json# From GitHub Gist URL
dotfiles clone https://gist.github.com/user/gist-id
# From local file
dotfiles clone my-config.json
# Preview before importing
dotfiles clone https://gist.github.com/user/gist-id --preview
# Merge with existing
dotfiles clone https://gist.github.com/user/gist-id --merge# Add brew packages (default)
dotfiles add git curl wget
# Add casks (GUI applications)
dotfiles add --type=cask visual-studio-code firefox
# Add taps (repositories)
dotfiles add --type=tap homebrew/cask-fonts
# Add Stow packages (dotfiles)
dotfiles add --type=stow vim zsh tmux# Preview changes before stowing
dotfiles stow-diff vim zsh
# Create symlinks
dotfiles stow vim zsh tmux
# Remove symlinks
dotfiles unstow vim
# Restow (remove and recreate)
dotfiles restow vim
# Custom directories
dotfiles stow --dir=/path/to/dotfiles --target=~ vim# Move private file to private directory
mv ~/.env-private ~/.dotfiles/private/.env-private
# Create symlink in stow package
dotfiles private shell .env-private
# Stow the package
dotfiles stow shell
# Creates: ~/.env-private -> ~/.dotfiles/stow/shell/.env-private -> ~/.dotfiles/private/.env-private# Create timestamped backup
dotfiles backup
# Custom backup location
dotfiles backup --dir ~/backups
# Custom name
dotfiles backup my-backup.json
# Restore from backup
dotfiles restore my-backup.jsonYour configuration is stored at ~/.dotfiles/config.json:
{
"brews": ["git", "lazygit", "neovim"],
"casks": ["visual-studio-code"],
"taps": ["homebrew/cask-fonts"],
"stow": ["vim", "zsh", "tmux"],
"roles": {
"web-dev": {
"name": "Web Development",
"brews": ["node", "python", "docker"],
"casks": ["visual-studio-code"]
}
},
"conditionals": [
{
"hostname": "work-*",
"brews": ["work-tool"]
}
],
"package_dependencies": {
"neovim": ["python3", "node"]
},
"variables": {
"EMAIL": "user@example.com",
"NAME": "John Doe"
}
}~/.dotfiles/
βββ config.json # Package configuration
βββ .gitignore # Excludes private/
βββ stow/ # Stow packages
β βββ vim/
β β βββ .vimrc
β β βββ .vim/
β βββ zsh/
β β βββ .zshrc
β β βββ .zsh/
β βββ tmux/
β βββ .tmux.conf
βββ private/ # Private files (git-ignored)
β βββ .env-private # Secrets (managed by 'dotfiles secrets')
β βββ .env-private.template # Template for new machines
β βββ .ssh/
βββ snapshots/ # Configuration snapshots
βββ backups/ # Timestamped backups
βββ .git/ # Version control
This tool works seamlessly across multiple platforms with one configuration file:
- macOS: Uses Homebrew
- Arch Linux: Uses pacman/yay
- Debian/Ubuntu: Uses apt
- RHEL/Fedora: Uses yum/dnf
The same config.json works everywhere! Casks are treated as regular packages on Linux.
Install completions for tab completion:
# Generate for your shell
dotfiles completion bash > /usr/local/etc/bash_completion.d/dotfiles
dotfiles completion zsh > "${fpath[1]}/_dotfiles"
dotfiles completion fish > ~/.config/fish/completions/dotfiles.fish
# Or auto-install
dotfiles completion install bash
dotfiles completion install zsh
dotfiles completion install fish| Command | Description |
|---|---|
dotfiles init |
Initialize new configuration |
dotfiles onboard |
Complete developer onboarding |
dotfiles tutorial |
Interactive tutorial |
dotfiles doctor |
Health check with diagnostics |
dotfiles doctor --fix |
Auto-fix common issues |
| Command | Description |
|---|---|
dotfiles add <packages> |
Add packages to config |
dotfiles remove <packages> |
Remove packages from config |
dotfiles install |
Install all configured packages |
dotfiles update |
Update all packages |
dotfiles status |
Check installation status |
dotfiles diff |
Compare config vs installed |
dotfiles scan |
Scan and add installed packages |
| Command | Description |
|---|---|
dotfiles stow <packages> |
Create symlinks |
dotfiles unstow <packages> |
Remove symlinks |
dotfiles restow <packages> |
Recreate symlinks |
dotfiles stow-diff [packages] |
Preview stow changes |
dotfiles list |
List all packages |
| Command | Description |
|---|---|
dotfiles lint |
Validate configuration |
dotfiles lint --fix |
Auto-fix config issues |
dotfiles snapshot create |
Create snapshot |
dotfiles snapshot list |
List snapshots |
dotfiles snapshot restore <id> |
Restore snapshot |
dotfiles backup [file] |
Create timestamped backup |
dotfiles restore <file> |
Restore from backup |
| Command | Description |
|---|---|
dotfiles migrate detect |
Detect other tools |
dotfiles migrate from <tool> |
Migrate from other tool |
dotfiles shell setup |
Interactive shell setup |
dotfiles conditionals apply |
Apply OS-specific config |
dotfiles conditionals test |
Test which conditionals match |
dotfiles secrets init |
Initialize secrets management |
dotfiles secrets add <NAME> |
Add secret (prompts for value) |
dotfiles secrets list |
List secret names |
dotfiles secrets template |
Generate template for new machines |
dotfiles template render |
Render template variables |
dotfiles depends show <pkg> |
Show dependencies |
dotfiles watch |
Auto-commit changes |
dotfiles roles list |
List package roles |
dotfiles completion <shell> |
Generate completions |
dotfiles bootstrap |
Generate bootstrap script |
dotfiles check |
Verify setup |
dotfiles uninstall |
Remove dotfiles setup |
- Go 1.25.1 or later
- Package manager for your OS (Homebrew, pacman, apt, yum)
- GNU Stow:
brew install stoworsudo pacman -S stow
go build -o dotfilesdotfiles-cli/
βββ cmd/ # CLI commands
β βββ root.go # Root command
β βββ init.go # Initialize
β βββ onboard.go # Onboarding
β βββ add.go # Add packages
β βββ install.go # Install packages
β βββ stow.go # Stow integration
β βββ doctor.go # Health checks
β βββ snapshot.go # Snapshots
β βββ lint.go # Config validation
β βββ migrate.go # Migration tools
β βββ shell.go # Shell setup
β βββ completion.go # Shell completions
β βββ conditionals.go # Conditional configs
β βββ template.go # Template variables
β βββ depends.go # Dependencies
β βββ watch.go # Watch mode
β βββ ... # More commands
βββ internal/
β βββ config/ # Config management
β βββ pkgmanager/ # Package manager abstraction
βββ main.go # Entry point
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
MIT License
Made with β€οΈ for developers who want their environment setup to just workβ’