Skip to content

Ethics03/Dots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ dots

A minimal, fast, and developer-friendly dotfile manager

Effortlessly manage, version, and sync your dotfiles using symlinks and Git

Go Version License Platform

Features β€’ Installation β€’ Quick Start β€’ Commands β€’ Examples


✨ Features

  • πŸš€ Simple & Fast - Minimal overhead, instant operations, no bloat
  • πŸ”„ Git Integration - Full version control with sync, push, pull commands
  • πŸ”— Symlink Management - Automatic symlink creation and tracking
  • ☁️ Cross-Machine Sync - Clone and deploy dotfiles to new machines instantly
  • πŸ›‘οΈ Safe Operations - Built-in checks to prevent data loss and recursive symlinks
  • πŸ“ No Config Files - Filesystem-based tracking, no YAML complexity
  • ⚑ Written in Go - Single binary, no dependencies, cross-platform compilation

πŸ“₯ Installation

Prerequisites

  • Go 1.20+ (for building from source)
  • Git (for version control features)

Quick Install (Linux/macOS)

git clone https://github.com/Ethics03/Dots.git
cd Dots
chmod +x Install.sh
./Install.sh

The install script will:

  • βœ… Check for Go and Git
  • βœ… Build the binary
  • βœ… Install to /usr/local/bin
  • βœ… Verify installation

Manual Installation

git clone https://github.com/Ethics03/Dots.git
cd Dots
go build -o dots
sudo mv dots /usr/local/bin

Platform-Specific Notes

🐧 Linux

All features fully supported. Symlinks work natively.

./Install.sh
🍎 macOS

All features fully supported. May require sudo for installation.

./Install.sh

Note: If you get a security warning, go to System Preferences β†’ Security & Privacy and allow the binary.

πŸͺŸ Windows

⚠️ Limited Support - Requires Developer Mode or Administrator privileges for symlinks.

Option 1: Using WSL (Recommended)

# Inside WSL
./Install.sh

Option 2: Native Windows

git clone https://github.com/Ethics03/Dots.git
cd Dots
go build -o dots.exe
move dots.exe $HOME\bin\  # Add to PATH

Enable Developer Mode for Symlinks:

  1. Settings β†’ Update & Security β†’ For Developers
  2. Enable "Developer Mode"
  3. Restart terminal

πŸš€ Quick Start

Initialize Your Dotfiles

# Initialize dots (creates ~/.config/dots and git repo)
dots init

Output:

╔═══════════════════════════════════════════════════════════════╗
β•‘                                                               β•‘
β•‘                      Initializing Dots                        β•‘
β•‘                                                               β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Setting up dotfiles directory...
   βœ“ Created /home/user/.config/dots

Creating configuration files...
   βœ“ .gitignore
   βœ“ README.md

Initializing git repository...
   βœ“ Repository initialized

Creating initial commit...
   βœ“ Committed initial files

╔═══════════════════════════════════════════════════════════════╗
β•‘                                                               β•‘
β•‘                     Setup Complete!                           β•‘
β•‘                                                               β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Add Your First Dotfile

# Add a dotfile to tracking
dots add ~/.bashrc

# Add a directory
dots add ~/.config/nvim

Check Status

dots status

Sync to Remote

# Set up remote repository
cd ~/.config/dots
git remote add origin https://github.com/username/dotfiles.git

# Sync your dotfiles
dots sync

πŸ“š Commands

Core Commands

Command Description Example
dots init Initialize dotfiles directory and git repo dots init
dots add <file> Add a dotfile to tracking dots add ~/.bashrc
dots remove <file> Remove a dotfile from tracking dots remove bashrc
dots link <file> Create symlink for a dotfile dots link bashrc
dots status Check status of all dotfiles dots status
dots edit <file> Edit a dotfile using $EDITOR dots edit bashrc

Git Commands

Command Description Example
dots sync Commit and push changes dots sync -m "Update config"
dots push Push committed changes dots push
dots pull Pull changes from remote dots pull
dots clone <url> Clone existing dotfiles repo dots clone git@github.com:user/dots.git

Utility Commands

