Skip to content

ZachiNachshon/dotfiles-cli

Repository files navigation

GitHub CI status License: MIT

RequirementsQuickStartOverviewSupportLicense


dotfiles-cli is a lightweight CLI utility used for automating your local development environment management with just a few terminal commands.

It simplifies the complex dotfiles repository wiring by separating the files from the management layer using a dedicatd CLI utility to control all aspects of the dotfiles repository with ease.

It helps you encapsulate:

  • Installations and updates
  • Settings and preferences
  • Shell session management

🏁 Requirements

  • A Unix-like operating system: macOS, Linux
  • git (recommended v2.30.0 or higher)

⚡️ Quick Start

The fastest way (for macOS and Linux) to install dotfiles-cli is using Homebrew:

brew install ZachiNachshon/tap/dotfiles-cli

Alternatively, tap into the formula to have brew search capabilities on that tap formulas:

# Tap
brew tap ZachiNachshon/tap

# Install
brew install dotfiles-cli

For additional installation methods read here.


🔍 Overview

Maintainers / Contributors:


💡 Why Creating dotfiles-cli?

Those are some of the key points that lead me to create this project:

  1. Simplify the complex dotfiles repository wiring by separating the files from the management layer
  2. Use a dedicatd CLI utility to control all aspects of the dotfiles repository with ease
  3. Having a coherent dotfiles structure that is easy to get familiar with
  4. Allow a generic CLI to control multiple dotfiles repositories (private and public)
  5. Avoid from running arbitrary scripts

🔬 How Does It Work?

dotfiles-cli is a CLI utility that can be used globally on any directory, it relies on a simple and opinionated dotfiles repository structure which allows it to control and manage domains by category i.e. Homebrew installs, $HOME symlinks, OS settings, shell plugins etc..


Initial Setup

Recommended commands order for initial setup:

  1. Clone and link a remote dotfiles repository:

    dotfiles link https://github.com/ZachiNachshon/dotfiles-example.git
  2. Create home/shell symlinks to $HOME folder:

    dotfiles sync all
  3. Install shell plugins:

    dotfiles plugins <bash/zsh>
  4. Update OS settings and preferences:

    dotfiles os <mac/linux>
  5. Install Homebrew components (might take time):

    dotfiles brew all
    💡 Note
    Run dotfiles -h for additional options.

Dotfiles Repo Structure

This is the expected dotfiles repository structure to properly integrate with dotfiles-cli:

.
├── ...
├── brew                     # Homebrew components, items on each file should be separated by a new line
│   ├── casks.txt
│   ├── drivers.txt
│   ├── packages.txt
│   ├── services.txt
│   └── taps.txt
│
├── dotfiles               
│   ├── custom               # Custom files to source on every new shell session (work/personal)
│   │   ├── .my-company  
│   │   └── ...
│   ├── home                 # Files to symlink into HOME folder
│   │   ├── .gitconfig       
│   │   ├── .vimrc
│   │   └── ...
│   ├── session              # Files to source on new shell sessions
│   │   ├── .aliases
│   │   └── ...
│   ├── shell                # Shell run commands files to symlink into HOME folder
│   │   ├── .zshrc
│   │   └── ...
│   └── transient            # Files to source on new shell session (not symlinked, can be git-ignored)
│       └── .secrets
│
├── os
│   ├── linux                # Scripts to configure Linux settings and preferences
│   │   ├── key_bindings.sh
│   │   └── ...
│   └── mac                  # Scripts to configure macOS settings and preferences
│       ├── finder.sh  
│       └── ...
│
├── plugins
│   ├── zsh                  # Scripts to install ZSH plugins
│   │   ├── oh_my_zsh.sh  
│   │   └── ...
│   └── bash                 # Scripts to install Bash plugins
│       ├── dummy.sh
│       └── ...
└── ...
💡 Note
For detailed information about the dotfiles repo structure, please read here.

📖 Documentation

Please refer to the documentation for detailed explanation on how to configure and use dotfiles-cli.


Support

dotfiles-cli is an open source project that is currently self maintained in addition to my day job, you are welcome to show your appreciation by sending me cups of coffee using the the following link as it is a known fact that it is the fuel that drives software engineering ☕

Buy Me A Coffee


License

MIT