GithubHelp home page GithubHelp logo

dotfiler's Introduction

Dotfiler

Go Report Card

Dotfiler makes it easy to manage dotfiles across multiple hosts with a single configuration file.

Example of a configuration file:

dotfiles:
- name: default_i3
  filepath: test/i3/i3
  hosts:
    - hostname: desktop
      path: /home/user/.config/test/i3/i3
      frozen: false

    - hostname: blade
      path: /home/user/.config/i3/i3
      frozen: false

- name: polybar/
  filepath: test/polybar/polybar/
  hosts:
    - hostname: desktop
      path: /home/user/.config/test/polybar/
      frozen: true
    - hostname: blade
      path: /home/user/.config/polybar
      frozen: false

- name: .vimrc
  filepath: test/vim/.vimrc
  hosts:
    - hostname: desktop
      path: /home/user/.config/test/vim/.vimrc
      frozen: false
    
    - hostname: blade
      path: /home/user/.vimrc
      frozen: false

A dotfile has the following fields

name: A dotfile name has no meaning other than as a way to differentiate it to the user

filepath: the path in the current directory where the dotfile/config directory resides

hosts: A list of hosts to apply this dotfile to

hostname: Hostname of the computer to apply this dotfile/directory to

path: Full path and filename of where to put the dotfile/directory on this host

frozen: boolean determining whether this host is "frozen" for this dotfile, meaning to skip it for now

Usage

dotfiler [flags] [command]

Typical usage would be to store all of your dotfiles in a git repository along with a Dotfiler configuration file. Then applying dotfiles is as easy as cloning the repo and running dotfiler apply in the git repo's directory.

Commands

apply

Apply the current configuration file, will replace all configured config files that match the hostname.

update

Update the current directories dotfiles with ones from the specific host.

backup (not implemented yet)

Backup current directories dotfiles into the specified directory, must be used with -b flag.

restore (not implemented yet)

Restore a backed up configuration, must be used with the -b flag.

Flags

-c path/to/config.yml

Specify path and name of config file to use (default "./config.yml")

-h hostname

Set hostname to use for this run (default is current machine's hostname)

-b path/to/backup.bak

Specify the path for backup or restore to use (default "./backup/config.yml.bak")

Installation

If you have a working Go installation, simply go get -u github.com/masonj188/dotfiler

If you don't have a Go installation, precompiled binaries will soon be available for most major operating systems.

dotfiler's People

Contributors

masonj5n avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.