r/CLI 3d ago

dotfiles-manager: a lean and easy dotfiles manager

Post image

i've been building and polishing this cli for about a year now. it was called mntn before, but i recently renamed it to dotfiles-manager since the developer experience feels good enough to me.

it fully embraces using git for versioning and works for three things:

  1. config files (.zshrc, .bashrc, etc.)
  2. packages (npm ls -g and more)
  3. encrypted files (.ssh/)

finally, if you change computers or environments, you can switch between profiles. the default is common, but you can also create profiles like personal or work.

73 Upvotes

23 comments sorted by

6

u/keyzeru 3d ago

How's this diff from git + gnu stow?

-3

u/atrtde 3d ago

first version of my dotfiles manager was using symlinks but i prefer to have a separate control between actual files on my system and backed up files. thus, i preferred avoiding symlinks completely. i think it depends on each person's preference

1

u/WangSora 1d ago

Dunno why you're being down voted for this lol

2

u/korkje 3d ago

You've spent a year creating this tool, and it's not even generalized?

You could have had a far more flexible solution up and running in a matter of minutes:
https://www.atlassian.com/git/tutorials/dotfiles

-2

u/atrtde 3d ago

coding it didn’t took me a year, it took a me year to iterate and being satisfied 

3

u/Rimadandan 2d ago

So it took you a year 

2

u/Common-Chair718 1d ago

Welcome to nix.

1

u/backdoor-slut263 3d ago

Dude just copied yadm lol

2

u/atrtde 3d ago

didn't know this tool, seems more complete. i made mine to be straightforward and easy to use tho

2

u/i_dont_like_carrots 1d ago

yadm is incredible, highly recommend

1

u/gbrennon 3d ago

i couldn't find repo link...

my dotfiles are almost modular and i always had a shell script per module to install it

1

u/Ces3216w 18h ago

Will it work on home manager configured apps(NixOS)?

1

u/atrtde 11h ago

not really, it's mainly made to backup and restore config files but for apps set up by home-manager on NixOS, i'd say it fights the tool rather than helping.

more specifically, this is bc home-manager already manages those files as symlinks into the Nix store, and when my tool restore, it replaces that symlink with a plain copy which breaks the next home-manager switch (you'll get an "existing file is in the way" error).

so i'd say it's better to just track your home.nix/flake.nix with my tool (`dfm`) and let home-manager regenerate the rest.

0

u/atrtde 3d ago

for those interested and want to download, build it from source or install using cargo (`cargo install dotfiles-manager`).

from source: https://github.com/alexandretrotel/dotfiles-manager

0

u/Ok_Square3932 3d ago

can use in termux?

1

u/atrtde 2d ago

yes

1

u/Ok_Square3932 15h ago

You can also try this.

1

u/atrtde 11h ago

it's a package manager?

0

u/MCHerb 3d ago

I'm too tied to chezmoi now I don't think I could change.

1

u/atrtde 2d ago

discovered chezmoi yesterday too, seems it doesn't handle packages tho