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.3.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.3.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: manager_dotfiles-0.3.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"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.3.0.tar.gz
Algorithm Hash digest
SHA256 d5b8e9da2dae4854f92e2f45470ca5f7f70fc0169a9863a2f3c562429712f0e7
MD5 19bdc3b11d061de5448a29db261696c5
BLAKE2b-256 674634e17847a64d1e9c1c75bb5c462660061bf2900018c38d095cdfa544b198

See more details on using hashes here.

File details

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

File metadata

  • Download URL: manager_dotfiles-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89b120f771fcfc1b0a89b5b9f88c604cb2898ac13af23daa9564bc4508cdbffe
MD5 e475f31e8eb2935672affb54df9d963a
BLAKE2b-256 5f9d6ac771f43e119e41cb2a6e7f7925b146fe33dc4e8310bdac9cb7761843c3

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