Skip to main content

dotfiles manager for link/copy files, and run backup/refresh scripts

Project description

Dotfiles Manager

Centralized management of your dotfiles, backups, symlinks, and scripts on Linux.

This project allows you to easily manage your configuration files (dotfiles) by linking or copying them from a central repository to your system. It also supports running utility scripts to automate common tasks (backup, install, updates, etc.).


๐Ÿ“ฆ Project Structure

Path Description
~/.dotfile File containing the path to your dotfiles repository
$DOTFILES_BASE/files/ Directory containing files to link/copy
files/home.link/ Files to symlink in $HOME
files/home.copy/ Files to copy in $HOME
files/system.link/ Files to symlink in / (requires sudo)
files/system.copy/ Files to copy in / (requires sudo)
$DOTFILES_BASE/scripts/ Utility scripts executable via dotfiles-manager run

๐Ÿ›  Installation

  1. Install package:

    pip install manager-dotfiles
    
  2. Create the ~/.dotfile file:

    echo "/path/to/your/dotfiles" > ~/.dotfile
    

    Example:

    echo "~/.config/dotfiles" > ~/.dotfile
    

๐Ÿš€ Usage

Main Commands

Command Description
dotfiles-manager init Symlink/copy all dotfiles
dotfiles-manager init-link Symlink all dotfiles
dotfiles-manager init-copy Copy all dotfiles
dotfiles-manager link <file> Symlink a specific file
dotfiles-manager unlink <file> Remove a symlink
dotfiles-manager copy <file> Copy a specific file
dotfiles-manager run <script> [args...] Run a utility script

cli can be invoked by dotfiles-manager or dm, with previous command:

dm init
dm init-link
dm init-copy
dm link ~/.bashrc
dm unkink ~/.bashrc
dm copy /etc/host
dm run backup.sh

Global Options

Option Description
-y Assume "yes" to all prompts
-n Assume "no" to all prompts
-v Verbose mode
--sudo Run all commands with sudo
-c Disable colored output

Examples

  1. Initialize all dotfiles:

    dotfiles-manager init
    
  2. Symlink a specific file:

    dotfiles-manager link files/home.link/.bashrc
    
  3. Copy a system file (requires sudo):

    dotfiles-anager --sudo copy /etc/hosts
    
  4. Run a utility script:

    dotfiles-manager run backup
    

๐Ÿ“‚ Structure

~/.dotfile โ†’ /path/to/dotfiles
/path/to/dotfiles/
โ”œโ”€โ”€ files/
โ”‚   โ”œโ”€โ”€ home.link/
โ”‚   โ”‚   โ”œโ”€โ”€ .bashrc
โ”‚   โ”‚   โ”œโ”€โ”€ .vimrc
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ home.copy/
โ”‚   โ”‚   โ”œโ”€โ”€ .config/...
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ system.link/
โ”‚   โ”‚   โ””โ”€โ”€ etc/...
โ”‚   โ””โ”€โ”€ system.copy/
โ”‚       โ””โ”€โ”€ etc/...
โ””โ”€โ”€ scripts/
    โ”œโ”€โ”€ backup.sh
    โ”œโ”€โ”€ install-docker.sh
    โ”œโ”€โ”€ pin.py
    โ””โ”€โ”€ ...

๐Ÿ“ Notes

  • system.link and system.copy commands can be require sudo.
  • The ~/.dotfile file must contain the absolute path to your repository.
  • Scripts in scripts/ must be executable (chmod +x) with shebang (#!/usr/bin/env bash or #!/usr/bin/env python3).

๐Ÿค Contributing

Contributions are welcome! Open an issue or a pull request.


๐Ÿ“„ License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manager_dotfiles-0.2.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manager_dotfiles-0.2.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file manager_dotfiles-0.2.0.tar.gz.

File metadata

  • Download URL: manager_dotfiles-0.2.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for manager_dotfiles-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4e5c4cf282cfd871ba91e25ccd742fe2ccac5ae86bee20e1f170d55bd32214d1
MD5 a14e64d100bb7f1cffe84b733d766377
BLAKE2b-256 0a636cb92e628922588be12c67a25e585b9802e89a9b088c2b80d72e0f96a977

See more details on using hashes here.

File details

Details for the file manager_dotfiles-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: manager_dotfiles-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for manager_dotfiles-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3768742b3b6aca8a7b0e7ac28b969b2addb34a7fe608153aa2cc9adc7aea697
MD5 12e3162cd4686e5c0bfe6a0ba476e0c9
BLAKE2b-256 bf5d050c10fabf2e7e944c196b216803407d0c38bab7c03d7cb1aa457970836d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page