badm

Crates.iobadm
lib.rsbadm
version0.5.0
sourcesrc
created_at2019-10-29 18:15:24.496948
updated_at2019-11-12 21:14:33.050907
descriptionBut another dotfile manager.
homepage
repositoryhttps://github.com/jakeschurch/badm
max_upload_size
id176703
size66,198
Jake Schurch (jakeschurch)

documentation

README

WIP: badm - But Another Dotfiles Manager

Maintenance Build Status Crates.io Documentation OS Support License

badm is "But Another Dotfiles Manager".

How it works

badm stores your dotfiles in a directory that replicates the directory hierarchy of the dotfiles' original path, and creates symlinks to their original paths. This creates a standardized approach for managing, deploying, and sharing dotfiles among different systems and users.

Quick Demo

  • ferris has created a directory to store their dotfiles at ~/.dots
  • badm set-dir ~/.dots sets the BADM dotfiles dir at ~/.dots
  • badm will search for a badm config file at one of the two valid locations: $HOME and $XDG_CONFIG_HOME. If the config file not found, badm will create it under $HOME
/home
└── ferris
    └── .dots
        ├── .badm.toml
        └── .gitconfig
  • to store ~/.gitconfig as a dotfile, ferris runs badm stow ~/.gitconfig (relative paths work as well)
  • badm replicates the path of the dotfile under the ~/.dots directory
  • the dotfile is moved to this new path in the set dotfiles directory and symlinked at its original path which points to its new path
/home
└── ferris
    ├── .badm.toml
    ├── .dots
    │   └── home
    │       └── ferris
    │           └── .gitconfig
    └── .gitconfig -> /home/ferris/.dots/home/ferris/.gitconfig

WIP: Getting Started/Installation

TODO: will populate for v1.0.0 release

Commands

  • badm set-dir <DIRECTORY> - set dotfiles directory location, if the location is not created BADM has the ability to create one for you
  • badm stow <FILE> - store a file in the dotfiles directory, create a symlink at the original source of the stowed file.
    • REVIEW: recursive flag?
  • badm deploy <FILE> - for new configurations, create symlinks in directories relative to the dotfile's directory hierarchy. Directories to replicate the stored dotfile's directory structure will be created if not found.
  • badm restore <FILE> - restore the stored file from the dotfiles directory and replace the symlink with the original file

Roadmap

  • Command-line tool with ability to:
    • create/set dotfiles directory (v0.3.0)
    • store dotfiles in badm directory (v0.4.0)
    • deploy dotfiles from badm directory to new systems (v0.4.0)
    • restore dotfiles to original path location (v0.4.0)
  • Use TOML file for persistent configuration
  • Glob wildcards are supported (*, ?) (v0.4.0)
  • Support exclude patterns
  • Support system-specific dotfiles
  • Support multiple dotfiles directories (?)

Contributing

Pull requests, issues/feature requests, and bug reports are welcome!

Similar Projects

License

This project is made available under the MIT license. See the LICENSE file for more information.

Commit count: 97

cargo fmt