Flexdot

Gem Version Test

A Flexible and Rake based dotfile manager.

Getting Started

Prerequisite

Ruby 3.0+

Installing

Create the following directory structure:

$HOME/
├── dotfiles/
:

Create a Gemfile to install Flexdot:

$ cd $HOME/dotfiles
$ bundle init

Add this line to the Gemfile:

gem 'flexdot'

Or install it yourself as:

$ gem install flexdot

Then, create a $HOME/dotfiles/Rakefile with the following codes:

require 'flexdot'

Flexdot.setup(
  home_dir: '/home/username',

  # (optional)
  # The dotfile directory path.
  # Default '.'.
  dotfiles_dir: '.'

  # (optional)
  # Whether or not to colorize the output
  # Default: true
  output_colorize: true

  # (optional)
  # Whether to automatically delete old backups.
  # If nil, do not delete, otherwise keep to the specified number of backups.
  # Default: nil
  keep_max_backup_count: 10
)

It is recommended that you add the Rakefile to gitignore:

# .gitignore
Rakefile

Finally, run rake -T in the $HOME/dotfiles and make sure that the output is as follows:

$ rake -T
rake clear_backups

Usage

See doc/example.md

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Flexdot project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.