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.1.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.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: manager_dotfiles-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for manager_dotfiles-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f22ca67f008fed0bd49e7ce9113d4149af29cc24f867041807c1ca77d08bfe72
MD5 816e17e561e4366588b6821887858da2
BLAKE2b-256 e23afb90ac26136f20d3708f246508cda4c015c1b4370e6acea44d94803c6fbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for manager_dotfiles-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1d3a75015948a0125add9ab09c717a7b226271098e6b441aa044a2eebf4aa3
MD5 1de17ab4977b4cf20f530ede78e9175f
BLAKE2b-256 0642ce989a9a77db21a371aadb070f8865caef3213ff170766637fa42cbaf94d

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