Command Description Example
dots create <file> Create a new dotfile dots create .zshrc
dots setup <path> Create directory structure dots setup nvim/lua/plugins

πŸ’‘ Examples

Complete Workflow

# 1. Initialize
dots init

# 2. Add your dotfiles
dots add ~/.bashrc
dots add ~/.zshrc
dots add ~/.config/nvim
dots add ~/.gitconfig

# 3. Check what's tracked
dots status

# 4. Set up remote backup
cd ~/.config/dots
git remote add origin git@github.com:yourusername/dotfiles.git

# 5. Sync to GitHub
dots sync -m "Initial dotfiles commit"

Setting Up a New Machine

# Clone your dotfiles
dots clone git@github.com:yourusername/dotfiles.git

# Link what you need
dots link bashrc
dots link zshrc
dots link nvim

# Check everything is working
dots status

Editing and Syncing

# Edit a dotfile
dots edit bashrc

# Sync changes to remote
dots sync -m "Add new aliases"

Removing a Dotfile

# Remove from tracking (restores original file)
dots remove bashrc

πŸ“‚ Directory Structure

After Initialization

~/.config/dots/
β”œβ”€β”€ .git/              # Git repository
β”œβ”€β”€ .gitignore         # Ignore patterns
β”œβ”€β”€ README.md          # Auto-generated README
β”œβ”€β”€ bashrc             # Your dotfiles
β”œβ”€β”€ zshrc
β”œβ”€β”€ gitconfig
└── nvim/              # Nested configs supported
    β”œβ”€β”€ init.lua
    └── lua/
        └── plugins/

Symlinks in Home Directory

~/
β”œβ”€β”€ .bashrc -> ~/.config/dots/bashrc
β”œβ”€β”€ .zshrc -> ~/.config/dots/zshrc
β”œβ”€β”€ .gitconfig -> ~/.config/dots/gitconfig
└── .config/
    └── nvim -> ~/.config/dots/nvim

πŸ›‘οΈ Safety Features

  • βœ… Prevents recursive symlinks - Won't add files from within ~/.config/dots
  • βœ… Validates symlink targets - Ensures symlinks point to correct locations
  • βœ… Backup on remove - Restores original files when removing from tracking
  • βœ… Git stash on pull - Automatically stashes uncommitted changes before pulling
  • βœ… Path validation - Checks if files exist before operations
  • βœ… Permission preservation - Maintains file permissions when copying

🌍 Platform Support

Platform Status Notes
Linux βœ… Full Support All features work perfectly
macOS βœ… Full Support All features work perfectly
Windows ⚠️ Limited Requires Developer Mode or Admin for symlinks

Windows Users

Symlinks on Windows require either:

  • Developer Mode enabled (Windows 10+), OR
  • Running as Administrator

Recommended: Use WSL (Windows Subsystem for Linux) for full compatibility.


🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a 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

Development Setup

git clone https://github.com/Ethics03/Dots.git
cd Dots
go build -o dots
./dots --help

πŸ› Troubleshooting

Symlink creation fails

Issue: failed to create symlink: permission denied

Solution:

  • Linux/Mac: Check file permissions
  • Windows: Enable Developer Mode or run as Administrator
Git commands fail

Issue: git: command not found

Solution: Install Git:

  • Ubuntu/Debian: sudo apt install git
  • macOS: brew install git or Xcode Command Line Tools
  • Windows: Download from git-scm.com
Remote push fails

Issue: failed to push: authentication failed

Solution:

  • Set up SSH keys: ssh-keygen -t ed25519 -C "your@email.com"
  • Add to GitHub: Settings β†’ SSH Keys β†’ Add new
  • Or use HTTPS with personal access token
Status shows wrong symlinks

Issue: Symlinks point to wrong locations

Solution:

# Remove incorrect symlink
dots remove <filename>

# Re-add the dotfile
dots add ~/.<filename>

πŸ“„ License

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


πŸ™ Acknowledgments


πŸ“ž Support


Made with ❀️ by Ethics03

⭐ Star this repo if you find it useful!

About

A Dotfiles Manager CLI-tool to symlink, version and sync your config files with git.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors