Skip to content

pablobfonseca/dotfiles-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Dotfiles Installer

A CLI tool to manage your personal dotfiles and development environment setup with an interactive terminal UI.

Banner License Status

✨ Features

  • πŸ”§ Interactive Tool Selection - Choose exactly what you want to install
  • πŸ“Š Installation Status Tracking - See what's installed and what's not
  • πŸƒ Dry-run Mode - Preview installations safely before executing
  • βš™οΈ Configuration Management - Validate and manage your settings
  • πŸ”„ Update & Rollback - Keep your dotfiles current
  • πŸ›‘οΈ Error Handling - Robust error recovery and reporting

πŸš€ Quick Start

Installation

Option 1: Quick Install Script (Easiest)

# One-liner install script (detects your OS/architecture)
curl -fsSL https://raw.githubusercontent.com/pablobfonseca/dotfiles-installer/main/install.sh | bash

Option 2: Download Pre-built Binary

# Download the latest release for macOS (Intel)
curl -L -o dotfiles https://github.com/pablobfonseca/dotfiles-installer/releases/latest/download/dotfiles-darwin-amd64

# Make it executable
chmod +x dotfiles

# Move to your PATH (optional)
sudo mv dotfiles /usr/local/bin/

Available architectures:

  • macOS Intel: dotfiles-darwin-amd64
  • macOS Apple Silicon: dotfiles-darwin-arm64
  • Linux x86_64: dotfiles-linux-amd64
  • Linux ARM64: dotfiles-linux-arm64

Option 3: Build from Source

# Clone the repository
git clone https://github.com/pablobfonseca/dotfiles-installer.git
cd dotfiles-installer

# Build the binary
go build -o dotfiles

# Or use make
make build

Basic Usage

# Show help and all available commands
dotfiles --help

# Interactive installation with tool selection
dotfiles install --interactive

# List all available tools and their status
dotfiles list

# Preview what would be installed (safe mode)
dotfiles install --dry-run

# Check installation status
dotfiles status

# Show current configuration
dotfiles config

# Update your dotfiles
dotfiles update --brew

πŸ”§ Installation Notes

  • macOS: No additional dependencies required
  • Linux: Requires curl for downloading
  • PATH: The installer automatically tries to install to /usr/local/bin which should be in your PATH
  • Permissions: May require sudo for system-wide installation

πŸš€ First Run

After installation, run the setup:

# First time setup with interactive tool selection
dotfiles install --interactive

# Or install everything at once
dotfiles install

πŸ”§ Available Tools

  • Homebrew - Package manager for macOS
  • Neovim - Modern Vim-based text editor with config
  • Zsh - Z shell configuration files (.zshrc, .zprofile, .zlogin)
  • Git - Git configuration files (.gitconfig, .gitignore, etc.)
  • Tmux - Terminal multiplexer configuration
  • Starship - Cross-shell prompt configuration
  • Wezterm - GPU-accelerated terminal emulator
  • Karabiner-Elements - Keyboard customization tool
  • Aerospace - Window manager for macOS

πŸ“– Commands

Command Description Example
install Install dotfiles (interactive or all) dotfiles install --interactive
list Show available tools and status dotfiles list
status Check installation status dotfiles status
config Show configuration settings dotfiles config
update Update repository and packages dotfiles update --brew
uninstall Remove dotfiles dotfiles uninstall

Command Options

  • --interactive, -i - Interactive installation with tool selection
  • --dry-run, -n - Preview mode (show what would be done)
  • --config - Specify custom config file
  • --brew - Also update Homebrew packages (for update command)

βš™οΈ Configuration

The tool uses a TOML configuration file located at ~/.config/dotfiles/config.toml:

[dotfiles]
repository = "pablobfonseca/dotfiles"
default_dir = "/Users/yourusername/.dotfiles"

First Run Setup

On first run, you'll be prompted to configure:

  • Repository: Your GitHub dotfiles repository (format: username/repository)
  • Directory: Where to clone your dotfiles (e.g., ~/.dotfiles)

🎨 Screenshots

Interactive Installation

πŸš€ Select Tools to Install

  ❯ β˜‘οΈ πŸ“¦ Homebrew
    ☐ πŸ“¦ Neovim
    ☐ πŸ“¦ Zsh
    ☐ πŸ“¦ Git Config

    Modern terminal-based package manager for macOS

β€’ space: toggle selection  β€’ a: select all  β€’ enter: install  β€’ q: quit

Progress Tracking

πŸš€ Dotfiles Installation Progress

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%

  βœ… Setting up repository
  βœ… Installing Homebrew
  βœ… Setting up Zsh configuration
  βœ… Installing configuration files
  βš™οΈ Finalizing installation...

βœ… Working... (4/5 steps completed)

πŸ› οΈ Development

Project Structure

dotfiles-installer/
β”œβ”€β”€ cmd/                    # CLI commands
β”‚   β”œβ”€β”€ install.go         # Install command with TUI
β”‚   β”œβ”€β”€ list.go           # List available tools
β”‚   β”œβ”€β”€ status.go         # Show status
β”‚   β”œβ”€β”€ config.go         # Configuration management
β”‚   └── update.go         # Update functionality
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ config/           # Configuration management
β”‚   β”œβ”€β”€ installer/        # Installation logic
β”‚   β”œβ”€β”€ ui/              # Terminal UI components
β”‚   └── utils/           # Utility functions
└── main.go

Building

# Build for current platform
go build -o dotfiles

# Build for release
make build

# Run tests
go test ./...

# Clean build artifacts
make clean

πŸ“¦ Releases

Pre-built binaries are automatically created for each release and available on the GitHub Releases page.

Supported platforms:

  • macOS (Intel & Apple Silicon)
  • Linux (x86_64 & ARM64)

Release artifacts:

  • dotfiles-darwin-amd64 - macOS Intel
  • dotfiles-darwin-arm64 - macOS Apple Silicon
  • dotfiles-linux-amd64 - Linux x86_64
  • dotfiles-linux-arm64 - Linux ARM64

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Charm for the amazing TUI libraries
  • Cobra for CLI framework
  • Viper for configuration management

Built with ❀️ and Go | Personal dotfiles: pablobfonseca/dotfiles

About

Go CLI Tool to manage my personal dotfiles

Resources

License

Stars

Watchers

Forks

Packages

No packages published